diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-05-28 07:49:41 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-05-29 14:02:29 +0000 |
| commit | fe250e609c74f0502bcb0e34a65e360d1bc6f65f (patch) | |
| tree | 15f1973bb542d80c6261e42076cc57db9ce0d441 /addons | |
| parent | 223b6cff6e2bca83cb487ad59a5e42eeba259b1d (diff) | |
[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>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mrp/views/stock_move_views.xml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mrp/views/stock_move_views.xml b/addons/mrp/views/stock_move_views.xml index 72c043cff8d..7f0273418cd 100644 --- a/addons/mrp/views/stock_move_views.xml +++ b/addons/mrp/views/stock_move_views.xml @@ -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"/> |
