Targeted Qt
This commit is contained in:
@@ -1367,6 +1367,8 @@ class Line(metaclass=PoolMeta):
|
||||
fields.Numeric("Tolerance min"), 'get_tolerance_min')
|
||||
tolerance_max = fields.Function(
|
||||
fields.Numeric("Tolerance max"), 'get_tolerance_max')
|
||||
targeted_qt = fields.Function(
|
||||
fields.Numeric("Targeted Qt", digits='unit'), 'get_targeted_qt')
|
||||
# certification = fields.Selection([
|
||||
# (None, ''),
|
||||
# ('bci', 'BCI'),
|
||||
@@ -1574,6 +1576,9 @@ class Line(metaclass=PoolMeta):
|
||||
return Decimal(str(purchase.tol_max or 0))
|
||||
return Decimal(str(self.tol_max or 0))
|
||||
|
||||
def get_targeted_qt(self, name):
|
||||
return self._tolerance_actual_quantity()
|
||||
|
||||
def get_progress(self,name):
|
||||
PS = Pool().get('purchase.pricing.summary')
|
||||
ps = PS.search(['line','=',self.id])
|
||||
|
||||
@@ -1349,6 +1349,8 @@ class SaleLine(metaclass=PoolMeta):
|
||||
fields.Numeric("Tolerance min"), 'get_tolerance_min')
|
||||
tolerance_max = fields.Function(
|
||||
fields.Numeric("Tolerance max"), 'get_tolerance_max')
|
||||
targeted_qt = fields.Function(
|
||||
fields.Numeric("Targeted Qt", digits='unit'), 'get_targeted_qt')
|
||||
certif = fields.Many2One('purchase.certification',"Certification",states={'readonly': (Eval('inherit_cer')),})
|
||||
# certification = fields.Selection([
|
||||
# (None, ''),
|
||||
@@ -1564,6 +1566,9 @@ class SaleLine(metaclass=PoolMeta):
|
||||
return Decimal(str(sale.tol_max or 0))
|
||||
return Decimal(str(self.tol_max or 0))
|
||||
|
||||
def get_targeted_qt(self, name):
|
||||
return self._tolerance_actual_quantity()
|
||||
|
||||
def get_progress(self,name):
|
||||
PS = Pool().get('sale.pricing.summary')
|
||||
ps = PS.search(['sale_line','=',self.id])
|
||||
|
||||
@@ -48,6 +48,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="tolerance_used" widget="tolerance_gauge"
|
||||
min_field="tolerance_min" max_field="tolerance_max"
|
||||
xexpand="1" xfill="1"/>
|
||||
<label name="targeted_qt"/>
|
||||
<field name="targeted_qt"/>
|
||||
<field name="tolerance_min" invisible="1"/>
|
||||
<field name="tolerance_max" invisible="1"/>
|
||||
<newline/>
|
||||
|
||||
@@ -48,6 +48,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="tolerance_used" widget="tolerance_gauge"
|
||||
min_field="tolerance_min" max_field="tolerance_max"
|
||||
xexpand="1" xfill="1"/>
|
||||
<label name="targeted_qt"/>
|
||||
<field name="targeted_qt"/>
|
||||
<field name="tolerance_min" invisible="1"/>
|
||||
<field name="tolerance_max" invisible="1"/>
|
||||
<newline/>
|
||||
|
||||
Reference in New Issue
Block a user