تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5566 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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?

الكاتب

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
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يناير 25
5849
3
فبراير 24
3210
1
فبراير 23
3209
0
نوفمبر 18
2750
0
ديسمبر 17
2809