23.03.26
This commit is contained in:
@@ -882,9 +882,14 @@ class ConcentrateTerm(ModelSQL, ModelView):
|
||||
|
||||
component = fields.Many2One(
|
||||
'pricing.component',
|
||||
"Price Component"
|
||||
"Price Component",
|
||||
domain=[
|
||||
('id', 'in', Eval('line_component')),
|
||||
],
|
||||
depends=['line_component']
|
||||
)
|
||||
|
||||
line_component = fields.Function(fields.One2Many('pricing.component','',"Component"),'on_change_with_line_component')
|
||||
manual_price = fields.Numeric(
|
||||
"Price",
|
||||
digits=(16, 2)
|
||||
@@ -904,6 +909,11 @@ class ConcentrateTerm(ModelSQL, ModelView):
|
||||
|
||||
valid_from = fields.Date("Valid From")
|
||||
valid_to = fields.Date("Valid To")
|
||||
|
||||
@fields.depends('component')
|
||||
def on_change_with_line_component(self, name):
|
||||
PC = Pool().get('pricing.component')
|
||||
return PC.search(['line','=',self.line])
|
||||
|
||||
class QualityAnalysis(ModelSQL,ModelView):
|
||||
"Quality Analysis"
|
||||
|
||||
Reference in New Issue
Block a user