This question has been flagged
3 Replies
3207 Views

Hello all,

We are producing plastic caps and keeping the stock values of the caps in Units. But we sell them as Boxes, and we have 450 units of caps in each box. Our warehouse workers are also working with Boxes rather than units. 

What I want to do is to set the UoS as Boxes, and keep the UoM units in Units.

In my case, the Unit of Measure -> UOS Coeff is 1/450, which is 0.00222222222.. however when I enter this number, it automatically rounds it up to 0.00, which is the set decimal accuracy for UoM and UoS in the configuration. I don't want to change the decimal count as it creates confusion on the employees and customers, but then I am not able to sell the goods as boxes. Can anybody help me with this?

Avatar
Discard
Best Answer

I think you need the other way around. Have you made the UoM box yet?

If so, it should be "bigger than reference UoM", where reference UoM is "units" and the qty is 450. This way you do not need to enter 1/450. Or am I mistaking your wishes?

Avatar
Discard
Author Best Answer

I fixed it by doing the following:

  • I created a new decimal accuracy (UOSCOF) entry on the Settings > Technical >  Database Structure > Decimal Accuracy
  • I modified product.py file which is located at /usr/share/pyshared/openerp/addons/product/product.py. I changed the line         'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('UOSCOF'), and now it gets the decimal accuracy from my new entry. 

It's all working perfectly now

Avatar
Discard
Best Answer

You are right Ludo.

Just for the game: could you please take a look at https://www.odoo.com/forum/help-1/question/unit-of-measure-rounding-does-not-allow-you-to-ship-error-with-my-uom-53988 and tell me what you think ?

 

Avatar
Discard