[FIX] web: currency digits

- Set the currency rounding to 0.001 (3 digits)
- Create an account move
- Add an account move line, set an account

When switching from edit/read-only mode, the rounding switches from 2 to
3 digits.

This is because, in edit mode, the format method is the method of the
float widget. Therefore, in this case, the formatting doesn't take into
account the currency rounding.

To avoid this, we simply use a `noSymbol` flag to avoid adding the
currency symbol, while keeping the monetary rounding.

opw-800279
This commit is contained in:
Nicolas Martinelli
2017-12-29 09:20:18 +01:00
committed by Nicolas Martinelli
parent 0126823f98
commit 88afd055cf
3 changed files with 60 additions and 3 deletions
@@ -562,8 +562,8 @@ var FieldMonetary = InputField.extend({
this.tagName = 'div';
this.className += ' o_input';
// use the formatFloat function in edit
this.formatType = 'float';
// do not display currency symbol in edit
this.formatOptions.noSymbol = true;
}
this.formatOptions.currency = this.currency;