Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deltatech_sale_xls/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Deltatech Sale XLS",
"summary": "Import/export sale line from/to Excel",
"author": "Terrabit, Voicu Stefan",
"version": "19.0.1.0.0",
"version": "19.0.1.0.1",
"license": "OPL-1",
"website": "https://www.terrabit.ro",
"category": "Sales",
Expand Down
6 changes: 3 additions & 3 deletions deltatech_sale_xls/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def load(self, fields, data):
order = self.env["sale.order"].browse(order_id)

if not order:
order_index = fields.index.get("order_id", False)
if order_index:
order_index = fields.index("order_id") if "order_id" in fields else False
if order_index is not False:
order_id = data[0][order_index]
order = self.env["sale.order"].browse(order_id)

Expand All @@ -73,7 +73,7 @@ def load(self, fields, data):
record.append("")

if product_index != -1:
for record in data:
for record in list(data):
product_name = record[product_index]
product = self.env["product.product"]
# extrage codul din numele produsului care este intre paranteze []
Expand Down
8 changes: 8 additions & 0 deletions deltatech_sale_xls/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 19.0.1.0.1

- [FIX] `sale.order.line.load()` raised `AttributeError` when importing
without `default_order_id`/`active_id` in context (`fields.index` is a
list method, not a dict)
- [FIX] iterating over `data` while calling `data.remove(record)` skipped
the record right after a removed one, so some unmatched lines silently
passed validation
Loading