11.03.26
This commit is contained in:
@@ -303,6 +303,25 @@ class Sale(metaclass=PoolMeta):
|
||||
nb_bale += sum([l.lot_qt for l in line.lots if l.lot_type == 'physic'])
|
||||
return text_bale + str(int(nb_bale))
|
||||
|
||||
@property
|
||||
def report_deal(self):
|
||||
if self.lines and self.lines[0].lots and len(self.lines[0].lots)>1:
|
||||
return self.lines[0].lots[1].line.purchase.number + ' ' + self.number
|
||||
else:
|
||||
''
|
||||
|
||||
@property
|
||||
def report_packing(self):
|
||||
nb_packing = 0
|
||||
unit = ''
|
||||
if self.lines:
|
||||
for line in self.lines:
|
||||
if line.lots:
|
||||
nb_packing += sum([l.lot_qt for l in line.lots if l.lot_type == 'physic'])
|
||||
if len(line.lots)>1:
|
||||
unit = line.lots[1].lot_unit_line.name
|
||||
return str(int(nb_packing)) + unit
|
||||
|
||||
@property
|
||||
def report_price(self):
|
||||
if self.lines:
|
||||
|
||||
Reference in New Issue
Block a user