Skip to content

Commit

Permalink
[FIX] pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RPSJR committed Sep 29, 2024
1 parent f1f1dd0 commit c30b35c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion l10n_br_nfe/wizards/import_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def _prepare_imported_product_values(self, product):
taxes = self._get_taxes_from_xml_product(product)
supplier_id = self._search_product_supplier_by_product_code(product.prod.cProd)
product_id = self._match_product(product.prod)
# if self.fiscal_operation_type == "in" and product_id and product_id.purchase_ok:
# if self.fiscal_operation_type == "in" and _
# product_id and product_id.purchase_ok:
if False: # seems former test is always true after you
# imported the product once -> it screws the UOM.
uom_id = product_id.uom_po_id
Expand Down
6 changes: 3 additions & 3 deletions spec_driven_model/models/spec_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ def _build_attr(self, node, fields, vals, path, attr):
comodel_vals = comodel.build_attrs(value, path=child_path)
child_defaults = self._extract_related_values(vals, key)

new_value.update(child_defaults)
self._build_many2one(comodel, vals, new_value, key, value, child_path)
comodel_vals.update(child_defaults)
self._build_many2one(comodel, vals, comodel_vals, key, value, child_path)

@api.model
def _build_string_not_simple_type(self, key, vals, value, node):
vals[key] = value

@api.model
def _build_many2one(self, comodel, vals, new_value, key, value, path):
def _build_many2one(self, comodel, vals, comodel_vals, key, value, path):
if comodel._name == self._name:
# stacked m2o
vals.update(comodel_vals)
Expand Down

0 comments on commit c30b35c

Please sign in to comment.