I have two classes purchase_requisition and purchase_requisition_line .I want to show a value from purchase _requisition_line class in purchase_requisition class.So far i have done this much
class purchase_requisition_line(osv.osv):
_name = "purchase.requisition.line"
_description = "Purchase Requisition Line"
_rec_name = 'product_id'
_columns = {
'product_id': fields.many2one('product.product','Product', domain=[('purchase_ok', '=', True)]),
'requisition_id': fields.many2one('purchase.requisition', 'Requisition', ondelete='cascade'),
}
and
class purchase_requisition(osv.osv):
_name = "purchase.requisition"
_description = "Purchase Requisition"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_columns = {
'line_ids': fields.one2many('purchase.requisition.line', 'requisition_id', 'Products to Purchase', states={'done': [('readonly', True)]}, copy=True),
'product': fields.many2one('line_ids.product_id', string='Product', store=True),
}
I want to show product_id (ie Product name) in treeview of class but failed to do so, is there something i am missing?