diff options
| author | William Henrotin <whe@odoo.com> | 2019-11-14 09:16:38 +0000 |
|---|---|---|
| committer | William Henrotin <whe@odoo.com> | 2019-11-22 12:39:52 +0000 |
| commit | 1efe2fc953b18b4c19ff2df20f376fc395a157fc (patch) | |
| tree | 56d6b95daaaf7b4fcfac6843a87b6396e1f2e5ea | |
| parent | 6b4f447de902e9e1d9ef1f5f573231a35658c453 (diff) | |
[FIX] mrp: load move_finished_ids in view
Issue: open a done production. Unlock it. Add a new raw stock move.
This action will called _compute_order_finished_lot_ids on the new
stock_move. This method uses
move.raw_material_production_id.move_finished_ids.
raw_material_production_id is available but not move_finished_ids. The
reason is move_finished_id is not loaded by the web client in the
production form view.
This commit added the one2many (invisible) in the view in order to
get all the information in the compute method.
| -rw-r--r-- | addons/mrp/views/mrp_production_views.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index e38fa0cf9a8..0cbc45636ab 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -177,6 +177,7 @@ <field name="move_raw_ids" context="{'final_lots': show_final_lots, 'tree_view_ref': 'mrp.view_stock_move_raw_tree', 'form_view_ref': 'mrp.view_stock_move_lots', 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'default_state': 'draft', 'default_raw_material_production_id': id, 'default_picking_type_id': picking_type_id}" attrs="{'readonly': ['&', ('state', '!=', 'draft'), ('is_locked', '=', True)]}"/> </page> <page string="Finished Products"> + <field name="move_finished_ids" invisible="1"/> <field name="finished_move_line_ids" context="{'form_view_ref': 'mrp.view_finisehd_move_line'}" attrs="{'readonly': [('is_locked', '=', True)], 'invisible': [('finished_move_line_ids', '=', [])]}"> <tree default_order="done_move" editable="bottom" create="0" delete="0" decoration-muted="state in ('done', 'cancel')"> <field name="product_id" readonly="1"/> |
