[IMP] display field supply_method when project_mrp installed & name change of procurement tab in warnning
bzr revid: fka@tinyerp.com-20120911101721-sgume435a3hb8zc7
This commit is contained in:
parent
c7e790b97d
commit
b13a19b229
|
@ -346,7 +346,7 @@ class product_template(osv.osv):
|
|||
for product in self.browse(cr, uid, ids, context=context):
|
||||
old_uom = product.uom_po_id
|
||||
if old_uom.category_id.id != new_uom.category_id.id:
|
||||
raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may deactivate this product from the 'Procurement & Locations' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
|
||||
raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may deactivate this product from the 'Procurements' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
|
||||
return super(product_template, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -31,6 +31,16 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_product_form" model="ir.ui.view">
|
||||
<field name="name">product.form.view</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="uom_po_id" position="before">
|
||||
<field name="supply_method" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
Loading…
Reference in New Issue