[IMP] mrp: unbuild should only show lot when product does lot/serial number tracking

This commit is contained in:
Josse Colpaert
2016-08-30 14:16:09 +02:00
parent 5f39f7ca89
commit 104ef28a8d
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -39,6 +39,7 @@ class MrpUnbuild(models.Model):
'stock.production.lot', 'Lot',
domain="[('product_id', '=', product_id)]",
states={'done': [('readonly', True)]})
has_tracking=fields.Selection(related='product_id.tracking', readonly=True)
location_id = fields.Many2one(
'stock.location', 'Location',
default=_get_default_location_id,
+2 -1
View File
@@ -76,7 +76,8 @@
<field name="mo_id"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
<field name="lot_id" groups="stock.group_production_lot"/>
<field name="has_tracking" invisible="1"/>
<field name="lot_id" attrs="{'invisible': [('has_tracking', '=', 'none')]}" groups="stock.group_production_lot"/>
</group>
</group>
</sheet>