From ea485a3879da00bbc0f5665b1fb8afba67f4751f Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 13 Oct 2023 10:58:14 +0200 Subject: [PATCH] [15.0][FIX]website_account_fiscal_position_partner_type: Translated account fiscal positions in portal --- .../controllers/main.py | 6 ++++-- .../controllers/portal.py | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/website_account_fiscal_position_partner_type/controllers/main.py b/website_account_fiscal_position_partner_type/controllers/main.py index cbbba80934..ac97fd4b53 100644 --- a/website_account_fiscal_position_partner_type/controllers/main.py +++ b/website_account_fiscal_position_partner_type/controllers/main.py @@ -78,7 +78,9 @@ def address(self, **kw): { "def_fiscpostype": def_fiscpostype, "fiscpostypevalues": dict( - afp_obj._fields["fiscal_position_type"].selection + afp_obj._fields[ + "fiscal_position_type" + ]._description_selection(request.env) ), } ) @@ -93,7 +95,7 @@ def get_auth_signup_qcontext(self): ) afp_obj = request.env["account.fiscal.position"].sudo() qcontext["fiscpostypevalues"] = dict( - afp_obj._fields["fiscal_position_type"].selection + afp_obj._fields["fiscal_position_type"]._description_selection(request.env) ) if not qcontext.get("fiscal_position_type_selected"): def_fiscpostype = ( diff --git a/website_account_fiscal_position_partner_type/controllers/portal.py b/website_account_fiscal_position_partner_type/controllers/portal.py index ca0b6c085a..e3e6ce1ccf 100644 --- a/website_account_fiscal_position_partner_type/controllers/portal.py +++ b/website_account_fiscal_position_partner_type/controllers/portal.py @@ -36,7 +36,9 @@ def _prepare_portal_layout_values(self): vals.update( { "fiscpostypevalues": dict( - afp_obj._fields["fiscal_position_type"].selection + afp_obj._fields["fiscal_position_type"]._description_selection( + request.env + ) ), "fiscal_position_type_selected": partner.fiscal_position_type, }