Skip to content

Commit

Permalink
[FIX] account: wrong currency separator in the tax field
Browse files Browse the repository at this point in the history
The issue:
1.) Switch to German language (or any language that uses , versus . as a point separator
2.) Create a vendor bill
3.) Add items
4.) Click on the pencil/edit icon next to the tax field (below subtotal)
5.) Separator used is . instead of ,

The fix:
the field will use the right separator depending on the currency.

closes #95130

X-original-commit: 3cca50b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
  • Loading branch information
Ayoub Amzil committed Jul 4, 2022
1 parent 42b6b43 commit 311e751
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/account/static/src/js/tax_totals.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ class TaxGroupComponent extends Component {

patched() {
if (this.state.value === 'edit') {
let newValue = this.props.taxGroup.tax_group_amount;
let currency = session.get_currency(this.props.record.data.currency_id.data.id);

newValue = fieldUtils.format.float(newValue, null, {digits: currency.digits});
this.inputTax.el.focus(); // Focus the input
this.inputTax.el.value = this.props.taxGroup.tax_group_amount;
this.inputTax.el.value = newValue;
}
}

Expand Down

0 comments on commit 311e751

Please sign in to comment.