hi
I write this function in account voucher module :
----------------------------------------------------
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date,section_id, context=None):
if not journal_id:
return {}
res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
vals = self.recompute_payment_rate(cr, uid, ids, res, currency_id, date, ttype, journal_id, amount, context=context)
for key in vals.keys():
res[key].update(vals[key])
return res
section_id = False
if partner_id:
section_id = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context).section_id.id
return {'value': {'section_id' : section_id}}
-----------------------------------------------------------------
but when I test it,
also 'for loop' is run. and 'if partner_id' doesn't run. I don't know what is problem?
I think problem is that I don't know haw can return multi value in one function.?!!
Thanks
please include which version(v7,v8orv9) are you using?