[FIX] account_payment_partner: impossible to define if there was no company in partner (#438)

This commit is contained in:
oihane
2018-01-17 22:47:37 +01:00
committed by Thomas Binsfeld
parent dd83b9a80f
commit abc0969932
2 changed files with 3 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Account Payment Partner',
'version': '11.0.1.0.0',
'version': '11.0.1.1.0',
'category': 'Banking addons',
'license': 'AGPL-3',
'summary': 'Adds payment mode on partners and invoices',

View File

@@ -13,14 +13,12 @@ class ResPartner(models.Model):
supplier_payment_mode_id = fields.Many2one(
'account.payment.mode', string='Supplier Payment Mode',
company_dependent=True,
domain="[('payment_type', '=', 'outbound'), "
"('company_id', '=', company_id)]",
domain="[('payment_type', '=', 'outbound')]",
help="Select the default payment mode for this supplier.")
customer_payment_mode_id = fields.Many2one(
'account.payment.mode', string='Customer Payment Mode',
company_dependent=True,
domain="[('payment_type', '=', 'inbound'), "
"('company_id', '=', company_id)]",
domain="[('payment_type', '=', 'inbound')]",
help="Select the default payment mode for this customer.")
@api.model