module fms - error to create Fuellog

Bug #1046832 reported by oldbay on 2012-09-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP modules by Vertel
Anders Wallenquist

Bug Description

openerp v6.1 (bazaar version)
Install module fms
When trying to create fuel log(FLEET MANAGER ->Operations Managment->Fuel Log-> click to "Create"), getting error:

Client Traceback (most recent call last):
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/web/common/", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/web/controllers/", line 1065, in default_get
    return Model.default_get(fields, req.session.eval_context(req.context))
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/web/common/openerplib/", line 250, in proxy
    args, kw)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/web/common/openerplib/", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/web/common/", line 608, in send
    raise xmlrpclib.Fault(, formatted_info)

Server Traceback (most recent call last):
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/web/common/", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/service/", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/osv/", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/osv/", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/osv/", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/osv/", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/osv/", line 1503, in default_get
    defaults[f] = self._defaults[f](self, cr, uid, context)
  File "/home/oldbay/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/addons/fms/", line 185, in <lambda>
    'general_account_id': lambda obj,cr,uid,context: obj._get_type(cr,uid,context),
AttributeError: 'NoneType' object has no attribute 'id'

Anders Wallenquist (aw) on 2012-09-18
Changed in openerp-vertel:
status: New → Confirmed
importance: Undecided → High
Anders Wallenquist (aw) wrote :

This is corrected in release # 95, soon in

Changed in openerp-vertel:
status: Confirmed → Fix Released
assignee: nobody → Anders Wallenquist (aw)
Anders Wallenquist (aw) wrote :

You have to add a standard account for Fuel Log for the company

oldbay (old-bay) wrote :

in web interface OK!
in GTK Openerp Client: click to "FLEET MANAGER ->Operations Managment->Fuel Log" and "FLEET MANAGER ->Operations Managment->Fleet Card Expenses",getting error:

File "/home/admin/Dropbox/workspace/OpenERP/src/OpenERP/6.1/site-packages/openerp/wsgi/", line 80, in xmlrpc_return
    response = xmlrpclib.dumps((result,), methodresponse=1, allow_none=False, encoding=None)
  File "/usr/lib/python2.7/", line 1085, in dumps
    data = m.dumps(params)
  File "/usr/lib/python2.7/", line 632, in dumps
    dump(v, write)
  File "/usr/lib/python2.7/", line 654, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/", line 735, in dump_struct
    dump(v, write)
  File "/usr/lib/python2.7/", line 654, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/", line 735, in dump_struct
    dump(v, write)
  File "/usr/lib/python2.7/", line 654, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/", line 658, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled

This is a GTK Client error only, as

Anders Wallenquist (aw) wrote :

Tank you oldbay for the heads up on the GTK-client problem.

I have added a new bug report for this.

You also added a nice tip for the solution. It seems if I change the behaivor of onchange this bug could be solved. Do you now any example of code that demonstrates this solution?:
Using "onchange( parameter or False )" constructs, you can prevent this.

oldbay (old-bay) wrote :

Editinng file in GTK Client (add "allow_none=True" to all xmlrpclib.ServerProxy calls in, the problem is not fixed.

Problem is fixed edit wsgi/ file in openerp-server (edit all "xmlrpclib.dumps(fault, allow_none=False, encoding=None)" to "xmlrpclib.dumps(fault, allow_none=True, encoding=None)" ), so works.
I do not know - whether it is correct.

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

Other bug subscribers