Browse Source

Add suggested price and change naming ( exVAT price instead of price)

pull/14/head
EliseDup 9 years ago
parent
commit
b704115439
  1. 2
      beesdoo_product/models/beesdoo_product.py
  2. 80
      beesdoo_product/views/beesdoo_product.xml

2
beesdoo_product/models/beesdoo_product.py

@ -25,7 +25,7 @@ class BeesdooProduct(models.Model):
label_last_printed = fields.Datetime('Label last printed on') label_last_printed = fields.Datetime('Label last printed on')
# S0023 : List_price = Price HTVA, so add a suggested price # S0023 : List_price = Price HTVA, so add a suggested price
list_price = fields.Float(string='ex VAT price')
list_price = fields.Float(string='exVAT Price')
suggested_price = fields.Float(string='Suggested Price', compute='_get_suggested_price', readOnly = True) suggested_price = fields.Float(string='Suggested Price', compute='_get_suggested_price', readOnly = True)
@api.one @api.one

80
beesdoo_product/views/beesdoo_product.xml

@ -7,46 +7,50 @@
<field name="model">product.template</field> <field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view" /> <field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="list_price" position="after">
<field name="suggested_price" widget='monetary' options="{'currency_field': 'currency_id'}"/>
</field>
<field name="invoice_policy" position="attributes"> <field name="invoice_policy" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="purchase_method" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="route_ids" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<group name="sale_condition" position="attributes">
<attribute name="invisible">1</attribute>
</group>
<field name="property_account_creditor_price_difference" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<attribute name="invisible">1</attribute>
</field>
<field name="purchase_method" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="route_ids" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<group name="sale_condition" position="attributes">
<attribute name="invisible">1</attribute>
</group>
<field name="property_account_creditor_price_difference"
position="attributes">
<attribute name="invisible">1</attribute>
</field>
<xpath expr="//group[@name='inventory']/.." position="after"> <xpath expr="//group[@name='inventory']/.." position="after">
<page string="Étiquette">
<group>
<group name="label">
<field name="total_with_vat"/>
<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="eco_label"/>
<field name="local_label"/>
<field name="fair_label"/>
<field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/>
</group>
</group>
</page>
</xpath>
<page string="Étiquette">
<group>
<group name="label">
<field name="total_with_vat" />
<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="eco_label" />
<field name="local_label" />
<field name="fair_label" />
<field name="origin_label" />
<field name="label_to_be_printed" />
<field name="label_last_printed" />
</group>
</group>
</page>
</xpath>
</field> </field>
</record> </record>

Loading…
Cancel
Save