2017-08-24 1 views
2

Ceci est mon code.Odoo10 étrange avertissement

<span t-esc="o.amount_total * (o.type in 'out_refund' and -1 or 1)" t-esc-options='{"widget": monetary, "display_currency": o.currency_id}'/> 

dans Odoo10 Je reçois cet avertissement

WARNING db odoo.addons.base.ir.ir_qweb.ir_qweb: Use new syntax for '<span t-esc="o.amount_total * (o.type in 'out_refund' and -1 or 1)" t-tag="span"/> 
widget monetary 
      ' monetary widget t-options (python dict instead of deprecated JSON syntax). 

ce qui ne va pas avec mon code?

Répondre

0

Essayez-le.

Le problème est que vous donnez des options comme json. mais vous devez le passer en dictionnaire python.

<span t-esc="o.amount_total * (o.type in 'out_refund' and -1 or 1)" t-esc-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>