[FIX] payment mode - account must belong to company

lp bug: https://launchpad.net/bugs/739562 fixed

bzr revid: skh@tinyerp.com-20110406051337-852xk8bsz2feloro
This commit is contained in:
skh 2011-04-06 10:43:37 +05:30
parent abc1e15112
commit 93c75e59e6
1 changed files with 2 additions and 2 deletions

View File

@ -52,8 +52,8 @@ class payment_mode(osv.osv):
WHERE pm.id = %s """, [payment_code])
return [x[0] for x in cr.fetchall()]
def onchange_company_id (self, cr, uid, ids, company_id = False, context = None):
result={}
def onchange_company_id (self, cr, uid, ids, company_id=False, context=None):
result = {}
if company_id:
partner_id = self.pool.get('res.company').browse(cr, uid, company_id).partner_id.id
result['partner_id'] = partner_id