02.04.26
This commit is contained in:
@@ -352,19 +352,25 @@ class Sale(metaclass=PoolMeta):
|
||||
return ''
|
||||
|
||||
@property
|
||||
def report_nb_bale(self):
|
||||
text_bale = 'NB BALES: '
|
||||
nb_bale = 0
|
||||
if self.lines:
|
||||
for line in self.lines:
|
||||
if line.lots:
|
||||
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
|
||||
def report_nb_bale(self):
|
||||
text_bale = 'NB BALES: '
|
||||
nb_bale = 0
|
||||
if self.lines:
|
||||
for line in self.lines:
|
||||
if line.lots:
|
||||
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_crop_name(self):
|
||||
if self.crop:
|
||||
return self.crop.name or ''
|
||||
return ''
|
||||
|
||||
@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:
|
||||
''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user