Hello Odoo community.
I would like to create a list view field for the Product section that allows me to display all the sales prices of a specific price. Through studio I don't know how to display all the information contained in a variable.
With the little knowledge I have in Python, logic and intuition tells me that I could use the ID of the price I need to display contained in property_product_pricelist.
So, what would be the syntax of this field? property_product_pricelist_id or something like ('res.partner.pricelistvariable', string.id='14')?
How is the python rule to display the data of a parent field?
Thanks in advance for all the information you can give me.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Try creating a field of the same type as the sub-field you are trying to show and using the related attribute to provide
the value of a sub-field.
If you are trying to show it in a list view, it is important to use store=True
product_template_price = fields.Float(related='product_tmpl_id.price', store=True)
https://www.odoo.com/documentation/15.0/developer/reference/backend/orm.html#related-fields
product.pricelist is the parent model where all price lists are contained. In turn, fixed_price is the field that contains all the specific prices of that price list and this in turn is contained in product.pricelist.item.
I'm sorry but I can't understand what you mean.
I created the following field:
Type of field: monetary
Dependencies: product.pricelist.item
Calculate: for record in self:
record['x_studio_price_vr'] = record.pricelist_id
Here the field I created is equal to the display of this pricelist but I can not add the specific ID that this is displayed.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Dec 24
|
830 | ||
|
0
Apr 24
|
247 | ||
|
1
May 23
|
1204 | ||
|
1
Nov 22
|
14651 | ||
Import pricelist !!!
Solved
|
|
1
Nov 22
|
4797 |