Browse Source

[IMP] add field for the scale labels

pull/20/head
houssine 7 years ago
parent
commit
4cce4c6ed9
  1. 6
      beesdoo_product/models/beesdoo_product.py
  2. 17
      beesdoo_product/views/beesdoo_product.xml

6
beesdoo_product/models/beesdoo_product.py

@ -31,6 +31,12 @@ class BeesdooProduct(models.Model):
list_price = fields.Float(string='exVAT Price') list_price = fields.Float(string='exVAT Price')
suggested_price = fields.Float(string='Suggested exVAT Price', compute='_compute_cost', readOnly=True) suggested_price = fields.Float(string='Suggested exVAT Price', compute='_compute_cost', readOnly=True)
deadline_for_sale = fields.Integer(string="Deadline for sale(days)")
deadline_for_consumption = fields.Integer(string="Deadline for consumption(days)")
ingredients = fields.Char(string="Ingredient")
scale_label_info_1 = fields.Char(string="Scale lable info 1")
scale_label_info_2 = fields.Char(string="Scale lable info 2")
def _get_main_supplier_info(self): def _get_main_supplier_info(self):
return self.seller_ids.sorted(key=lambda seller: seller.date_start, reverse=True) return self.seller_ids.sorted(key=lambda seller: seller.date_start, reverse=True)

17
beesdoo_product/views/beesdoo_product.xml

@ -32,19 +32,19 @@
<group> <group>
<group name="label"> <group name="label">
<field name="total_with_vat"/> <field name="total_with_vat"/>
<field name="display_weight"/>
<field name="display_unit" />
<field name="display_weight"/>
<field name="display_unit"/>
<field name="default_reference_unit"/> <field name="default_reference_unit"/>
<field name="total_with_vat_by_unit" /> <field name="total_with_vat_by_unit" />
<field name="total_deposit" /> <field name="total_deposit" />
</group> </group>
<group> <group>
<field name="main_seller_id" />
<field name="main_seller_id"/>
<field name="eco_label"/> <field name="eco_label"/>
<field name="local_label"/> <field name="local_label"/>
<field name="fair_label"/> <field name="fair_label"/>
<field name="origin_label"/> <field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/> <field name="label_last_printed"/>
</group> </group>
</group> </group>
@ -52,6 +52,15 @@
<field name="note" /> <field name="note" />
</group> </group>
</page> </page>
<page string="Scale labels" attrs="{'invisible':[('to_weight','=',False)]}">
<group name="scale_label">
<field name="deadline_for_sale"/>
<field name="deadline_for_consumption"/>
<field name="ingredients"/>
<field name="scale_label_info_1"/>
<field name="scale_label_info_2"/>
</group>
</page>
</xpath> </xpath>
</field> </field>
</record> </record>

Loading…
Cancel
Save