Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Fix error in in-kind entitlement #112

Closed
gonzalesedwin1123 opened this issue Sep 7, 2023 · 2 comments · Fixed by #113
Closed

Fix error in in-kind entitlement #112

gonzalesedwin1123 opened this issue Sep 7, 2023 · 2 comments · Fixed by #113
Assignees
Labels
bug Something isn't working

Comments

@gonzalesedwin1123
Copy link
Member

gonzalesedwin1123 commented Sep 7, 2023

1. An error occurred when the in-kind entitlements are sent for approval.

Error log:

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 687, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 916, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 535, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 1346, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 1334, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/auto/addons/g2p_programs/models/cycle.py", line 184, in to_approve
    self.program_id.get_manager(
  File "/opt/odoo/auto/addons/spp_entitlement_in_kind/models/entitlement_manager.py", line 170, in set_pending_validation_entitlements
    self._set_pending_validation_entitlements_async(cycle, entitlements_count)
  File "/opt/odoo/auto/addons/g2p_programs/models/managers/entitlement_manager.py", line 67, in _set_pending_validation_entitlements_async
    entitlements_count = len(entitlements)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
TypeError: object of type 'int' has no len()

2. Creation of cycles is not enrolling eligible registrants to the new cycle.
3. Registrants are not enrolled to cycle when the "Verify Eligibility" is clicked.

@gonzalesedwin1123 gonzalesedwin1123 self-assigned this Sep 7, 2023
@gonzalesedwin1123 gonzalesedwin1123 changed the title Fix error in basket entitlement Fix error in in-kind entitlement Sep 7, 2023
@gonzalesedwin1123 gonzalesedwin1123 added the bug Something isn't working label Sep 7, 2023
@adriancris
Copy link

@adriancris
Copy link

tested and approved without comments

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants