Hi everybody!!!
Please i want to add two fields type integer from the same class and to display it in a third field from the same classe. Can anyone help me please
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi everybody!!!
Please i want to add two fields type integer from the same class and to display it in a third field from the same classe. Can anyone help me please
def _add_numbers(self, cr, uid, ids, field_name, arg, context=None):
res = {}
for record in self.browse(cr, uid, ids, context=context):
res[record.id] = record.number1 + record.number2
return res
'number1':fields.float('First Value'),
'number2':fields.float('Second Value'),
'result':fields.function(_add_numbers,method= True,type='float',string='Result'),
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
4
ต.ค. 16
|
31293 | ||
|
1
ก.ย. 15
|
3953 | ||
|
1
มิ.ย. 15
|
868 | ||
|
0
เม.ย. 15
|
702 | ||
|
2
เม.ย. 15
|
888 |