I am trying to access the field manufacturer_pref from the product.product table from the purchase order report.
This is the module that created the field :
class product_product(osv.osv):
_inherit = 'product.product'
_columns = {
'manufacturer' : fields.many2one('res.partner', 'Manufacturer'),
'manufacturer_pname' : fields.char('Manufacturer Product Name', size=64),
'manufacturer_pref' : fields.char('Manufacturer Product Code', size=64),
'attribute_ids': fields.one2many('product.manufacturer.attribute', 'product_id', 'Attributes'),
}
I went in the purchase module, edited purchase.py and added this under _columns = {
'manufacturer_pref': fields.related('order_line','manufacturer_pref', type='char', relation='product.product', string='Manufacturer'),
saved, did a
./openerp-server -db My_DB -u=all
and when I get back in pgAdminIII, when I look in purchase_order_line table, the column is not showing up.
Where I am wrong ?