diff options
| author | Romain Derie <rde@odoo.com> | 2019-04-01 14:06:21 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2019-04-02 08:00:34 +0000 |
| commit | e8916a817c87ba7ba27b94afb5eca616ad7b97ef (patch) | |
| tree | 19493cd58876a9e0c1fd91292ef303db2b1c0dae /doc/python3.rst | |
| parent | b2b73b929556054094ccb497d3b5d367a77f497f (diff) | |
[IMP] website_sale_delivery: use monetary 'to_html' method
Before this commit:
Instead of using the `to_html` method from `ir.qweb.field.monetary`, we would
use `_format_amount` that would mimick `to_html` but without the HTML part,
keeping only the integer amount.
That was making the python, JS and XML code unnecessarily complexe.
Python: code duplicated between `to_html` and `_format_amount`
XML: double badge in DOM, one to show text and one to show t-field/monetary DOM
structure ($ <span class='oe_currency_value'>50.5</span>)
JS: handle both badges depending if need to show text or price, complexe
selector to target t-field integer DOM, and also handle d-none to show only
one at a time.
Now:
We removed the `_format_amount` method and use the standard one.
That way, XML, JS and python could be clean from unnecessary complexity.
Coming from #31857 (task-1867265)
closes odoo/odoo#32327
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'doc/python3.rst')
0 files changed, 0 insertions, 0 deletions
