I need to display the records in one2many field from view instead of table, so for that i have created one view and use this view as like table in one2many field.
Eg:
purchase_details = fields.One2many('purchase.history', 'product_id',
string="Purchase Details")
View: purchase.history
But it display the empty one2many field. Can anyone help me.
@Silvia, If you are not performing any operation on your history than ofcouse it will be empty. You need create record in that table based on some action of you main table. in your case if you main table product.template/product.product. you can override create or write method of that model and create records in your history table.