[FIX] mrp: display owner and package on move line
When owner and/or packages are activated, a MO doesn't give the possibility to set the proper owner/package of the reserved products. We add the fields in the view, and set them as optional. Important note: this will only work with the move lines created during the reservation. If additional move lines are created manually, this won't work. Indeed, it would be necessary to add both fields to `raw_workorder_line_ids`, hence to `mrp.abstract.workorder.line`. opw-2260450 closes odoo/odoo#52180 X-original-commit: 7f84ef7c8a292a5e95b26f7923923271b7b109b7 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -60,6 +60,8 @@
|
||||
<tree editable="bottom" decoration-success="product_uom_qty==qty_done" decoration-danger="(product_uom_qty > 0) and (qty_done>product_uom_qty)">
|
||||
<field name="lot_id" attrs="{'column_invisible': [('parent.has_tracking', '=', 'none')]}" context="{'default_product_id': parent.product_id}"/>
|
||||
<field name="lot_produced_ids" widget="many2many_tags" options="{'no_open': True, 'no_create': True}" domain="[('id', 'in', parent.order_finished_lot_ids)]" invisible="not context.get('final_lots')"/>
|
||||
<field name="owner_id" groups="stock.group_tracking_owner" options="{'no_open': True, 'no_create': True}" optional="hide"/>
|
||||
<field name="package_id" groups="stock.group_tracking_lot" options="{'no_open': True, 'no_create': True}" optional="hide"/>
|
||||
<field name="product_uom_qty" string="Reserved" readonly="1" optional="show"/>
|
||||
<field name="qty_done"/>
|
||||
<field name="workorder_id" invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user