diff --git a/addons/sales_team/tests/common.py b/addons/sales_team/tests/common.py index be57aebe14e..32709b1ddc4 100644 --- a/addons/sales_team/tests/common.py +++ b/addons/sales_team/tests/common.py @@ -84,7 +84,7 @@ class TestSalesMC(TestSalesCommon): cls.company_2 = cls.env['res.company'].create({ 'name': 'New Test Company', 'email': 'company.2@test.example.com', - 'country_id': cls.env.ref('base.fr'), + 'country_id': cls.env.ref('base.fr').id, }) cls.team_c2 = cls.env['crm.team'].create({ 'name': 'C2 Team1', diff --git a/addons/sales_team/tests/test_sales_team.py b/addons/sales_team/tests/test_sales_team.py index 0ff999789c8..77b7c31b5d2 100644 --- a/addons/sales_team/tests/test_sales_team.py +++ b/addons/sales_team/tests/test_sales_team.py @@ -16,7 +16,7 @@ class TestDefaultTeam(TestSalesCommon): cls.company_2 = cls.env['res.company'].create({ 'name': 'New Test Company', 'email': 'company.2@test.example.com', - 'country_id': cls.env.ref('base.fr'), + 'country_id': cls.env.ref('base.fr').id, }) cls.team_c2 = cls.env['crm.team'].create({ 'name': 'C2 Team1', diff --git a/odoo/addons/base/models/res_company.py b/odoo/addons/base/models/res_company.py index 2f2a8e93128..3ab5758ce0c 100644 --- a/odoo/addons/base/models/res_company.py +++ b/odoo/addons/base/models/res_company.py @@ -210,6 +210,7 @@ class Company(models.Model): 'phone': vals.get('phone'), 'website': vals.get('website'), 'vat': vals.get('vat'), + 'country_id': vals.get('country_id'), }) # compute stored fields, for example address dependent fields partner.flush()