This commit is contained in:
2026-03-11 22:12:38 +01:00
parent 4a14a78f78
commit 6d06125360
2 changed files with 67 additions and 20 deletions

View File

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