Odoo Help

Welcome!

This community 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.

0

How to update Company "Sales Pricelist" from database

By
Travis Waelbroeck
on 1/21/16, 11:39 PM 483 views

I want to update all company pricelists from one to another in a batch, but I don't see anywhere in the database that stores the pricelist id for the company.


Where is this information stored? 


http://goo.gl/jn0O7K

Hi Travis, by Database what do you mean?

Nilim
on 1/28/16, 1:45 AM

Hello, by database, I mean the PostgreSQL database itself. My idea is to update them all with an update query from psql.

Htm-Mbs, Travis Waelbroeck
on 1/28/16, 1:18 PM
0
Travis Waelbroeck
On 4/25/16, 1:32 PM

The Sales Pricelist's field name is actually property_product_pricelist, which indicates it is a field of type property (deprecated in v8).


Basically, the values for this field are not stored in the res_partner table as I expected.


Each record is stored in the ir.property table, as you can see if you view the database with the following query:

SELECT * FROM ir_property WHERE name = 'property_product_pricelist';


You can theoretically update the values by SQL commands, but I would recommend against it (maybe someone else has a good way of doing that safely?).


For some better understanding of property fields, check the following links:

V6 Documentation: https://doc.odoo.com/6.0/developer/2_5_Objects_Fields_Methods/field_type/

Beginner question about functional fields and property fields?: https://www.odoo.com/fr_FR/forum/aide-1/question/beginner-question-about-functional-fields-and-property-fields-77398#answer_77401

Can anyone clearly explain property fields?: https://www.odoo.com/fr_FR/forum/aide-1/question/can-anyone-clearly-explain-property-fields-42887

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/21/16, 11:39 PM
Seen: 483 times
Last updated: 4/25/16, 1:33 PM