From 765d526c169a8aa181378836e27fb1564c8aaf10 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Mon, 26 Jan 2026 21:31:31 +0100 Subject: [PATCH] 26.01.26 --- modules/automation/automation.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/modules/automation/automation.py b/modules/automation/automation.py index aa5471c..3dbaa3c 100644 --- a/modules/automation/automation.py +++ b/modules/automation/automation.py @@ -234,6 +234,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): logger.info("ROWS:%s",rows) if rows: for row in rows: + logger.info("ROW:%s",row) #Purchase & Sale creation LotQt = Pool().get('lot.qt') LotAdd = Pool().get('lot.add.line') @@ -244,19 +245,19 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): Sale = Pool().get('sale.sale') SaleLine = Pool().get('sale.line') - dec_key = str(rows[0][16]).strip() - lot_unit = str(rows[0][5]).strip().lower() - product = str(rows[0][6]).strip().upper() - lot_net_weight = Decimal(rows[0][4]) - lot_gross_weight = Decimal(rows[0][3]) - lot_bales = int(rows[0][2]) - lot_number = rows[0][1] - customer = str(rows[0][7]).strip().upper() - sell_price_currency = str(rows[0][8]).strip().upper() - sell_price_unit = str(rows[0][9]).strip().lower() - sell_price = Decimal(rows[0][10]) - premium = Decimal(rows[0][14]) - reference = Decimal(rows[0][15]) + dec_key = str(row[16]).strip() + lot_unit = str(row[5]).strip().lower() + product = str(row[6]).strip().upper() + lot_net_weight = Decimal(row[4]) + lot_gross_weight = Decimal(row[3]) + lot_bales = int(row[2]) + lot_number = row[1] + customer = str(row[7]).strip().upper() + sell_price_currency = str(row[8]).strip().upper() + sell_price_unit = str(row[9]).strip().lower() + sell_price = Decimal(row[10]) + premium = Decimal(row[14]) + reference = Decimal(row[15]) declaration = SaleLine.search(['note','=',dec_key]) if declaration: