[IMP] product: supplier_info: when renaming a field, please
authorThibault Delavallée <tde@openerp.com>
Thu, 23 Jan 2014 16:32:43 +0000 (17:32 +0100)
committerThibault Delavallée <tde@openerp.com>
Thu, 23 Jan 2014 16:32:43 +0000 (17:32 +0100)
use @oldname parameter.
Therefore added oldname on product_tmpl_id that was once known as product.id.

bzr revid: tde@openerp.com-20140123163243-ct1vde3luoypj5qx

addons/product/product.py

index 0bd3d43..e62df2c 100644 (file)
@@ -988,7 +988,7 @@ class product_supplierinfo(osv.osv):
         'product_uom': fields.related('product_tmpl_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
         'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."),
         'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Unit of Measure."),
-        'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True),
+        'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True, oldname='product_id'),
         'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."),
         'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
         'company_id':fields.many2one('res.company','Company',select=1),