diff --git a/addons/l10n_ar_website_sale/__init__.py b/addons/l10n_ar_website_sale/__init__.py index 2e55169e4f2..4dcc9d3a4b7 100644 --- a/addons/l10n_ar_website_sale/__init__.py +++ b/addons/l10n_ar_website_sale/__init__.py @@ -1,2 +1,3 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import controllers +from . import models diff --git a/addons/l10n_ar_website_sale/models/__init__.py b/addons/l10n_ar_website_sale/models/__init__.py new file mode 100644 index 00000000000..dea4837b2a9 --- /dev/null +++ b/addons/l10n_ar_website_sale/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import website diff --git a/addons/l10n_ar_website_sale/models/website.py b/addons/l10n_ar_website_sale/models/website.py new file mode 100644 index 00000000000..18c6fed9dfe --- /dev/null +++ b/addons/l10n_ar_website_sale/models/website.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models + + +class Website(models.Model): + _inherit = "website" + + def _display_partner_b2b_fields(self): + """ Argentinean localization must always display b2b fields """ + self.ensure_one() + return self.company_id.country_id.code == "AR" or super()._display_partner_b2b_fields() diff --git a/addons/l10n_ar_website_sale/views/templates.xml b/addons/l10n_ar_website_sale/views/templates.xml index 572bca41d2a..e9cb6840582 100644 --- a/addons/l10n_ar_website_sale/views/templates.xml +++ b/addons/l10n_ar_website_sale/views/templates.xml @@ -43,7 +43,7 @@ -