Odoo Help

Welcome!

This community 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.

0

Odoo 8 Leave Module Error

By
Andreas Santoro
on 11/12/14, 3:16 AM 929 views

Hi everyone,

 

I currently try to understand a bug.

 

When I create an employee with the only rule „Human Resources : Employee“ + creating the corresponding employee.

 

If this user tries to register his leave, I always get the following error:

 

TypeError: argument of type 'function' is not iterable

I do not understand what I am doing wrong here.

 

 

The full stack trace is:

 

Odoo 

OpenERP Server Error

Traceback (most recent call last): File "/opt/odoo/odoo-server/openerp/http.py", line 500, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo-server/openerp/http.py", line 517, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo-server/openerp/http.py", line 283, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/http.py", line 280, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/odoo-server/openerp/http.py", line 733, in __call__ return self.method(*args, **kw) File "/opt/odoo/odoo-server/openerp/http.py", line 376, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 948, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 940, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/hr_holidays/hr_holidays.py", line 330, in create return super(hr_holidays, self).create(cr, uid, values, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_thread.py", line 401, in create self.message_track(cr, uid, [thread_id], tracked_fields, initial_values, context=track_ctx) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_thread.py", line 549, in message_track self.message_post(cr, uid, browse_record.id, body=message, subtype=subtype, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_thread.py", line 1655, in message_post msg_id = mail_message.create(cr, uid, values, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 808, in create user_signature=context.get('mail_notify_user_signature', True)) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 877, in _notify force_send=force_send, user_signature=user_signature File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_followers.py", line 246, in _notify self._notify_email(cr, SUPERUSER_ID, new_notif_ids, message_id, force_send, user_signature, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_followers.py", line 219, in _notify_email email_ids.append(self.pool.get('mail.mail').create(cr, uid, mail_values, context=context)) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/fetchmail/fetchmail.py", line 298, in create res = super(mail_mail, self).create(cr, uid, values, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_mail.py", line 84, in create return super(mail_mail, self).create(cr, uid, values, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/api.py", line 332, in old_api result = method(recs, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3949, in create vals = self._add_missing_default_values(vals) File "/opt/odoo/odoo-server/openerp/api.py", line 235, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/api.py", line 464, in new_api result = method(self._model, cr, uid, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 1829, in _add_missing_default_values defaults = self.default_get(cr, uid, list(missing_defaults), context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_mail.py", line 76, in default_get if context and context.get('default_type') and context.get('default_type') not in self._fields['type'].selection: TypeError: argument of type 'function' is not iterabl

 

 

Best regards / Mit freundlichen Grüßen

Andreas Santoro
Pentland Firth Software GmbH
Unterer Anger 3
80331 München, Germany
Mobile +49 (0)175 723 56 92
Phone +49 (0)89 5908 3700
andreas.santoro@pentlandfirth.com

----------------------------------------------------------------------------------------------------------------------------------
Pentland Firth is SAP Gold Partner, Microsoft Gold Partner and Oracle Silver Partner

Brands we own: www.opexcentral.com,  www.sweetlets.com and www.mereko.de
----------------------------------------------------------------------------------------------------------------------------------

Sitz der Gesellschaft: München, Handelsregister München, HRB 155 786, Geschäftsführer: Frank Heinrich

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/12/14, 3:16 AM
Seen: 929 times
Last updated: 3/16/15, 8:10 AM