Odoo Help

0

Record time in hours and show days on invoice?

By
ACLENYON Sprl
on 6/7/13, 2:41 PM 1,422 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

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

0 follower(s)

Stats

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