Hello,
I want to change the display of the duration of an event in the tree view of crm.meeting . Currently the duration is displayed in hours and i want it to be displayed in days.
Any help is appreciated.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I want to change the display of the duration of an event in the tree view of crm.meeting . Currently the duration is displayed in hours and i want it to be displayed in days.
Any help is appreciated.
Find it.
I use a functional field "duration_in_day" whose the value is equal to the duration field's / 24.
Here is my code :
class crm_meeting(osv.osv):
def compute_duration_in_day(self, cr, uid, ids, field_name, field_value, arg, context=None):
records = self.browse(cr, uid, ids)
result = {}
for r in records:
flt = 0.0
if r.duration: flt = r.duration / 24
result[r.id] = flt
return result
_inherit = 'crm.meeting'
_name = 'crm.meeting'
_columns = {
'duration_in_day': fields.function(compute_duration_in_day, type='float', string='Durée en jours'),
}
crm_meeting()
However i don't think it's optimised.
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ| Related Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
|---|---|---|---|---|
|
2
มี.ค. 15
|
6190 | |||
|
0
มี.ค. 15
|
9006 | |||
|
1
มี.ค. 15
|
5713 | |||
|
0
มี.ค. 15
|
4761 | |||
|
3
ก.ค. 20
|
8699 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.