summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosse Colpaert <jco@odoo.com>2017-10-09 11:54:00 +0200
committerPierre Masereel <pim@odoo.com>2017-10-12 17:07:22 +0200
commit855a56ba2962ea5e8a5a52c5552de0551157ae85 (patch)
treecb25241c9f8801d76b13832053ec2da35d52719b
parentdf894736175e15822beeb06f96ae38a253998c26 (diff)
[FIX] mrp: lots of component should always be visible in move view of MO
When you open a move of a component in a manufacturing order, we cannot see the move lines and so add a new on if there are no move lines in it with finished lot. We now always display the list of move lines if product is tracked by lot/serial or has finished lots.
-rw-r--r--addons/mrp/views/stock_move_views.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/views/stock_move_views.xml b/addons/mrp/views/stock_move_views.xml
index 879f576f3f9..f1007b8d26b 100644
--- a/addons/mrp/views/stock_move_views.xml
+++ b/addons/mrp/views/stock_move_views.xml
@@ -44,7 +44,7 @@
<field name="finished_lots_exist" invisible="1"/>
</group>
</group>
- <field name="active_move_line_ids" attrs="{'readonly': [('is_locked', '=', True)], 'invisible': [('finished_lots_exist', '=', False)]}" context="{'default_workorder_id': workorder_id, 'default_product_uom_id': product_uom, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_production_id': production_id or raw_material_production_id}">
+ <field name="active_move_line_ids" attrs="{'readonly': [('is_locked', '=', True)], 'invisible': [('has_tracking', '=', 'none'), ('finished_lots_exist', '=', False)]}" context="{'default_workorder_id': workorder_id, 'default_product_uom_id': product_uom, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_production_id': production_id or raw_material_production_id}">
<tree editable="bottom" decoration-success="product_qty==qty_done" decoration-danger="(product_qty &gt; 0) and (qty_done&gt;product_qty)">
<field name="lot_id" attrs="{'column_invisible': [('parent.has_tracking', '=', 'none')]}" domain="[('product_id', '=', parent.product_id)]" context="{'default_product_id': parent.product_id}"/>
<field name="lot_produced_id" options="{'no_open': True, 'no_create': True}" domain="[('id', 'in', parent.order_finished_lot_ids)]" invisible="not context.get('final_lots')"/>