Odoo Help

Welcome!

This community 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.

0

Record time in hours and show days on invoice?

By
ACLENYON Sprl
on 6/7/13, 2:41 PM 994 views

Hello,

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?

Phil

0
Alexander
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?

ACLENYON Sprl
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()
                ctx.update({'uom':uom})

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
ACLENYON Sprl
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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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