04.02.26
This commit is contained in:
@@ -59,7 +59,7 @@ class Fee(ModelSQL,ModelView):
|
||||
('pcost', '% cost price'),
|
||||
('ppack', 'Per packing'),
|
||||
], 'Mode', required=True)
|
||||
auto_calculation = fields.Boolean("Auto Calc.",states={'readonly': (Eval('mode') != 'ppack')})
|
||||
auto_calculation = fields.Boolean("Auto",states={'readonly': (Eval('mode') != 'ppack')})
|
||||
inherit_qt = fields.Boolean("Inh Qt",states={'readonly': Eval('mode') != 'ppack'})
|
||||
quantity = fields.Numeric("Qt",digits='unit',states={'readonly': (Eval('mode') != 'ppack') | Bool(Eval('auto_calculation'))})
|
||||
unit = fields.Many2One('product.uom',"Unit",domain=[
|
||||
@@ -118,7 +118,7 @@ class Fee(ModelSQL,ModelView):
|
||||
return qt
|
||||
else:
|
||||
if self.auto_calculation:
|
||||
return Decimal(int(qt/self.unit.factor))
|
||||
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):
|
||||
|
||||
@@ -7,12 +7,12 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="supplier"/>
|
||||
<field name="mode"/>
|
||||
<field name="unit"/>
|
||||
<field name="auto_calculation"/>
|
||||
<field name="auto_calculation" width="60"/>
|
||||
<field name="price"/>
|
||||
<field name="currency"/>
|
||||
<field name="weight_type"/>
|
||||
<field name="p_r"/>
|
||||
<field name="quantity" symbol="unit"/>
|
||||
<field name="quantity"/>
|
||||
<field name="amount"/>
|
||||
<field name="qt_state"/>
|
||||
<field name="inherit_shipment"/>
|
||||
|
||||
@@ -7,12 +7,12 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="supplier"/>
|
||||
<field name="mode"/>
|
||||
<field name="unit"/>
|
||||
<field name="auto_calculation"/>
|
||||
<field name="auto_calculation" width="60"/>
|
||||
<field name="price"/>
|
||||
<field name="currency"/>
|
||||
<field name="weight_type"/>
|
||||
<field name="p_r"/>
|
||||
<field name="quantity" symbol="unit"/>
|
||||
<field name="quantity"/>
|
||||
<field name="amount"/>
|
||||
<field name="qt_state"/>
|
||||
<!-- <field name="purchase"/> -->
|
||||
|
||||
Reference in New Issue
Block a user