Odoo Help


Duplicate Button Error [Closed]

George Tsagkogeorgas
on 1/21/14, 7:09 AM 1,763 views

The Question has been closed for reason: duplicate question

on 04/17/2015 06:18:22

I have created a button at invoice  

  def duplicate_method(self, cr, uid,ids, context=None):
        self.copy(cr,uid, ids,default=None, context=None)
        return True

I get the next error:

  File "/opt/openerp/v7/web/addons/web/controllers/main.py", line 1121, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/v7/web/addons/web/session.py", line 43, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/v7/web/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/v7/web/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/v7/web/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/v7/server/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/v7/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/v7/addons/invoice_control/invoice_control.py", line 129, in invoice_noinvoiced
    self.copy(cr, uid, ids,default=None, context=None)
  File "/opt/openerp/v7/addons/invoice_control/invoice_control.py", line 146, in copy
    return super(account_invoice, self).copy(cr, uid, id, default, context)
  File "/opt/openerp/v7/addons/account/account_invoice.py", line 681, in copy
    return super(account_invoice, self).copy(cr, uid, id, default, context)
  File "/opt/openerp/v7/addons/mail/mail_thread.py", line 291, in copy
    return super(mail_thread, self).copy(cr, uid, id, default=default, context=context)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 5025, in copy
    data = self.copy_data(cr, uid, id, default, context)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 4916, in copy_data
    data = self.read(cr, uid, [id,], context=context_wo_lang)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3604, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 3655, in _read_flat
    for sub_ids in cr.split_for_in_conditions(ids):
  File "/opt/openerp/v7/server/openerp/sql_db.py", line 258, in split_for_in_conditions
    return tools.misc.split_every(self.IN_MAX, set(ids))
TypeError: unhashable type: 'list'


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 1/21/14, 7:09 AM
Seen: 1763 times
Last updated: 4/17/15, 6:18 AM