Hello,
In order to warn our clients about the time spent on their tasks and the time remaining on the contract, I am trying to make an email template.
However the problem is that I have a different display of the hours:
Example on the client task:
Scheduled time: 60:00
Hours used: 01:10
Hours remaining: 58:50
In the email template we created here is what is displayed at the hours level:
Scheduled time: 60.0
Hours used: 1.17
Hours left: 58.83
The problem is that this type of display is not understandable to the customer.
Here is the code we used in the mail template:
t t-out="object.planned_hours" data-oe-t-inline="true" style="box-sizing:border-box;" contenteditable="false"
t t-out="object.total_hours_spent" data-oe-t-inline="true" style="box-sizing:border-box;" contenteditable="false"
t t-out="object.remaining_hours" data-oe-t-inline="true" style="box-sizing:border-box;" contenteditable="false"
How can we do to display the times in the classic way (hh: mm) as is the case in the timesheet of a task?
Thank you in advance for your help !
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
2
Trả lời
1425
Lượt xem
Indeed I need to change the display to make it more understandable for my clients.
However, I would need a syntax that works in the mail templates!
Do you have any idea how to do it?
Have you tried just converting it yourself? Taking all the hours and the remaining like that but instead of minutes and seconds using hours and minutes:
print(f'{(time.time() - start_time)/60:.0f}min {(time.time() - start_time)%60:.0f}s')
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký
Hello, Thanks for the reply but I don't think I can use this syntax in template mail ?
I was just setting an example. You need to change the display right? If odoo works like that let it be.