[FIX] website_sale_delivery: restore monetary widget
In Odoo 11.0, fb5015d5fc fixed some flows related to prices. By doing that,
the `t-options` dict was set on a variable to avoid code duplication.
But starting from Odoo 12.0, setting a variable on `t-options` attribute seems
to do nothing and is ignored.
This commit fix it by setting the price rather than the options on a variable.
Fixes #33451
closes odoo/odoo#33900
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -34,11 +34,9 @@
|
||||
<t t-set='badge_class' t-value="(delivery_nb != 1 and 'float-right ' or '') + 'badge badge-secondary'" />
|
||||
<t t-if="delivery.delivery_type == 'fixed'">
|
||||
<span t-if="delivery.fixed_price > 0.0" t-att-class="badge_class">
|
||||
<t t-set="monetary_options" t-value='{"widget": "monetary",
|
||||
"from_currency": delivery.product_id.company_id.currency_id,
|
||||
"display_currency": website_sale_order.currency_id}'/>
|
||||
<t t-if="delivery.free_over" t-esc="delivery.rate_shipment(website_sale_order)['price']" t-options='monetary_options'/>
|
||||
<t t-else="" t-esc="delivery.fixed_price" t-options='monetary_options'/>
|
||||
<t t-esc="delivery.rate_shipment(website_sale_order)['price'] if delivery.free_over else delivery.fixed_price"
|
||||
t-options='{"widget": "monetary", "from_currency": delivery.product_id.company_id.currency_id,
|
||||
"display_currency": website_sale_order.currency_id}'/>
|
||||
</span>
|
||||
<span t-else="" t-att-class="badge_class">Free</span>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user