Pricelists use wrong values from other currencies

Bug #661315 reported by Julian Robbins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Incomplete
Undecided
Unassigned

Bug Description

Using trunk 6, rev 4350

Difficult to recreate, but I keep getting issues with pricelists for different currencies.

I setup 3 currencies, GBP, EUR, and USD. But only pricing with GBP pricelist works properly, sales orders created with the other pricelists give errors where it says that there is a value missing in the pricelist (where I can find no reason that a price isn't given); if the pricelist depends on GBP pricing it is using Public Price, and works fine.

What convinced me where the error lies is that with one my EUR pricelists on a sales order, I have got values that are approx 1.63 times base GBP values (which is set as our default currency). But 1.63 is actually the value of the USD currency as set today, not EUR ! So somewhere, a pricelist is using the wrong currency, or possibly using an id from a currency that has been changed, but the new currency isn't shown, only the old currency value. I have gone through the config carefully, and am sure that it is correct, but that there is a bug.

As I say its not easy to replicate, but please investigate as I'm certain there is an issue here regarding currency values on pricelists.

I happy to try to help, if you need more specific info. But certainly there is a major bug with pricelists in a different currency here.

Tags: crm trunk
Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

Hello Julian Robbins,

The scenario is as follows :

While creating a sale order, any pricelist selected on the order will be applied to the whole order and currency on the pricelist is applied too.

i.e. If you are creating pricelist on the bases of USD then it will create a SO in the USD. The total amount you are getting is in USD "NOT IN GBP" . Invoice is also created in the USD. ( Providing , GBP is the company currency)

Invoice created from the SO will contain the same price in USD. After you Validate the invoice, account moves(journal entries) will be created and it will contain amount with the company currency GBP.

( The amount gets converted into the Company currency which is GBP in your case)

Please, let us know if the above information is not enough for you.

Thanks.

Changed in openobject-addons:
status: New → Incomplete
milestone: none → 6.0
Revision history for this message
Julian Robbins (joolsr) wrote : Re: [Bug 661315] Re: Pricelists use wrong values from other currencies

  On 18/10/10 08:06, DHS(OpenERP) wrote:
> Hello Julian Robbins,
>
> The scenario is as follows :
>
> While creating a sale order, any pricelist selected on the order will be
> applied to the whole order and currency on the pricelist is applied too.
>
> i.e. If you are creating pricelist on the bases of USD then it will
> create a SO in the USD. The total amount you are getting is in USD "NOT
> IN GBP" . Invoice is also created in the USD. ( Providing , GBP is the
> company currency)
Hello

I'm only testing up to making a Quotation/Sales Order.

I understand what you say, but I found that having three active
pricelists, and currencies setup properly for each one, that I still get
either a value of zero in the total lines, for currencies in anything
other than GBP, or had the case where i got a figure that was the dollar
conversion amount rather than the EUR conversion amount when the
pricelist was set in EUR.

I understand about the pricelist changing the values for all the sale
order lines, but I am referring to sale order lines that have just been
added, which should be correct the the pricelist selected just prior to
adding those sale order lines.

I will try to replicate the bug for you, but am certain that there is
something amiss. Usually the bug is found fairly quickly after creating
two or more pricelists and updating currencies, or swapping currencies
on a pricelist.

Julian

> Invoice created from the SO will contain the same price in USD. After
> you Validate the invoice, account moves(journal entries) will be created
> and it will contain amount with the company currency GBP.
>
> ( The amount gets converted into the Company currency which is GBP in
> your case)
>
> Please, let us know if the above information is not enough for you.
>
> Thanks.
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

Revision history for this message
Julian Robbins (joolsr) wrote :

  On 18/10/10 11:54, Julian Robbins wrote:
