Enforce company of promotion using the sale line company field
This commit is contained in:
1 parent
67e200848d
commit
59a0a8c8a7
1 file changed
+3
-4
@@ -74,12 +74,11 @@ class Line(metaclass=PoolMeta):
|
||||
|
||||
draft_unit_price = fields.Numeric('Draft Unit Price',
|
||||
digits=price_digits, readonly=True)
|
||||
promotion = fields.Many2One('sale.promotion', 'Promotion',
|
||||
promotion = fields.Many2One('sale.promotion', "Promotion",
|
||||
ondelete='RESTRICT',
|
||||
domain=[
|
||||
('company', '=', Eval('_parent_sale', {}).get('company', -1)),
|
||||
],
|
||||
depends={'sale'})
|
||||
('company', '=', Eval('company', -1)),
|
||||
])
|
||||
|
||||
|
||||
class Promotion(
|
||||
|
||||
Reference in new issue
Block a user