From 77bcea4f63c8b8e9a3ba20c964a066b8b33989fe Mon Sep 17 00:00:00 2001 From: Magno Costa Date: Wed, 25 Oct 2023 16:13:29 -0300 Subject: [PATCH] [REF] l10n_br_zip: Remove empty Lines, necessary for the new version of pre-commit. --- l10n_br_zip/models/l10n_br_zip.py | 4 ---- l10n_br_zip/wizard/l10n_br_zip_search.py | 1 - 2 files changed, 5 deletions(-) diff --git a/l10n_br_zip/models/l10n_br_zip.py b/l10n_br_zip/models/l10n_br_zip.py index a55f027a0df9..c7a8f68c13d2 100644 --- a/l10n_br_zip/models/l10n_br_zip.py +++ b/l10n_br_zip/models/l10n_br_zip.py @@ -166,7 +166,6 @@ def _consultar_cep(self, zip_code): @api.model def zip_search(self, obj): - try: domain = self._set_domain( country_id=obj.country_id.id, @@ -188,12 +187,10 @@ def zip_search(self, obj): # More than one ZIP was found elif len(zips) > 1: - return self.create_wizard(obj, zips) # Address not found in local DB, search by PyCEP-Correios elif not zips and obj.zip: - cep_values = self._consultar_cep(obj.zip) if cep_values: @@ -203,7 +200,6 @@ def zip_search(self, obj): return True def create_wizard(self, obj, zips): - context = dict(self.env.context) context.update({"address_id": obj.id, "object_name": obj._name}) diff --git a/l10n_br_zip/wizard/l10n_br_zip_search.py b/l10n_br_zip/wizard/l10n_br_zip_search.py index 4509633f715b..5399a17a0989 100644 --- a/l10n_br_zip/wizard/l10n_br_zip_search.py +++ b/l10n_br_zip/wizard/l10n_br_zip_search.py @@ -66,7 +66,6 @@ def default_get(self, fields_list): return data def zip_search(self): - self.ensure_one() data = self obj_zip = self.env["l10n_br.zip"]