how can i add a custom field (of sale_order_line) to the Stock-Picking Return-Items dialog?
i tried to add a related field as:
class ReturnPickingLine(models.TransientModel):
_inherit = "stock.return.picking.line"
custom_field = fields.Char(related='move_id.sale_line_id.my_custom_Field', string="Farbcode")
and wanted to show it in stock.view_stock_return_picking_form but without success.
any ideas how to realize that?
UPDATE:
i add the field in xml LIKE:
<record id="stock_inherit_view_stock_return_picking_form" model="ir.ui.view">
<field name="model">stock.location
<field name="inherit_id" ref="stock.view_stock_return_picking_form"/>
<field name="arch" type="xml">
< xpath expr="//field[@name='product_id']" position="after">
<field name="custom_field"/>
</xpath>
</field>
</record>