[FIX] account_payment_partner: Fix multi-company issues

Make payment_mode fields limited to the correct company

TT28906
This commit is contained in:
João Marques
2021-03-26 07:00:30 +00:00
committed by Thomas Binsfeld
parent 92cd1d7e15
commit e16214cc8b

View File

@@ -11,12 +11,14 @@ class ResPartner(models.Model):
supplier_payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode",
company_dependent=True,
check_company=True,
domain="[('payment_type', '=', 'outbound')]",
help="Select the default payment mode for this supplier.",
)
customer_payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode",
company_dependent=True,
check_company=True,
domain="[('payment_type', '=', 'inbound')]",
help="Select the default payment mode for this customer.",
)