Skip to content
Extraits de code Groupes Projets
Valider 8eb5c53e rédigé par Julien - Le Filament's avatar Julien - Le Filament Validation de Rémi - Le Filament
Parcourir les fichiers

[UPD] add mulch multiplier

parent 36fdd24b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!214.0 double paillage
...@@ -12,10 +12,6 @@ class ProductCategory(models.Model): ...@@ -12,10 +12,6 @@ class ProductCategory(models.Model):
# ------------------------------------------------------ # ------------------------------------------------------
symbol = fields.Char("Symbole") symbol = fields.Char("Symbole")
accessory_label = fields.Char("Nom de l'accessoire associé") accessory_label = fields.Char("Nom de l'accessoire associé")
mulch_quantity_multiplier = fields.Integer(
"Multiplicateur paillage",
default=1
)
# ------------------------------------------------------ # ------------------------------------------------------
# SQL Constraints # SQL Constraints
......
...@@ -14,7 +14,8 @@ class ProductTemplate(models.Model): ...@@ -14,7 +14,8 @@ class ProductTemplate(models.Model):
related="categ_id.accessory_label", readonly=True related="categ_id.accessory_label", readonly=True
) )
mulch_quantity_multiplier = fields.Integer( mulch_quantity_multiplier = fields.Integer(
related="categ_id.mulch_quantity_multiplier", readonly=True "Multiplicateur paillage",
default=1
) )
# ------------------------------------------------------ # ------------------------------------------------------
......
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
<field name="symbol" /> <field name="symbol" />
<field name="accessory_label" /> <field name="accessory_label" />
<field name="name" /> <field name="name" />
<t t-if="record.name == 'Paillage'">
<div>
<field name="mulch_quantity_multiplier" />
</div>
</t>
</field> </field>
</field> </field>
</record> </record>
...@@ -48,6 +42,9 @@ ...@@ -48,6 +42,9 @@
</tbody> </tbody>
</table> </table>
</xpath> </xpath>
<field name="categ_id" position="after">
<field name="mulch_quantity_multiplier" attrs="{'invisible': [('categ_id', '!=', %(product_category_mulch)d)]}"/>
</field>
</field> </field>
</record> </record>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter