This question has been flagged
1 Reply
3124 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?

Thanks.


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.

Anyone?


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.

Avatar
Discard

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

Author

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

Author

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

Author

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??

Author Best Answer

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.

Avatar
Discard