This commit is contained in:
2026-01-26 21:31:31 +01:00
parent e71c6b14d0
commit 765d526c16

View File

@@ -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: