Coffee visible

This commit is contained in:
2026-07-15 23:26:07 +02:00
parent 0e004027df
commit b53d7a216d
3 changed files with 60 additions and 0 deletions

View File

@@ -1110,6 +1110,18 @@ class CoffeeLineMixin:
coffee_defect_max = fields.Integer('Defects max') coffee_defect_max = fields.Integer('Defects max')
coffee_cup_score_min = fields.Numeric( coffee_cup_score_min = fields.Numeric(
'Cup score min', digits=(5, 2)) 'Cup score min', digits=(5, 2))
coffee_packing_count = fields.Integer('Packages')
coffee_packing_unit_weight = fields.Numeric(
'Package weight', digits=(16, 5))
coffee_packing_weight_unit = fields.Many2One(
'product.uom', 'Package weight unit')
coffee_packing_description = fields.Char('Packing description')
coffee_market_reference = fields.Many2One(
'price.price', 'Market reference')
coffee_market_price = fields.Numeric('Market price', digits=(16, 5))
coffee_market_delta = fields.Numeric('Market delta', digits=(16, 5))
def _coffee_samples(self): def _coffee_samples(self):
return list(getattr(self, 'coffee_samples', None) or []) return list(getattr(self, 'coffee_samples', None) or [])

View File

@@ -39,6 +39,19 @@ this repository contains the full copyright notices and license terms. -->
<label name="unit"/> <label name="unit"/>
<field name="unit"/> <field name="unit"/>
</group> </group>
<group id="coffee_packing" string="Packing"
colspan="1" col="4" panel="card" icon="tryton-archive"
xalign="0" yalign="0"
col_widths="min-content,1fr,min-content,1fr">
<label name="coffee_packing_count"/>
<field name="coffee_packing_count" width="120" xexpand="0" xfill="0"/>
<label name="coffee_packing_unit_weight"/>
<field name="coffee_packing_unit_weight" width="120" xexpand="0" xfill="0"/>
<label name="coffee_packing_weight_unit"/>
<field name="coffee_packing_weight_unit"/>
<label name="coffee_packing_description"/>
<field name="coffee_packing_description"/>
</group>
<group id="tolerances" string="Tolerances &amp; Inheritance" <group id="tolerances" string="Tolerances &amp; Inheritance"
colspan="1" col="4" panel="card" icon="tryton-switch" colspan="1" col="4" panel="card" icon="tryton-switch"
xalign="0" yalign="0" xalign="0" yalign="0"
@@ -124,6 +137,17 @@ this repository contains the full copyright notices and license terms. -->
<label name="certif"/> <label name="certif"/>
<field name="certif" colspan="3"/> <field name="certif" colspan="3"/>
</group> </group>
<group id="coffee_market_price" string="Market price"
colspan="1" col="4" panel="card" icon="tradon-price"
xalign="0" yalign="0"
col_widths="min-content,1fr,min-content,1fr">
<label name="coffee_market_reference"/>
<field name="coffee_market_reference"/>
<label name="coffee_market_price"/>
<field name="coffee_market_price" width="120" xexpand="0" xfill="0"/>
<label name="coffee_market_delta"/>
<field name="coffee_market_delta" width="120" xexpand="0" xfill="0"/>
</group>
</group> </group>
<group id="attributes_description" string="Description" <group id="attributes_description" string="Description"
colspan="12" col="1" panel="card" icon="tryton-note" colspan="12" col="1" panel="card" icon="tryton-note"

View File

@@ -36,6 +36,19 @@ this repository contains the full copyright notices and license terms. -->
<label name="unit"/> <label name="unit"/>
<field name="unit"/> <field name="unit"/>
</group> </group>
<group id="coffee_packing" string="Packing"
colspan="1" col="4" panel="card" icon="tryton-archive"
xalign="0" yalign="0"
col_widths="min-content,1fr,min-content,1fr">
<label name="coffee_packing_count"/>
<field name="coffee_packing_count" width="120" xexpand="0" xfill="0"/>
<label name="coffee_packing_unit_weight"/>
<field name="coffee_packing_unit_weight" width="120" xexpand="0" xfill="0"/>
<label name="coffee_packing_weight_unit"/>
<field name="coffee_packing_weight_unit"/>
<label name="coffee_packing_description"/>
<field name="coffee_packing_description"/>
</group>
<group id="tolerances" string="Tolerances &amp; Inheritance" <group id="tolerances" string="Tolerances &amp; Inheritance"
colspan="1" col="4" panel="card" icon="tryton-switch" colspan="1" col="4" panel="card" icon="tryton-switch"
xalign="0" yalign="0" xalign="0" yalign="0"
@@ -117,6 +130,17 @@ this repository contains the full copyright notices and license terms. -->
<label name="certif"/> <label name="certif"/>
<field name="certif" colspan="3"/> <field name="certif" colspan="3"/>
</group> </group>
<group id="coffee_market_price" string="Market price"
colspan="1" col="4" panel="card" icon="tradon-price"
xalign="0" yalign="0"
col_widths="min-content,1fr,min-content,1fr">
<label name="coffee_market_reference"/>
<field name="coffee_market_reference"/>
<label name="coffee_market_price"/>
<field name="coffee_market_price" width="120" xexpand="0" xfill="0"/>
<label name="coffee_market_delta"/>
<field name="coffee_market_delta" width="120" xexpand="0" xfill="0"/>
</group>
</group> </group>
<group id="description" string="Description" <group id="description" string="Description"
colspan="12" col="1" panel="card" icon="tryton-note" colspan="12" col="1" panel="card" icon="tryton-note"