Odoo Help


Record time in hours and show days on invoice?

on 6/7/13, 2:41 PM 1,098 views


I am using the contract module and want to feed time spent at customers in hours. The contract is signed in hours. I can have the conversion from days to hours automatic so the total amount on the invoice is correct but it is in hours and I'd like to have it in days. Product is specified in days.

Any idea?


On 6/8/13, 5:42 PM

You can write your own extra module.

Inherited contract model will contain functional field.

Actually, I do not need and additional field, I simply want to use the uos from the product. I guess I can patch the hr_timesheet_invoice module, no?

on 6/9/13, 4:21 AM

I fixed by patching hr_timesheet_invoice. I believe this is bug in OpenERP. If I set a uos then I want my invoice to be in uos and not in uom. That's the whole point of different uos and uom, no?

Here is the original code:

                ctx =  context.copy()

Insert 3 lines in between the 2 above lines:

                uom = product.uos_id.id or product.uom_id.id
                if product.uos_id:
                    qty *= product.uos_coeff
on 6/9/13, 9:22 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


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

0 follower(s)


Asked: 6/7/13, 2:41 PM
Seen: 1098 times
Last updated: 3/16/15, 8:10 AM