[FIX] mrp: User with no products write access cannot create production order
As the product_tmpl_id field is related one but not readonly, the creation of production order triggers a write on product.product model
This commit is contained in:
committed by
Nicolas Martinelli
parent
258eaa7a3c
commit
8a6162d00d
@@ -53,7 +53,7 @@ class MrpProduction(models.Model):
|
||||
domain=[('type', 'in', ['product', 'consu'])],
|
||||
readonly=True, required=True,
|
||||
states={'confirmed': [('readonly', False)]})
|
||||
product_tmpl_id = fields.Many2one('product.template', 'Product Template', related='product_id.product_tmpl_id')
|
||||
product_tmpl_id = fields.Many2one('product.template', 'Product Template', related='product_id.product_tmpl_id', readonly=True)
|
||||
product_qty = fields.Float(
|
||||
'Quantity To Produce',
|
||||
default=1.0, digits=dp.get_precision('Product Unit of Measure'),
|
||||
|
||||
Reference in New Issue
Block a user