Odoo Help


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.


Import Sales Order lines and calculate price by pricelist

Mahmoud Korayem
on 12/7/14, 3:40 AM 1,009 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

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

2 follower(s)


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