Sunday, April 21, 2024
4 changes · 17.0
Resolved issues and error corrections
This fix ensures that when viewing appointment schedules in a Gantt chart view, only resources and events from the current company are displayed. Previously, the system could show scheduling information from resources belonging to other companies, which could cause confusion and scheduling conflicts in multi-company setups.
Original PR description
As resources are bound to companies, we need to filter out the events we display so that only events with resources from valid companies are displayed in gantt. task-3565337 Forward-Port-Of: odoo/enterprise#52771
This fix corrects a module dependency issue in the Dutch tax reporting system that was introduced in a previous update. Users can now install the status information module independently without being forced to install additional intrastat modules, making the system more flexible and reducing unnecessary dependencies.
Original PR description
https://github.com/odoo/enterprise/pull/60777 introduced a module dependence bug. We didn't want to force user to install the intrastat modules for that fix so this fix ensure the l10n_nl_reports_sbr_status_info module can be installed just for l10n_nl_reports_sbr. Forward-Port-Of: odoo/enterprise#61148
This fix resolves a crash that occurred when users tried to view records from a spreadsheet pivot table before the data had finished loading. The issue happened specifically when a pivot function was wrapped in an error-handling formula and users clicked "See records" during the loading process. This update ensures the feature works reliably regardless of loading state.
Original PR description
Steps to reproduce:
- wrap a pivot function inside a IFERROR e.g. =IFERROR(PIVOT("1", "probability"), 42)
- reload the spreadsheet
- before the pivot is loaded (throttle the network in the dev tools): right click the cell
- click on "See records" menu item => boom
Task: 3847477
X-original-commit: odoo/enterprise@31401c75baa4252917fe5d808be0abd5fc23a906
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#162750
Forward-Port-Of: odoo/odoo#162568This fix resolves a crash that occurred when users tried to download e-Faktur (Indonesian electronic invoices) for invoices without a tax number. The system now properly handles cases where the tax number field is empty, preventing the application from attempting to process missing data and causing an error.
Original PR description
Currently, the error arises when downloading e-Faktur without a 'Tax Number'. Steps to reproduce: - Install a 'l10n_id_efaktur' module (with demo data). - Navigate to Invoicing -> Customers ->…
Currently, the error arises when downloading e-Faktur without a 'Tax Number'.
Steps to reproduce:
- Install a 'l10n_id_efaktur' module (with demo data).
- Navigate to Invoicing -> Customers -> Invoices and open any invoice with an empty 'Tax Number' field.
- Click on the action button to download e-Faktur.
Stack Trace :
```
TypeError: 'bool' object is not subscriptable
File "odoo/tools/safe_eval.py", line 365, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(801,)", line 1, in <module>
File "addons/l10n_id_efaktur/models/account_move.py", line 143, in download_efaktur
self._generate_efaktur(',')
File "addons/l10n_id_efaktur/models/account_move.py", line 338, in _generate_efaktur
output_head = self._generate_efaktur_invoice(delimiter)
File "addons/l10n_id_efaktur/models/account_move.py", line 178, in _generate_efaktur_invoice
eTax['KD_JENIS_TRANSAKSI'] = move.l10n_id_tax_number[0:2] or 0
ValueError: <class 'TypeError'>: "'bool' object is not subscriptable" while evaluating
'action = records.download_efaktur()'
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1826, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1824, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/action.py", line 46, in run
result = action.run()
File "home/odoo/src/custom/trial/saas_trial/models/sentry.py", line 33, in run
res = super().run()
File "odoo/addons/base/models/ir_actions.py", line 938, in run
res = runner(run_self, eval_context=eval_context)
File "addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "odoo/addons/base/models/ir_actions.py", line 770, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "odoo/tools/safe_eval.py", line 379, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
```
When downloading e-Faktur, There's an issue at [1], Where the system tries to access elements of 'l10n_id_tax_number', but 'Tax Number' is empty, So 'l10n_id_tax_number' is considered as a 'False'.
[1] : https://github.com/odoo/odoo/blob/9c4194ad3387c55d39ec7bbef1c6414893098c6e/addons/l10n_id_efaktur/models/account_move.py#L168-L170
This commit fixes the above issue by adding a condition to ensure that the system only accesses an 'l10n_id_tax_number' if it is available.
sentry-5001664034
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#162096
Forward-Port-Of: odoo/odoo#155196