diff --git a/modules/lot/lot.py b/modules/lot/lot.py
index 3453fb9..92ce710 100755
--- a/modules/lot/lot.py
+++ b/modules/lot/lot.py
@@ -515,6 +515,12 @@ class Lot(ModelSQL, ModelView):
unit = self.line.unit if self.line else self.sale_line.unit
qt, gross_qt = self.get_hist_quantity(state_id)
return round(Decimal(Uom.compute_qty(self.lot_unit_line, float(qt), unit)),5)
+
+ def get_current_gross_quantity_converted(self,state_id=0,name=None):
+ Uom = Pool().get('product.uom')
+ unit = self.line.unit if self.line else self.sale_line.unit
+ qt, gross_qt = self.get_hist_quantity(state_id)
+ return round(Decimal(Uom.compute_qty(self.lot_unit_line, float(gross_qt), unit)),5)
def get_current_gross_quantity(self,name=None):
if self.lot_type == 'physic':
diff --git a/modules/purchase_trade/sale.py b/modules/purchase_trade/sale.py
index 23eac5e..61ad850 100755
--- a/modules/purchase_trade/sale.py
+++ b/modules/purchase_trade/sale.py
@@ -260,7 +260,7 @@ class Sale(metaclass=PoolMeta):
our_reference = fields.Char("Our Reference")
company_visible = fields.Function(fields.Boolean("Visible"),'get_company_info')
lc_date = fields.Date("LC date")
- origin = fields.Char("Origin")
+ product_origin = fields.Char("Origin")
def get_company_info(self,name):
return (self.company.party.name == 'MELYA')
@@ -271,6 +271,20 @@ class Sale(metaclass=PoolMeta):
return self.lines[0].note
else:
return ''
+
+ @property
+ def report_gross(self):
+ if self.lines:
+ return sum([l.get_current_gross_quantity_converted() for l in self.lines if l.lot_type == 'physic'])
+ else:
+ return ''
+
+ @property
+ def report_net(self):
+ if self.lines:
+ return sum([l.get_current_quantity_converted() for l in self.lines if l.lot_type == 'physic'])
+ else:
+ return ''
@property
def report_qt(self):
diff --git a/modules/purchase_trade/view/sale_form.xml b/modules/purchase_trade/view/sale_form.xml
index e21eb08..83e64d1 100755
--- a/modules/purchase_trade/view/sale_form.xml
+++ b/modules/purchase_trade/view/sale_form.xml
@@ -36,8 +36,8 @@ this repository contains the full copyright notices and license terms. -->
-
-
+
+
diff --git a/modules/sale/sale_final.fodt b/modules/sale/sale_final.fodt
index f870ea8..e5352dd 100644
--- a/modules/sale/sale_final.fodt
+++ b/modules/sale/sale_final.fodt
@@ -1,24 +1,24 @@
- LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265Aksel Kamhi2026-03-11T17:00:00Z2026-03-11T21:12:58.8880000002025-12-11T15:32:00Z4PT13M29S0x010100C9130B1D3286474FB2D468C22F52A7B0
+ LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265Aksel Kamhi2026-03-11T17:00:00Z2026-03-11T21:21:43.3080000002025-12-11T15:32:00Z5PT15M42S0x010100C9130B1D3286474FB2D468C22F52A7B0
- 46835
+ 68883
0
24236
- 11721
+ 12222
true
false
view2
- 13460
- 52096
+ 6073
+ 75166
0
- 46835
+ 68883
24234
- 58554
+ 81104
0
0
false
@@ -91,7 +91,7 @@
false
false
false
- 1932100
+ 1984380
1803951
false
false
@@ -158,7 +158,7 @@
-
+
@@ -2488,8 +2488,8 @@
- Net weight: <sale.total_net_weight or ''>
- Gross weight: <sale.total_gross_weight or ''>
+ Net weight: <sale.report_net or ''>
+ Gross weight: <sale.report_gross or ''>
Packaging: <sale.comment or ''>