[IMP] stock: scrap only stockable and consumable
You can only scrap stockable products and consumable ones, so we've added a domain on product_id. TASK-ID: 1838954
This commit is contained in:
committed by
Pierre Masereel
parent
6ffda36229
commit
3d94d82aff
@@ -26,7 +26,7 @@ class StockScrap(models.Model):
|
||||
states={'done': [('readonly', True)]})
|
||||
origin = fields.Char(string='Source Document')
|
||||
product_id = fields.Many2one(
|
||||
'product.product', 'Product',
|
||||
'product.product', 'Product', domain=[('type', 'in', ['product', 'consu'])],
|
||||
required=True, states={'done': [('readonly', True)]})
|
||||
product_uom_id = fields.Many2one(
|
||||
'uom.uom', 'Unit of Measure',
|
||||
|
||||
Reference in New Issue
Block a user