← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 726294] Re: inconsistence in form/tree of product.uom

 

Le 04/03/11 05:03, Phong Nguyen-Thanh a écrit :
> For example, in the form view (1st image attached), it says:
 >     1 * (this unit) = ratio * (reference unit),
 > in this case, I will read:
 >     1 * (tonne) = 0,001 * kg, which is completely wrong.

Yes and it is correct according to what you have set!
But you really have set it as 1 tonne = 0,001 kg, and this is
most likely not what you want...
It is easy to see that something is wrong, because normally
the ratio is meant to be an integer greater than 1 when the
proper type of unit is selected (smaller/bigger than ref).
(This is because the integer > 1 is always the intuitive
number people think of when converting UoMs)
Is Tonne bigger than Kg? If yes, then ratio should be >1
when "bigger than ref" is selected.

As I told you, the problem is that factor and factor_inv are
not intuitive, so you should not think in terms of them, and
let the system do it for you.
The ratio will be put into factor or factor_inv depending on
the options chosen (unit is smaller or bigger than reference).

In the case of kg being reference unit, you actually need to
have:
   Kg : type=reference unit
        factor = 1, factor_inv = 1

   Tonne: type=bigger, ratio=factor_inv
          factor = 0.001, factor_inv = 1000,

Check the demo data in v6, this example is included, and you
will see that it is correct and that all tooltips are correct
with these values.

Maybe you are confused by the fact that the list view shows
the factor column with 'Ratio' as the title. Only the factor
is shown to make the view simpler for users, and also to
keep values that can be compared with each other.
We could display the actual Ratio (i.e. factor of factor_inv)
depending on the type, but this would mean that the type needs
to be displayed too, and we preferred to keep the view simple.

Maybe this could be a suggestion for improvement in next version,
to be posted on feedback.openerp.com, to see if people would
like it better if the list view was more complete.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/726294

Title:
  inconsistence in form/tree of product.uom

Status in OpenERP Modules (addons):
  Opinion

Bug description:
  The form view product.uom.form is not correct/consistent in regards to
  product.uom.tree. In the product.uom.tree view, the field "factor" is
  used and correctly shown. In product.uom.form, "factor" and
  "factor_inv" is used depending on whether the unit is bigger or
  smaller than the reference price, together with notes explaining the
  usage, but I think the notes/the code is not correct: it should be the
  opposite. This is very confused, for people new to OpenERP (when using
  the form view to add/edit)

                              <group colspan="2" col="2">
                                    <group col="2" colspan="2" attrs="{'invisible':[('uom_type','!=','smaller')]}">
                                          <field name="factor"/>
                                          <label colspan="2" string="  e.g: 1 * (reference unit) = ratio * (this unit)"/>
                                     </group>
                                     <group col="2" colspan="2" attrs="{'invisible':[('uom_type','!=','bigger')]}">
                                          <field name="factor_inv"/>
                                          <label colspan="2" string="  e.g: 1 * (this unit) = ratio * (reference unit)"/>
                                     </group>
                              </group>



References