Wednesday, January 22, 2025
1 change · saas-18.1
Resolved issues and error corrections
This update fixes an error that could prevent Indian e-Way Bills from being generated through IRN. It also ensures the system uses the latest response correctly when retrying or making subsequent requests, improving reliability for compliance workflows.
Original PR description
on generating ewaybill through irn following traceback is produced ```py Traceback (most recent call last): File "/home/odoo/src/odoo/saas-18.1/odoo/http.py", line 1997, in _transactioning return…
on generating ewaybill through irn following traceback is produced
```py
Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-18.1/odoo/http.py", line 1997, in _transactioning
return service_model.retrying(func, env=self.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/odoo/service/model.py", line 137, in retrying
result = func()
^^^^^^
File "/home/odoo/src/odoo/saas-18.1/odoo/http.py", line 1964, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/odoo/http.py", line 2214, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/odoo/addons/base/models/ir_http.py", line 334, in _dispatch
result = endpoint(**request.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/odoo/http.py", line 733, in route_wrapper
result = endpoint(self, *args, **params_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/addons/web/controllers/dataset.py", line 36, in call_button
action = call_kw(request.env[model], method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/odoo/service/model.py", line 62, in call_kw
result = getattr(recs, name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/addons/l10n_in_ewaybill_irn/models/l10n_in_ewaybill.py", line 49, in action_generate_ewaybill
ewaybill._generate_ewaybill_by_irn()
File "/home/odoo/src/odoo/saas-18.1/addons/l10n_in_ewaybill_irn/models/l10n_in_ewaybill.py", line 56, in _generate_ewaybill_by_irn
response = self._ewaybill_generate_by_irn(self._ewaybill_generate_irn_json())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-18.1/addons/l10n_in_ewaybill_irn/models/l10n_in_ewaybill.py", line 128, in _ewaybill_generate_by_irn
'message': EWayBillApi.DEFAULT_HELP_MESSAGE % 'generated',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
TypeError: unsupported operand type(s) for %: 'LazyGettext' and 'str'
```
In this commit, we fix the above traceback and also fixes a line where the response was not overriden on the next request
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr