main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 24843ab72d - Show all commits

View File

@@ -246,7 +246,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
"gross_weight": float(round(lot.lot_gross_quantity / factor,5)), "gross_weight": float(round(lot.lot_gross_quantity / factor,5)),
"net_weight": float(round(lot.lot_quantity / factor,5)), "net_weight": float(round(lot.lot_quantity / factor,5)),
"tare_total": float(round(wr.tare_kg * (lot.lot_quantity / weight_total),5)) , "tare_total": float(round(wr.tare_kg * (lot.lot_quantity / weight_total),5)) ,
"bags": int(wr.bales * (lot.lot_quantity / weight_total)), "bags": int(lot.lot_qt),
"surveyor_code": 231, "surveyor_code": 231,
"place_key": 0, "place_key": 0,
"report_date": 20260127 "report_date": 20260127

View File

@@ -1,6 +1,6 @@
import requests import requests
from decimal import getcontext, Decimal, ROUND_HALF_UP from decimal import getcontext, Decimal, ROUND_HALF_UP
from datetime import datetime from datetime import datetime, timedelta
from trytond.model import fields from trytond.model import fields
from trytond.model import ModelSQL, ModelView from trytond.model import ModelSQL, ModelView
from trytond.pool import Pool, PoolMeta from trytond.pool import Pool, PoolMeta
@@ -305,6 +305,7 @@ class AutomationCron(ModelSQL, ModelView):
shipment.bl_number = bl_number shipment.bl_number = bl_number
shipment.bl_date = bl_date shipment.bl_date = bl_date
shipment.etd = etd_date shipment.etd = etd_date
shipment.eta = bl_date + timedelta(days=20)
# Sauvegarder ce shipment uniquement # Sauvegarder ce shipment uniquement
ShipmentIn.save([shipment]) ShipmentIn.save([shipment])