Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[l10n_ch_hr_payroll] - Error on Compute Sheet in hr_payslip.py #192

Closed
johannbelet opened this issue Nov 9, 2015 · 0 comments
Closed

[l10n_ch_hr_payroll] - Error on Compute Sheet in hr_payslip.py #192

johannbelet opened this issue Nov 9, 2015 · 0 comments

Comments

@johannbelet
Copy link

Traceback (most recent call last):
File "/Users/jox/Workspace/odoo8/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/Users/jox/Workspace/odoo8/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/Users/jox/Workspace/odoo8/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/Users/jox/Workspace/odoo8/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/Users/jox/Workspace/odoo8/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/Users/jox/Workspace/odoo8/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/Users/jox/Workspace/odoo8/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/Users/jox/Workspace/odoo8/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/Users/jox/Workspace/odoo8/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/Users/jox/Workspace/odoo8/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/Users/jox/Workspace/odoo8/openerp/api.py", line 372, in old_api
result = method(recs, _args, *_kwargs)
File "/Users/jox/Workspace/odoo8_complements/l10n_ch_hr_payroll/models/hr_payslip.py", line 132, > in compute_sheet
and a.type='liquidity'""" % ','.join(moves)
TypeError: sequence item 0: expected string, account.move found

When using "Compute Sheet" and when there are at least one paid invoice bind to the employee.

Solved the issue by changing following code:
line 132:

and a.type='liquidity'""" % ','.join(moves)

by

and a.type='liquidity'""" % ",".join(["%s" % (i) for i in moves.ids])

Need a confirmation maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant