diff --git a/l10n_br_base/models/res_company.py b/l10n_br_base/models/res_company.py index 339d32e2d594..49643df259a3 100644 --- a/l10n_br_base/models/res_company.py +++ b/l10n_br_base/models/res_company.py @@ -26,6 +26,7 @@ def _get_company_address_field_names(self): "suframa", "state_tax_number_ids", "street_number", + "street_name", ] def _inverse_legal_name(self): @@ -38,6 +39,11 @@ def _inverse_district(self): for company in self: company.partner_id.district = company.district + def _inverse_street_name(self): + """Write the l10n_br specific functional fields.""" + for company in self: + company.partner_id.street_name = company.street_name + def _inverse_street_number(self): """Write the l10n_br specific functional fields.""" for company in self: @@ -88,6 +94,11 @@ def _inverse_suframa(self): inverse="_inverse_district", ) + street_name = fields.Char( + compute="_compute_address", + inverse="_inverse_street_name", + ) + street_number = fields.Char( compute="_compute_address", inverse="_inverse_street_number",