Odoo Help


Import Sales Order lines and calculate price by pricelist

Mahmoud Korayem
on 12/7/14, 3:40 AM 1,640 views

I made a script to import sales order lines and I want that prices be calculated based on price list inthe csv file

I am trying to use price_get_multi but always get problem

At least one pricelist has no active version !
Please create or activate one.: ''>



Here is the code

The [1] is the pricelist id and I am sure it is ok and active with expiry date 2014-12-31

The 267 is a product id

and 1.0 is the quantity


args = [[1],267,1.0] #query clause
context = {

args2 = [context]
product_price_with_pricelist = sock.execute(dbname, uid, pwd, 'product.pricelist', 'price_get_multi', args,context)

Even if I have the pricelist version in the CSV, how to include that in the code ?

Mahmoud Korayem
on 12/7/14, 6:19 AM

Can you post more from your code ?

Med Said BARA
on 12/7/14, 10:51 AM

According to the code in .../product/pricelist.py, it seems that there is at least 1 Pricelist without Pricelist Version. Check your Pricelists.

Med Said BARA
on 12/7/14, 11:10 AM

Actually the problem is that I checked and made sure that all pricelists are active and I also made start date 1-12-2014 and end date 31-12-2014

Mahmoud Korayem
on 12/7/14, 1:09 PM

Not the Pricelist, but the Pricelist Version

Med Said BARA
on 12/7/14, 1:11 PM

Yes I checked the versions too, they are all active and I even put the id hard-coded. but still same error

Mahmoud Korayem
on 12/11/14, 8:38 AM

Med Said BARA

--Med Said BARA--

| 5 5 7
--Med Said BARA--
Med Said BARA
On 12/7/14, 6:10 AM

In OpenERP each Pricelist is linked to a Pricelist Version: See under Sales --> Configurations --> Pricelists

I think you must include the Pricelist Version in your CSV.

Or try to use  sale_line_import  from https://github.com/Vauxoo/addons-vauxoo/tree/7.0

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.


Odoo Training Center

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

Test it now

Question tools

2 follower(s)


Asked: 12/7/14, 3:40 AM
Seen: 1640 times
Last updated: 3/16/15, 8:10 AM