Please help, I have two columns, columns A and B (A and B of type float). so I want to make if I fill the value in column A and hit save, auto value I enter in column A will also appear in column B
I make like this
def _dept_count(self, cr, uid, ids,A,B,arg, context=None):
result = {}
for r in self.browse(cr, uid, ids, context=context):
B=0
if r.deposit:
B = A
result[r.id] = A
return result
_columns = {
'name': fields.many2one('res.partner','Partner'),
'date':fields.date('Date of Deposit'),
#'deposit': fields.function(_save_deposit, type='float',string='Deposit'),
'available': fields.float('Available'),
'note': fields.text('Description'),
}
but there is no response to anything. was not included in the database. please help
P.S
his second was in the same database
I can see two problems on your code:
deposituses function_save_deposit, not_dept_count;dept_countreturns a dict, and should return a float.If you are trying to update
availablewhendepositis changed, why not override thecreateandwritemethods instead?