[FIX] mrp: change lots in produce

- Create Products A and B, tracked by unique serial number.
- Receive some quantity of B.
- Create a BOM for A which uses 1 unit of B.
- Create a MO for 2 units of A, save and check availability.
- Click on the 'Produce' button.
- Change the suggested lot (choose a new one or create), then click on
  the '+' button.

When the wizard is reloaded, the lot chosen is lost.

We reach an exception in the framework: when clicking on the '+' button,
no `create` is performed on the transient model `mrp.product.produce`,
therefore the values are not saved.

Since this use case is an exception and is likely to lead to errors, we
remove the button.

opw-761044
This commit is contained in:
Nicolas Martinelli
2017-08-23 10:17:49 +02:00
parent 00125215f7
commit b3590bc58e
@@ -29,8 +29,6 @@
<field name="quantity_done"/>
<field name="lot_id" context="{'default_product_id': product_id}"/>
<field name="move_id" invisible="1"/>
<button name="do_minus" type="object" icon="fa-minus-square" attrs="{'invisible': [('quantity_done', '&lt;=', 0.99)]}" invisible="context.get('state_done')"/>
<button name="do_plus" type="object" icon="fa-plus-square" attrs="{'invisible': [('plus_visible', '=', False)]}" invisible="context.get('state_done')"/>
</tree>
</field>
</group>