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

11
beesdoo_product/views/beesdoo_product.xml

@ -89,4 +89,15 @@
</field>
</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>
Loading…
Cancel
Save