Odoo Help


Strange behaviour when entering quantity. If i put 1000, it becomes 1. What could this be?

Luis Leiva
on 10/30/13, 11:59 AM 1,169 views

I am in Deliver Products; I want to send a product to a customer but it is not a sell, so I want to make the delivery order directly. (OpenERP v7)

When I enter the product quantity I find this strange behaviour: If I enter from 1 to 999 everything works well. If I enter 1000 to 900,000 it will, as soon as I press enter or tab, convert it and leave the amount divided by 1000. I.e. if I enter 1000 it will put 1, if I enter 3400 it will leave 3... etc. But if I enter 1000000, it will leave 1000000.

Any ideas on what is happening?? Is this a bug?


Update: Seems to be relate to this: on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos) But don't know how this works.

Update #2: Whent to stock.py and put a message in def onchange_quantity() printing the result of result['product_uos_qty'] = product_qty and when I enter 1000 in the user box I can see that result is correct, but then the quantity changes to 1. I also see that the Unit of Sale quantity does give the correct amount: 1000.


I found that onchange_quantity and onchange_pos_quantity are called both twice when quantities are 1000 to 900thousands, and then the shown quantity is incorrect. If not, both functions are called just once and the shown quanity is correct. That's it, I don't know what else to do.

Hey I think your problem is the decimal point. Try out to switch points and commas!

Florian Möller
on 10/30/13, 12:20 PM

I have tried without any decimal punctuation... just 1000000 and have the same result.

Luis Leiva
on 10/30/13, 12:30 PM

I have a may version, I am going to update to latest to see if it is a solved bug.

Luis Leiva
on 10/30/13, 12:46 PM

Well, I updated a test database to latest but still have the same behaviour, this tells me it is probably a misconfiguration or something I don't how it works. Any ideas??

Luis Leiva
on 10/30/13, 1:25 PM
Luis Leiva
On 10/30/13, 9:27 PM

Ok, I solved it. I don't know why it happens, I think it must be a bug. It, in fact, was decimal point related, as Florian suggested.

If you use unit of meausure with 0 decimal points you get this problem. I did it because I don't want any decimals in my quantities. So I just used 2 decimals again and worked it around.

Seems a bug to me. If someone can test it and knows how to use Launchpad it would be good.

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

0 follower(s)


Asked: 10/30/13, 11:59 AM
Seen: 1169 times
Last updated: 3/16/15, 8:10 AM