[FIX] mrp: apply text decoration properly

When the MO is done, the reserved quantity on stock move is equal to 0
and decoration-success, decoration-danger, decoration-muted are all set
on the class. That implies an uncertain result.

This commit clarify the situation by applying
- decoration-muted if the MO is done
- success, danger or none otherwise

Related to task: #1862299
This commit is contained in:
Mohammed Shekha
2018-08-16 10:05:30 +02:00
committed by Arnold Moyaux
parent dabe59df9c
commit 16d17c5fb6
+1 -1
View File
@@ -113,7 +113,7 @@
<notebook>
<page string="Consumed Materials">
<field name="move_raw_ids" context="{'final_lots': show_final_lots, 'form_view_ref': 'mrp.view_stock_move_lots', 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'default_state': 'confirmed', 'default_raw_material_production_id': id}" attrs="{'readonly': [('is_locked', '=', True)]}">
<tree delete="0" default_order="is_done,sequence" decoration-muted="is_done" decoration-warning="quantity_done&gt;product_uom_qty" decoration-success="quantity_done==product_uom_qty" decoration-danger="reserved_availability &lt; product_uom_qty">
<tree delete="0" default_order="is_done,sequence" decoration-muted="is_done" decoration-warning="quantity_done&gt;product_uom_qty" decoration-success="not is_done and quantity_done==product_uom_qty" decoration-danger="not is_done and reserved_availability &lt; product_uom_qty">
<field name="product_id" required="1"/>
<field name="name" invisible="1"/>
<field name="unit_factor" invisible="1"/>