> On 18/10/10 08:06, DHS(OpenERP) wrote:
>> Hello Julian Robbins,
>>
>> The scenario is as follows :
>>
>> While creating a sale order, any pricelist selected on the order will be
>> applied to the whole order and currency on the pricelist is applied too.
>>
>> i.e. If you are creating pricelist on the bases of USD then it will
>> create a SO in the USD. The total amount you are getting is in USD "NOT
>> IN GBP" . Invoice is also created in the USD. ( Providing , GBP is the
>> company currency)
> Hello
>
> I'm only testing up to making a Quotation/Sales Order.
>
> I understand what you say, but I found that having three active
> pricelists, and currencies setup properly for each one, that I still get
> either a value of zero in the total lines, for currencies in anything
> other than GBP, or had the case where i got a figure that was the dollar
> conversion amount rather than the EUR conversion amount when the
> pricelist was set in EUR.
>
> I understand about the pricelist changing the values for all the sale
> order lines, but I am referring to sale order lines that have just been
> added, which should be correct the the pricelist selected just prior to
> adding those sale order lines.
>
> I will try to replicate the bug for you, but am certain that there is
> something amiss. Usually the bug is found fairly quickly after creating
> two or more pricelists and updating currencies, or swapping currencies
> on a pricelist.

Is this related ?

http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/4398#product/pricelist.py

Only code being removed and not being added is shown in launchpad at the
moment.

I will try and test with trunk, and see if its better

> Julian
>
>> Invoice created from the SO will contain the same price in USD. After
>> you Validate the invoice, account moves(journal entries) will be created
>> and it will contain amount with the company currency GBP.
>>
>> ( The amount gets converted into the Company currency which is GBP in
>> your case)
>>
>> Please, let us know if the above information is not enough for you.
>>
>> Thanks.
>>
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

Hello Julian Robbins,

I understand your issue that for each Sale Order Line you can select different pricelist. But it is not bug. It is a mistake. Pricelist is applied only after the onchange operation or changing the product.

If you want that, changed pricelist should apply to all Sale Order Line. Then below link contain module "sale_extended", Which will change all the Sale Order Line for applied pricelist.

https://bugs.launchpad.net/openobject-addons/+bug/435291

Hope this will help you.

Thank.

Revision history for this message
Julian Robbins (joolsr) wrote :

  On 18/10/10 13:47, DHS(OpenERP) wrote:
> *** This bug is a duplicate of bug 435291 ***
> https://bugs.launchpad.net/bugs/435291
>
> Hello Julian Robbins,
>
> I understand your issue that for each Sale Order Line you can select
> different pricelist. But it is not bug. It is a mistake. Pricelist is
> applied only after the onchange operation or changing the product.

But this is what I'm experiencing:- after reloading the page (ie after
the onchange) , or changing the product I still get values of $0, when a
dollar rate was set correctly, or have seen rates of dollars when it was
set for EUR.

What was Fabien's change related today ?
http://bazaar.launchpad.net/%7Eopenerp/openobject-addons/trunk/revision/4398
[FIX] computation in pricelist
<http://bazaar.launchpad.net/%7Eopenerp/openobject-addons/trunk/revision/4398>

Julian

> If you want that, changed pricelist should apply to all Sale Order Line.
> Then below link contain module "sale_extended", Which will change all
> the Sale Order Line for applied pricelist.
>
> https://bugs.launchpad.net/openobject-addons/+bug/435291
>
> Hope this will help you.
>
> Thank.
>
> ** This bug has been marked a duplicate of bug 435291
> Sale Order: Change in pricelist should affect order lines
> * You can subscribe to bug 435291 by following this link: https://bugs.launchpad.net/openobject-addons/+bug/435291/+subscribe
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

Revision history for this message
Julian Robbins (joolsr) wrote :

  On 18/10/10 15:12, Julian Robbins wrote:
