[IMP] mrp: unbuild should only show lot when product does lot/serial number tracking
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user