Skip to content
Snippets Groups Projects
Commit 4475610b authored by Josse Colpaert's avatar Josse Colpaert
Browse files

[FIX] mrp: only show produce button when not done, product readonly in produce...

[FIX] mrp: only show produce button when not done, product readonly in produce wizard and move_id necessary to make onchanges work
parent 841c1c3a
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,8 @@
<button name="button_mark_done" attrs="{'invisible': [('check_to_done', '=', False)]}" string="Mark as Done" type="object" class="oe_highlight"/>
<button name="action_assign" attrs="{'invisible': [('availability', 'in', ('assigned', 'none'))]}" string="Check availability" type="object" class="oe_highlight"/>
<button name="button_plan" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('routing_id', '=', False)]}" type="object" string="Create Workorders" class="oe_highlight"/>
<button name="%(act_mrp_product_produce)d" attrs="{'invisible': ['|', '|', ('availability', 'not in', ['partially_available', 'assigned']), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="action" class="oe_highlight"/>
<button name="%(act_mrp_product_produce)d" attrs="{'invisible': ['|', '|', ('availability', '!=', 'waiting'), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="action"/>
<button name="%(act_mrp_product_produce)d" attrs="{'invisible': ['|', '|', '|', ('check_to_done', '=', True), ('availability', 'not in', ['partially_available', 'assigned']), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="action" class="oe_highlight"/>
<button name="%(act_mrp_product_produce)d" attrs="{'invisible': ['|', '|', '|', ('check_to_done', '=', True), ('availability', '!=', 'waiting'), ('state', 'not in', ('confirmed','progress')), ('routing_id', '!=', False)]}" string="Produce" type="action"/>
<button name="post_inventory" string="Post Inventory" type="object" class="oe_highlight" attrs="{'invisible': [('post_visible', '=', False)]}"/>
<button name="action_cancel" type="object" string="Cancel" attrs="{'invisible': ['|', ('state', 'in', ('done','cancel')), ('check_to_done', '=', True)]}"/>
<button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', ('availability', '=', 'none'), ('state', 'in', ('cancel'))]}"/>
......
......@@ -157,6 +157,7 @@
<field name="quantity" readonly="1"/>
<field name="lot_id" context="{'default_product_id': product_id}"/>
<field name="quantity_done"/>
<field name="move_id" invisible="1"/>
<field name="done_wo" invisible="1"/>
</tree>
</field>
......
......@@ -10,7 +10,7 @@
<group>
<field name="serial" invisible="1"/>
<field name="production_id" invisible="1"/>
<field name="product_id"/>
<field name="product_id" readonly="1"/>
<label for="product_qty"/>
<div class="o_row">
<field name="product_qty" attrs="{'readonly': [('serial', '=', True)]}"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment