diff --git a/modules/purchase_trade/fee.py b/modules/purchase_trade/fee.py index 33a787c..8cfb937 100755 --- a/modules/purchase_trade/fee.py +++ b/modules/purchase_trade/fee.py @@ -151,26 +151,26 @@ class Fee(ModelSQL,ModelView): if self.auto_calculation: return (qt * Decimal(unit.factor) / Decimal(self.unit.factor)).to_integral_value(rounding=ROUND_UP) - @fields.depends('price','mode','_parent_line.lots','_parent_sale_line.lots','shipment_in') - def on_change_with_unit(self, name=None): - if self.mode != 'ppack' and self.mode != 'perqt': - line = self.line - if not line: - line = self.sale_line - if line: - if line.lots: - if len(line.lots) == 1: - return line.lots[0].lot_unit_line - else: - return line.lots[1].lot_unit_line - if self.shipment_in: - Lot = Pool().get('lot.lot') - lots = Lot.search([('lot_shipment_in','=',self.shipment_in.id)]) - logger.info("ON_CHANGE_WITH_UNIT:%s",lots) - if lots: - return lots[0].lot_unit_line - else: - return self.unit + # @fields.depends('price','mode','_parent_line.lots','_parent_sale_line.lots','shipment_in') + # def on_change_with_unit(self, name=None): + # if self.mode != 'ppack' and self.mode != 'perqt': + # line = self.line + # if not line: + # line = self.sale_line + # if line: + # if line.lots: + # if len(line.lots) == 1: + # return line.lots[0].lot_unit_line + # else: + # return line.lots[1].lot_unit_line + # if self.shipment_in: + # Lot = Pool().get('lot.lot') + # lots = Lot.search([('lot_shipment_in','=',self.shipment_in.id)]) + # logger.info("ON_CHANGE_WITH_UNIT:%s",lots) + # if lots: + # return lots[0].lot_unit_line + # else: + # return self.unit def get_lots(self, name): logger.info("GET_LOTS_LINE:%s",self.line) diff --git a/modules/purchase_trade/view/fee_tree_sequence.xml b/modules/purchase_trade/view/fee_tree_sequence.xml index 6898350..0e84426 100755 --- a/modules/purchase_trade/view/fee_tree_sequence.xml +++ b/modules/purchase_trade/view/fee_tree_sequence.xml @@ -7,7 +7,6 @@ this repository contains the full copyright notices and license terms. --> -