Browse Source

Merge pull request #20 from houssine78/9.0

[IMP] add field for the scale labels
pull/22/head
Houssine BAKKALI 7 years ago
committed by GitHub
parent
commit
08c56d618a
  1. 8
      beesdoo_product/models/beesdoo_product.py
  2. 17
      beesdoo_product/views/beesdoo_product.xml

8
beesdoo_product/models/beesdoo_product.py

@ -30,7 +30,13 @@ class BeesdooProduct(models.Model):
# S0023 : List_price = Price HTVA, so add a suggested price
list_price = fields.Float(string='exVAT Price')
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):
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 name="label">
<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="total_with_vat_by_unit" />
<field name="total_deposit" />
</group>
<group>
<field name="main_seller_id" />
<field name="main_seller_id"/>
<field name="eco_label"/>
<field name="local_label"/>
<field name="fair_label"/>
<field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/>
</group>
</group>
@ -52,6 +52,15 @@
<field name="note" />
</group>
</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>
</field>
</record>

Loading…
Cancel
Save