From 5296fa10a1b70f89ee1ad6608b27a818595b58f9 Mon Sep 17 00:00:00 2001 From: kaynnan Date: Wed, 30 Oct 2024 13:32:41 -0300 Subject: [PATCH] [IMP] l10n_br_fiscal: Add onchange for service type in Document Line Mixin --- l10n_br_fiscal/models/document_line_mixin_methods.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/l10n_br_fiscal/models/document_line_mixin_methods.py b/l10n_br_fiscal/models/document_line_mixin_methods.py index abbe24f0be96..902d55cc635d 100644 --- a/l10n_br_fiscal/models/document_line_mixin_methods.py +++ b/l10n_br_fiscal/models/document_line_mixin_methods.py @@ -901,6 +901,11 @@ def _onchange_city_taxation_code_id(self): if self.city_taxation_code_id.city_id: self.update({"issqn_fg_city_id": self.city_taxation_code_id.city_id}) + @api.onchange("service_type_id") + def _onchange_service_type_id(self): + if self.service_type_id: + self._onchange_fiscal_operation_id() + @api.model def _add_fields_to_amount(self): fields_to_amount = ["insurance_value", "other_value", "freight_value"]