Im creating a new model not stored in Database .Field "pricelist_item_id" in one2manyrelation without inverse_name.
class Product_Price_Search(models.Model):
_name = 'product.price.search'
_auto = False
upgrade_price = fields.Integer('Upgrade Price')
pricelist_item_id = fields.One2many( 'product.pricelist.item', string="Product PriceList Items" )
<record model="ir.ui.view" id="view_product_price_search_form">
<field name="name">product.price.search.form.view</field>
<field name="model">product.price.search</field>
<field name="arch" type="xml">
<form string="PriceList Items Form">
<sheet><group col="2">
<field name="upgrade_price" />
</group>
<!-- PriceList Items Tree View -->
<group string="Form">
<div> <p> List PriceList Items </p>
</div> </group>
<field name="pricelist_item_id">
<tree string='Tables'>
<field name="name" />
<field name="product_id" />
</tree>
</field>
</sheet>
</form>
</field>
</record>
In my "pricelist_item_id" fields in tree .
I want to display all the records which is available in that table .
Isit possible in Odoo ?
What is the reason for not adding foreign key? If you want use one2many you must need to define reference/ID inside the comodel. without that not possible.
If you don't want any reference field than go for the Text field make it as compute/functional field and fetch the data of all the records and display in your text box in appropriate format. this could be done without any foreign key.