Eval company or -1 in context m2o fields

#163427
This commit is contained in:
Raimon Esteve 2023-11-16 07:23:16 +01:00
parent e0b7c3ed2f
commit 6a9db29e20

View file

@ -26,7 +26,7 @@ class PartyAccountPaymentType(CompanyValueMixin, ModelSQL):
party = fields.Many2One('party.party', 'Party', ondelete='CASCADE',
context={
'company': Eval('company'),
'company': Eval('company', -1),
}, depends=['company'])
customer_payment_type = customer_payment_type
supplier_payment_type = supplier_payment_type