Odoo Help

0

How to show widget="float_time" in Qweb Report ?

By
Jasad
on 8/31/15, 8:00 AM 1,778 views

How to show widget="float_time"  in Qweb Report ?

I want to show the time difference in Qweb Report. I already have a field in the database with widget float_time and I want to show the same in Report.

1

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
4405
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 8/31/15, 4:26 PM

not beautiful but it works


<t t-set="delay" t-value="1.5" />
<t t-esc="'%s:%s' % (str(delay).split('.')[0], int(float(str('%.2f' % delay).split('.')[1])/100*60))" />   

Don't think that it's native in Odoo

0
Guillaume JULLIEN
On 2/28/17, 12:19 PM

Try:

<t t-esc="'%02d:%02d' % (int(your_field), your_field % 1 * 60)" />

If

<span t-field="your_field" t-field-options='{"widget": "float_time"}' />

is still not implemented

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/31/15, 8:00 AM
Seen: 1778 times
Last updated: 2/28/17, 12:19 PM