Purchase & Sale

This commit is contained in:
2026-07-26 15:01:14 +02:00
parent df4570aff8
commit b1f97ade55
4 changed files with 79 additions and 63 deletions

View File

@@ -2815,12 +2815,14 @@ class Line(metaclass=PoolMeta):
'on_change_with_attribute_set'
)
attributes_name = fields.Function(
fields.Char("Attributes Name"),
'on_change_with_attributes_name'
)
finished = fields.Boolean("Mark as finished")
attributes_name = fields.Function(
fields.Char("Attributes Name"),
'on_change_with_attributes_name'
)
specification = fields.Function(
fields.Char("Specification"), 'on_change_with_specification')
finished = fields.Boolean("Mark as finished")
quality_analysis = fields.One2Many('quality.analysis','line',"Quality analysis")
assays = fields.One2Many('assay.assay','line',"Assays")
@@ -2875,9 +2877,17 @@ class Line(metaclass=PoolMeta):
'product_attribute.msg_label_value',
label=attribute.string,
value=attribute.format(value)
))
))
return " | ".join(filter(None, values))
@fields.depends(
'product', 'attributes',
'coffee_origin', 'coffee_type', 'coffee_process', 'coffee_variety',
'coffee_crop_year', 'coffee_screen_size', 'coffee_moisture_max',
'coffee_defect_max', 'coffee_cup_score_min')
def on_change_with_specification(self, name=None):
return self.on_change_with_attributes_name(name)
@fields.depends(
'quantity_theorical', 'quantity', 'lots', 'targeted_qt',
methods=['_recompute_trade_price_fields'])