11.03.26
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user