Hi community,
Am facing this issue.
i have this field in my model : start_date: field.Float()
For instance, if 10:20 is inputed in form view it's okay but when printed in pdf i got 10.5
What could be the issue?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi community,
Am facing this issue.
i have this field in my model : start_date: field.Float()
For instance, if 10:20 is inputed in form view it's okay but when printed in pdf i got 10.5
What could be the issue?
I faced something similar in my Odoo 13. Solution:
In the model:
start_date = fields.Float ('Date')
In QWeb report:
<span t-esc = "doc.start_date" t-options= '{"widget": "float_time"}'/>
Hope this helps someone. Cheers!
long story short: <span t-field="start_date" t-field-options='{"format": "%H:%M"} />
Use odoo date field
start_date = fields.Date('Date')
Instead of float
start_date: field.Float()
And in qweb reports use
<span t-field="doc.start_date"/>
For more information visit
1- http://learnopenerp.blogspot.com/2016/11/how-to-create-qweb-reports-in-openerp.html
2- http://learnopenerp.blogspot.com/2016/09/how-to-create-custom-reports-in-odoo.html
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Oct 23
|
4747 | ||
|
2
Nov 22
|
5159 | ||
|
0
Sep 21
|
1773 | ||
Create ticket from Email
Solved
|
|
2
Mar 20
|
9691 | |
|
2
Dec 19
|
1675 |
check the widget float_time