[6.1] digits attribute not respected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Web Team |
Bug Description
Hello,
There is a problem with the digit attibute in the new web client.
I was trying to set decimal precision to 4 digits in the hr.expense module.
I adapted the configuration of the decimal_precision module. It works in the database, but it was not visible in the ERP.
To correct this, I try to edit the XML of the view, and add the "digits" attribute.
The objects changed were "hr.expense" and "hr.expense.line".
Exemple: In the view "hr.expense.form", I change <field name="unit_
Here is the bugs.
The first one is in the page_view and/or list_view (not sure witch one): the attribute isn't well parsed. The result is that only 1 digit was displayed. I try to change the XML to <field name="unit_amount" digits="(4)"/> and I get 4 digits. So there is a problem with the format of the attribute.
The second one is that the attribute is well parsed in the form_view but not saved.
To use the attibute in the form view, the xml must be <field name="unit_amount" digits="(14,4)"/>. Then the function "parse_digits" of addons/
To correct this, the solution is to edit line 1529 and replace it by:
this.digits = this.parse_
So I have a "solution" for all the bugs but I can not use them at the same time !
Could you investigate on this ?
Thanks.
Related branches
- OpenERP R&D Web Team: Pending requested
-
Diff: 13 lines (+2/-1)1 file modifiedaddons/web/static/src/js/formats.js (+2/-1)
Changed in openerp-web: | |
status: | Confirmed → In Progress |
fixed in lp:~openerp-dev/openerp-web/trunk-bug-994589-vme.