diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py
index 4482b4e1c4c..af8d0105877 100644
--- a/addons/account/models/partner.py
+++ b/addons/account/models/partner.py
@@ -394,7 +394,8 @@ class ResPartner(models.Model):
required=True)
property_account_position_id = fields.Many2one('account.fiscal.position', company_dependent=True,
string="Fiscal Position",
- help="The fiscal position will determine taxes and accounts used for the partner.", oldname="property_account_position")
+ help="The fiscal position will determine taxes and accounts used for the partner.", oldname="property_account_position",
+ domain="[('company_id', 'in', [company_id, False])]")
property_payment_term_id = fields.Many2one('account.payment.term', company_dependent=True,
string='Customer Payment Terms',
help="This payment term will be used instead of the default one for sales orders and customer invoices", oldname="property_payment_term")
@@ -441,3 +442,8 @@ class ResPartner(models.Model):
action['domain'] = literal_eval(action['domain'])
action['domain'].append(('partner_id', 'child_of', self.id))
return action
+
+ @api.onchange('company_id')
+ def _onchange_company_id(self):
+ if self.company_id:
+ return {'domain': {'property_account_position_id': [('company_id', 'in', [self.company_id.id, False])]}}
diff --git a/addons/account/views/partner_view.xml b/addons/account/views/partner_view.xml
index 2ef70980294..d944200a8b8 100644
--- a/addons/account/views/partner_view.xml
+++ b/addons/account/views/partner_view.xml
@@ -95,6 +95,7 @@
+