diff --git a/partner_company_type/models/res_partner_company_type.py b/partner_company_type/models/res_partner_company_type.py index d2c231b64..652bb4a49 100644 --- a/partner_company_type/models/res_partner_company_type.py +++ b/partner_company_type/models/res_partner_company_type.py @@ -18,6 +18,13 @@ class ResPartnerCompanyType(models.Model): string='Abbreviation', translate=True, ) + country_id = fields.Many2one( + comodel_name="res.country", + string="Country", + help="Allows this company type to be selected on partners from this " + "country only. " + "Leave it blank if you want it to appear on any partner.", + ) _sql_constraints = [('name_uniq', 'unique (name)', "Partner Company Type already exists!")] diff --git a/partner_company_type/readme/CONTRIBUTORS.rst b/partner_company_type/readme/CONTRIBUTORS.rst index 29d62af95..f1f714e0d 100644 --- a/partner_company_type/readme/CONTRIBUTORS.rst +++ b/partner_company_type/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Denis Roussel (https://acsone.eu) * Gilles Meyomesse (https://acsone.eu) +* Quentin Groulard (https://acsone.eu) diff --git a/partner_company_type/views/res_partner.xml b/partner_company_type/views/res_partner.xml index c5a4d2790..deadf4d38 100644 --- a/partner_company_type/views/res_partner.xml +++ b/partner_company_type/views/res_partner.xml @@ -10,6 +10,7 @@ diff --git a/partner_company_type/views/res_partner_company_type.xml b/partner_company_type/views/res_partner_company_type.xml index 17d7e711c..311a2430f 100644 --- a/partner_company_type/views/res_partner_company_type.xml +++ b/partner_company_type/views/res_partner_company_type.xml @@ -11,6 +11,7 @@ + @@ -33,6 +34,7 @@ +