Add company domain

#072785
This commit is contained in:
Raimon Esteve 2023-02-20 12:08:24 +01:00
parent c5f34e3c0f
commit 7d66e83bae
1 changed files with 4 additions and 2 deletions

View File

@ -20,12 +20,14 @@ class Sale(metaclass=PoolMeta):
class Invoice(metaclass=PoolMeta):
__name__ = 'account.invoice'
shop = fields.Many2One('sale.shop', 'Shop',
shop = fields.Many2One('sale.shop', 'Shop', domain=[
('company', '=', Eval('company')),
],
states={
'readonly': ((Eval('state') != 'draft')
| (Eval('lines', [0]) & Eval('currency'))),
},
depends=['type', 'state'])
depends=['type', 'state', 'company'])
@classmethod
def __register__(cls, module_name):