Skip to content

Commit d1c9d3a

Browse files
committed
[IMP] with tag and supplier_min_qty
1 parent b13621a commit d1c9d3a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

import_helper_generic/wizards/import_helper_generic.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,22 @@ def product_import_generic(self):
297297
vals["standard_price"]
298298
)
299299
p.write(vals)
300-
continue
301-
elif template and vals.get("default_code") in speedy_product_template_list:
302-
record = self.env["product.template"].browse(speedy_product_template_list[vals["default_code"]])
300+
continue
301+
elif (
302+
template
303+
and vals.get("default_code") in speedy_product_template_list
304+
):
305+
record = self.env["product.template"].browse(
306+
speedy_product_template_list[vals["default_code"]]
307+
)
303308
if record and not vals["location_id"]:
304309
vals["location_id"] = record.location_id
305-
vals = import_obj._prepare_product_vals(vals, vals["location_id"], speedy)
310+
vals = import_obj._prepare_product_vals(
311+
vals, vals["location_id"], speedy
312+
)
306313
res = record.write(vals)
307314
if res:
315+
logger.info(f"Update {res.name} {res.id} Ok")
308316
continue
309317
else:
310318
logger.warning("ERREUR lors de la mise a jour du product")

0 commit comments

Comments
 (0)