Browse Source

Change Price to exVAT Price in supplier info

pull/14/head
EliseDup 8 years ago
parent
commit
196b7b7659
  1. 6
      beesdoo_product/models/beesdoo_product.py
  2. 29
      beesdoo_product/views/beesdoo_product.xml

6
beesdoo_product/models/beesdoo_product.py

@ -2,6 +2,7 @@
from openerp import models, fields, api from openerp import models, fields, api
from openerp.tools.translate import _ from openerp.tools.translate import _
from openerp.exceptions import UserError from openerp.exceptions import UserError
from mako.runtime import _inherit_from
class BeesdooProduct(models.Model): class BeesdooProduct(models.Model):
_inherit = "product.template" _inherit = "product.template"
@ -87,3 +88,8 @@ class BeesdooProductCategory(models.Model):
if (self.profit_margin < 0.0): if (self.profit_margin < 0.0):
raise UserError(_('Percentages for Profit Margin must > 0.')) raise UserError(_('Percentages for Profit Margin must > 0.'))
class BeesdooProductSupplierInfo(models.Model):
_inherit = "product.supplierinfo"
price = fields.Float('exVAT Price')

29
beesdoo_product/views/beesdoo_product.xml

@ -29,21 +29,21 @@
<page string="Label"> <page string="Label">
<group> <group>
<group name="label"> <group name="label">
<field name="total_with_vat"/>
<field name="display_weight"/>
<field name="total_with_vat" />
<field name="display_weight" />
<field name="display_unit" /> <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="local_label"/>
<field name="fair_label"/>
<field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/>
<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>
</group> </group>
@ -89,4 +89,15 @@
</field> </field>
</record> </record>
<record model="ir.ui.view" id="beesdoo_product_supplierinfo_tree_view">
<field name="name">beesdoo.product.supplierinfo.tree</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
<field name="arch" type="xml">
<field name="price" position="replace">
<field name="price"></field>
</field>
</field>
</record>
</odoo> </odoo>
Loading…
Cancel
Save