← Back to team overview

openerp-india team mailing list archive

[Bug 829385] Re: wrong display of product UoS ratio in product form

 

Hello,

As I am now a bit deeper than before in all that python stuff, I
realized that the field I'm speaking about is "uos_coeff" which is
brought by the module "product". Its number of digits is 4:

'uos_coeff': fields.float('UOM -> UOS Coeff', digits=(16,4),
            help='Coefficient to convert UOM to UOS\n'
            ' uos = uom * coeff'),

I'm going to change it myself by inheriting the object in another
module. I think I'll set it to 10 or 12. Do you have any recommendation
on this number ? Does it affect global performance ?

Tx in advance,

Farid

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/829385

Title:
  wrong display of product UoS ratio in product form

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Hello,

  I'm using OpenERP v6.0.2 on ubuntu 10.10

  I'd like to report a "bug" over the UoS ratio in the product form.

  
  This field only support 4 decimals. However, when you enter more decimals like 1,3333333333333 instead of 1,3333, OpenERP does take into account all the figures you enter but, when you save your form, the field is reformated to 1,3333. 
  Now if you don't edit your product again, OpenERP will keep your 1,3333333333333 in memory and display the correct ratio in any document. But if you edit that product again and save it without rewriting the whole ratio in the UoS ratio field, OpenERP will only keep the 4 decimals in memory. I can let you imagine the calculation errors it can generate in any document then.
  For now the only way I know to fix this myself is to rewrite the whole ratio, each time that I edit a product, which is kinda heavy when you have hundreds of products with different ratios.

  I believe that a simple extension of the UoS ratio number of decimals
  could solve that problem.

  Also, is it possible for that field to propose a ratio automatically
  (the one of the UoS) when you choose your UoS from your saved units of
  measure?

  Many thanks in advance

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/829385/+subscriptions