This commit is contained in:
2026-03-11 21:27:43 +01:00
parent b23dba865f
commit 2fba795b11
4 changed files with 34 additions and 14 deletions

View File

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

View File

@@ -36,8 +36,8 @@ this repository contains the full copyright notices and license terms. -->
<label name="incoterm_location"/>
<field name="incoterm_location"/>
<newline/>
<label name="origin"/>
<field name="origin"/>
<label name="product_origin"/>
<field name="product_origin"/>
</xpath>
<xpath expr="/form/notebook/page[@id='sale']" position="after">
<page string="Derivative" col="4" id="der">