> *** This bug is a duplicate of bug 435291 ***
> https://bugs.launchpad.net/bugs/435291
>
> On 18/10/10 13:47, DHS(OpenERP) wrote:
>> *** This bug is a duplicate of bug 435291 ***
>> https://bugs.launchpad.net/bugs/435291
>>
>> Hello Julian Robbins,
>>
>> I understand your issue that for each Sale Order Line you can select
>> different pricelist. But it is not bug. It is a mistake. Pricelist is
>> applied only after the onchange operation or changing the product.
> But this is what I'm experiencing:- after reloading the page (ie after
> the onchange) , or changing the product I still get values of $0, when a
> dollar rate was set correctly, or have seen rates of dollars when it was
> set for EUR.
>
> What was Fabien's change related today ?
> http://bazaar.launchpad.net/%7Eopenerp/openobject-addons/trunk/revision/4398
> [FIX] computation in pricelist
> <http://bazaar.launchpad.net/%7Eopenerp/openobject-addons/trunk/revision/4398>
After updating today, so this is included, I still get same issues.

Interestingly, if I set GBP to Base as my currency, the values after
selecting a GBP in the pricelist and adding a new sale order line are
about a factor of 1.16 (value of EUR exchange by co-incidence) too high.
If I untick GBP so base is not set, but have a currency value of 1.00
anyway (so replicating the effect of the base currency), adding a new
sales order line, the value is correct. Its almost like its still trying
to use EUR as the default currency, even when base is set in the
currency ...

So there is definitely a fault there at least.

Julian
> Julian
>
>> If you want that, changed pricelist should apply to all Sale Order Line.
>> Then below link contain module "sale_extended", Which will change all
>> the Sale Order Line for applied pricelist.
>>
>> https://bugs.launchpad.net/openobject-addons/+bug/435291
>>
>> Hope this will help you.
>>
>> Thank.
>>
>> ** This bug has been marked a duplicate of bug 435291
>> Sale Order: Change in pricelist should affect order lines
>> * You can subscribe to bug 435291 by following this link: https://bugs.launchpad.net/openobject-addons/+bug/435291/+subscribe
>>
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Julian,

On a quick note, Sale order lines always follow the price related changes only based on the current pricelist selected.
So, If you want to set different pricelists for each Sale order line, this is not acceptable.

If you want to change the pricelist in the middle of the entries(in case you already have added lines and you dont want to do the same things again), use the module attached at bug #435291, which will ease your work.

In your case, you get $0. I dont think this mishap is due to the pricelist. Make sure you have configured the pricelist properly.

Hope this is clear.

Thanks.

Revision history for this message
Julian Robbins (joolsr) wrote :

On 28/10/10 07:25, Jay (OpenERP) wrote:
> *** This bug is a duplicate of bug 435291 ***
> https://bugs.launchpad.net/bugs/435291
>
> Julian,
>
> On a quick note, Sale order lines always follow the price related changes only based on the current pricelist selected.
> So, If you want to set different pricelists for each Sale order line, this is not acceptable.
>
> If you want to change the pricelist in the middle of the entries(in case
> you already have added lines and you dont want to do the same things
> again), use the module attached at bug #435291, which will ease your
> work.
>
> In your case, you get $0. I dont think this mishap is due to the
> pricelist. Make sure you have configured the pricelist properly.
The pricelisst are configure correctly. I created a new db instance on
latest trunk and tried again. Thsi time i was able to create pricelists
for three currencies and with preicebreaks.

But on trying to add in a rule to allow 10% extra discount to agents, i
couldnt get thsi to work, but the issue is I started seeing values in
Sales Orders that were incorrect compared to the correct values I was
getting before. I gor an error saying that the pricelist didnt allow the
qtys or have a price for that particular product, but after checking
this carefully, and testing a number of times, I believe my
configuration was still correct.

So yes, I agree pricelists are basically working; but I still believe
there is a bug in there somewhere that appears to corrupt the currency
values in the tables/or pricerules somewhere.

Julian

> Hope this is clear.
>
> Thanks.
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.