15.02.26
This commit is contained in:
@@ -495,6 +495,11 @@ class Line(metaclass=PoolMeta):
|
||||
def default_inherit_cer(cls):
|
||||
return True
|
||||
|
||||
def get_matched_lines(self):
|
||||
if self.lots:
|
||||
LotQt = Pool().get('lot.qt')
|
||||
return LotQt.search([('lot_p','=',self.lots[0].id),('lot_s','>',0)])
|
||||
|
||||
def get_date(self,trigger_event):
|
||||
date = None
|
||||
if self.estimated_date:
|
||||
|
||||
@@ -259,7 +259,6 @@ class ValuationBase(ModelSQL):
|
||||
|
||||
return price_lines
|
||||
|
||||
|
||||
@classmethod
|
||||
def group_fees_by_type_supplier(cls,line,fees):
|
||||
grouped = defaultdict(list)
|
||||
@@ -284,8 +283,11 @@ class ValuationBase(ModelSQL):
|
||||
Date = Pool().get('ir.date')
|
||||
Currency = Pool().get('currency.currency')
|
||||
FeeLots = Pool().get('fee.lots')
|
||||
|
||||
for lot in line.lots or []:
|
||||
#if line is matched with sale_line we should add the open sale side
|
||||
sale_lines = line.get_matched_lines()
|
||||
sale_open_lots = [s.lot_s for s in sale_lines]
|
||||
all_lots = (line.lots or []) + sale_open_lots
|
||||
for lot in all_lots:
|
||||
fl = FeeLots.search([('lot', '=', lot.id)])
|
||||
if not fl:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user