next invoice number

Bug #1264157 reported by Erdem (7Gates.co)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Account - Analytic Accounting
Incomplete
Undecided
Unassigned

Bug Description

I have set up an OpenERP database with some modules on.. I changed the next invoice number in accounting, after I saved I have set up users and such but when I returned and tried to correct the next invoice number I got the below error. Note that there are no sales orders or invoices created yet. Just configuration with some customers and leads.

Client Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/account/res_config.py", line 183, in create
    self.write(cr, uid, [id], vals, context)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/orm.py", line 4180, in write
    result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/fields.py", line 1147, in set
    self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/fields.py", line 1190, in _fnct_write
    record.write({self.arg[-1]: values})
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/base/res/res_company.py", line 261, in write
    return super(res_company, self).write(cr, uid, ids, values, context=context)
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/orm.py", line 4093, in write
    result = self._store_get_values(cr, user, ids, vals.keys(), context) or []
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/osv/orm.py", line 4536, in _store_get_values
    target_ids = [id for id in function[id_mapping_fnct_](self, cr, SUPERUSER_ID, ids, context) if id]
  File "/usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/analytic_multicurrency/analytic.py", line 99, in _get_analytic_account
    return super(account_analytic_account, self)._get_analytic_account(
TypeError: super(type, obj): obj must be an instance or subtype of type

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

Would you please provide screen cast of your issue ? So, I can evaluate this in better way.

Waiting for answer.

Thank you.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

The error comes due to extra module (analytic_multicurrency) . This module has been developed by c2c and this is not the offical openerp module.

Lets trasfer this into proper project :-).

Thank you!

affects: openobject-addons → account-analytic
Revision history for this message
Hans Yonathan (hans-yonathan) wrote :

I have this bug too

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hi,

The actual problem occurs due to the `super` call in the function at,
addons/analytic_multicurrency/analytic.py", line 99, in _get_analytic_account

It calls a 'super' with class reference of account_analytic_account but the method is defined for the column
'currency_id' of store attribute for object res.company so the 'self' refers to res.comapny where the super
call has the class account_analytic_account ref.

It need to rewrite the same function again same as module, analytic/analytic.py.

Refer this bug report, https://bugs.launchpad.net/openobject-server/+bug/893079

Thanks,
Rifakat

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.