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. 9
      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)

9
beesdoo_product/views/beesdoo_product.xml

@ -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