Error al crear cuentas

Bug #1002995 reported by Juan José Pimentel (Digisolution)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
account-management
New
Undecided
Unassigned

Bug Description

Revision:
406 <email address hidden>

Al crear las cuentas se produce el siguiente error:

ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/opt/openerp/development/6.0/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/development/6.0/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/development/6.0/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/development/6.0/modules/account_management/model/account_partner.py", line 171, in create
    self._check(cr, uid, vals,context)
TypeError: _check() takes exactly 4 arguments (5 given)

El metodo _check() esta definido asi:

 def _check(self, cr, uid, vals):
        cuentas=[vals.get('property_account_partner',False)]
        if not cuentas[0]:
            partner_acc_id = vals.get('id',False)
            if partner_acc_id:
                cuentas=[self.browse(cr, uid,partner_acc_id).property_account_partner.id]

        pattern = self.pool.get('res.company').browse(cr, uid, vals['company_id']).pattern
        self.pool.get('res.company')._check_accounts(cr, uid, pattern, cuentas)
        #~ vals['name'] = self._get_name(cr, uid, cuentas)
        return vals

Se hizo el llamado asi:

self._check(cr, uid, vals,context)

Solucion:

se quita el context del llamado o se agrega al metodo

Saludos

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.