04.02.26
This commit is contained in:
@@ -100,7 +100,7 @@ class Fee(ModelSQL,ModelView):
|
||||
if lqt:
|
||||
return lqt[0].id
|
||||
|
||||
@fields.depends('auto_calculation','mode','_parent_line.unit','_parent_line.lots','_parent_sale_line.unit','_parent_sale_line.lots','_parent_shipment_in.id')
|
||||
@fields.depends('unit','auto_calculation','mode','_parent_line.unit','_parent_line.lots','_parent_sale_line.unit','_parent_sale_line.lots','_parent_shipment_in.id')
|
||||
def on_change_with_quantity(self, name=None):
|
||||
qt = None
|
||||
line = self.line
|
||||
@@ -108,7 +108,7 @@ class Fee(ModelSQL,ModelView):
|
||||
line = self.sale_line
|
||||
if line:
|
||||
if line.lots:
|
||||
qt = sum([e.get_current_quantity_converted() for e in line.lots])
|
||||
qt = sum([e.get_current_quantity() for e in line.lots])
|
||||
if not qt:
|
||||
LotQt = Pool().get('lot.qt')
|
||||
lqts = LotQt.search(['lot_shipment_in','=',self.shipment_in.id])
|
||||
@@ -119,7 +119,7 @@ class Fee(ModelSQL,ModelView):
|
||||
else:
|
||||
if self.auto_calculation:
|
||||
return Decimal(int(qt/Decimal(self.unit.factor)))
|
||||
|
||||
|
||||
@fields.depends('mode','_parent_line.lots','_parent_sale_line.lots')
|
||||
def on_change_with_unit(self, name=None):
|
||||
if self.mode != 'ppack':
|
||||
@@ -133,7 +133,7 @@ class Fee(ModelSQL,ModelView):
|
||||
else:
|
||||
return line.lots[1].lot_unit_line
|
||||
else:
|
||||
return self.unit
|
||||
return None
|
||||
|
||||
def get_lots(self, name):
|
||||
logger.info("GET_LOTS_LINE:%s",self.line)
|
||||
|
||||
Reference in New Issue
Block a user