To create two float fields in openerp you have to make third fields function and also this is a auto calculate in openerp.
Like:- field3 = field1 + field2
EXAMLE -
'field3' : fields.function(get_total, method=True, string='FIELD3',type='integer'),
this function will create auto calculation.
def get_total(self, cr, uid, ids, fields, arg, context):
x={}
for record in self.browse(cr, uid, ids):
x[record.id]= record.field1 + record.field2
return x
0 Comment(s)