I have a many2one field in sale.order.line. It is pointing to a custom model with relations to product.product and res.partner.
I want this new field to return the name of a record in the custom model based on the product and the customer (in sale.order.line).
I added <field name="x_product_customer_reference" string="Product Customer Reference" context="{'default_x_customer_id': order_partner_id, 'default_x_product_id': product_id}"/>
in the sale.order.line.form.readonly XML view.
But the new field stays empty. Why is it not working? ...
<field name="x_product_customer_reference" string="Product Customer Reference" context="{'default_x_customer_id': order_partner_id, 'default_x_product_id': product_id}"/>
My custom model x_customer_product_reference has two many2one fields,x_customer_id
andx_product_id
. – Koul