Prevent changing party, template and product on product supplier

Closes #12607
This commit is contained in:
Maxime Richez
2023-10-26 22:53:18 +02:00
parent 5774bd2c32
commit b6db068130
+9
View File
@@ -330,6 +330,9 @@ class ProductSupplier(
()),
If(Eval('active'), ('active', '=', True), ()),
],
states={
'readonly': Eval('id', -1) >= 0,
},
context={
'company': Eval('company', -1),
},
@@ -342,12 +345,18 @@ class ProductSupplier(
()),
If(Eval('active'), ('active', '=', True), ()),
],
states={
'readonly': Eval('id', -1) >= 0,
},
context={
'company': Eval('company', -1),
},
depends={'company'})
party = fields.Many2One(
'party.party', 'Supplier', required=True, ondelete='CASCADE',
states={
'readonly': Eval('id', -1) >= 0,
},
context={
'company': Eval('company', -1),
},