Odoo Help

4

0
6 Answers
6
Avatar

Temur Georgia

--Temur--

3385
| 7 5 9
Tbilisi, Georgia
--Temur--
Programmer
Temur Georgia
12/8/15, 5:22 AM

standard_price is not a normal field, but it's a property field, so it's values are stored in  ir_property  table. run this in your PgAdmin:

SELECT id, value_float, name, res_id

FROM ir_property

WHERE name='standard_price';

- here res_id column shows to which "Model, ID" combination the value belongs to.

3 Comments
Allen Xu United States
12/8/15, 6:19 PM

thank you, this works.

Temur Georgia
12/9/15, 1:46 AM

You're welcome

LaoThai Vietnam
8/7/19, 10:19 PM

Nice answer Temur

0
Bas Netherlands
12/8/15, 5:10 AM

I believe cost_price is stored, but when using real price or average price these are computed values and therefor not stored in the database but computed.

1 Comment
Rachid Morocco
12/12/15, 5:23 AM

it's stored in the case of product_template on the ir_property table

0
Avatar

Jignesh Mehta India

--Jignesh Mehta--
12287
| 7 6 10
Surat, India
--Jignesh Mehta--
General Summary :-
- Odoo (Formerly OpenERP) Technical & Functional Expert.
- Worked as Project lead on Jewellery Manufacturing ERP.
- Having 3+ years of strong experience in odoo module development.
- Work for 3+ odoo customization to international & national clients.

Module Developments :-
- Develop Jewellery Manufacturing ERP from Scratch.
- Work in Several Modules like CRM, Sales, Purchase, Account, Inventory HR, Payroll, Website, etc.
- Work in Odoo themes which is Business and E-commerce.

Report Development :-
- Develop several Qweb and Excel Reports.

Code Migration :-
- Migrate code from Odoo9.0 to Odoo12.0 of Jewellery Manufacturing ERP.
Jignesh Mehta India
12/8/15, 3:27 AM

Hello Allen Xu,


standard_price field of product.template class is the property field and property field can't store in the database.


If in filed, store=True then it will store but in the product module there is no define store=True at field so it can't be store.


Thanks,

1 Comment
Temur Georgia
12/8/15, 8:03 AM

It is NOT a functional field, but it's a property field. See the field's definition in the code: https://github.com/odoo/odoo/blob/83a4a582faab9a6efb3afed2af5d68e4ffb4a21d/addons/product/product.py#L539-L542 you should notice

'standard_price': fields.property
part. and as a property field, it's saved in ir_property table as it's explained in my answer.
Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now