Skip to Content
Menu
This question has been flagged
2 Replies
4567 Views

Dears,

I am trying to create an activity for a model (Which is built by odoo studio). 

activity_record = {

'activity_type_id': 26,

'res_id': record['id'],

'res_model_id': 397,

'date_deadline': datetime.datetime.today(),

'user_id': record['x_studio_manager_id'],

'note': 'Awarded Days Approval'

}

env.get('mail.activity').create(activity_record)

This works fine, and i can see the activity created. however when the responsible user log in he can see a a new activity notification in the recent activities button. But clicking on the recent activities button gives the below error.

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 654, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 312, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/home/odoo/src/odoo/12.0/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 696, in dispatch

    result = self._call_function(**self.params)

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 344, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/home/odoo/src/odoo/12.0/odoo/service/model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 337, in checked_call

    result = self.endpoint(*a, **kw)

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 939, in __call__

    return self.method(*args, **kw)

  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 517, in response_wrap

    response = f(*args, **kw)

  File "/home/odoo/src/odoo/12.0/addons/web/controllers/main.py", line 962, in call_kw

    return self._call_kw(model, method, args, kwargs)

  File "/home/odoo/src/odoo/12.0/addons/web/controllers/main.py", line 954, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/home/odoo/src/odoo/12.0/odoo/api.py", line 745, in call_kw

    return _call_kw_model(method, model, args, kwargs)

  File "/home/odoo/src/odoo/12.0/odoo/api.py", line 718, in _call_kw_model

    result = method(recs, *args, **kwargs)

  File "/home/odoo/src/odoo/12.0/addons/contacts/models/res_users.py", line 15, in systray_get_activities

    activities = super(Users, self).systray_get_activities()

  File "/home/odoo/src/odoo/12.0/addons/calendar/models/res_users.py", line 33, in systray_get_activities

    res = super(Users, self).systray_get_activities()

  File "/home/odoo/src/odoo/12.0/addons/mail/models/res_users.py", line 136, in systray_get_activities

    'icon': modules.module.get_module_icon(self.env[activity['model']]._original_module),

  File "/home/odoo/src/odoo/12.0/odoo/modules/module.py", line 261, in get_module_icon

    if get_module_resource(module, *iconpath):

  File "/home/odoo/src/odoo/12.0/odoo/modules/module.py", line 216, in get_resource_path

    mod_path = get_module_path(module)

  File "/home/odoo/src/odoo/12.0/odoo/modules/module.py", line 166, in get_module_path

    files = [opj(adp, module, manifest) for manifest in MANIFEST_NAMES] +\

  File "/home/odoo/src/odoo/12.0/odoo/modules/module.py", line 166, in <listcomp>

    files = [opj(adp, module, manifest) for manifest in MANIFEST_NAMES] +\

  File "/usr/lib/python3.6/posixpath.py", line 94, in join

    genericpath._check_arg_types('join', a, *p)

  File "/usr/lib/python3.6/genericpath.py", line 149, in _check_arg_types

    (funcname, s.__class__.__name__)) from None

TypeError: join() argument must be str or bytes, not 'bool'

Avatar
Discard
Best Answer

Try to change the type of the field to "boolean"

Avatar
Discard
Best Answer

Same issue, did you solve it?

Avatar
Discard

Try to change the type of the field to "boolean"