← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

Hi Olivier,

I think maybe you miss understand my point. My point is that the label in the form doesn't respect the code.
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. The correct one should be : 1 tonne = 1000 * kg, which is exactly the same way as you explain. I think the problem is at the invisible attributes, when it's a bigger unit, it uses ratio of "factor", and when it's a smaller unit, it uses a "factor_inv" ratio.


                                  <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>
should be
                                  <group col="2" colspan="2" attrs="{'invisible':[('uom_type','!=','bigger')]}">
                                        <field name="factor"/>
                                        <label colspan="2" string=" e.g: 1 * (reference unit) = ratio * (this unit)"/>
                                   </group>

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



Follow ups

References