Monday, August 4, 2025
3 changes · saas-17.4
Resolved issues and error corrections
This fixes an error that could prevent HR sample data from loading if the default Administration department had been deleted. Users can now load attendance-related sample data without encountering a traceback caused by the missing department reference.
Original PR description
When the ``dep_administration(Administration)`` is deleted and the user tries to load sample data, a traceback will appear. Steps to reproduce the error: - Install ``hr_attendance`` module - Go to…
When the ``dep_administration(Administration)`` is deleted and the user tries to load sample data, a traceback will appear. Steps to reproduce the error: - Install ``hr_attendance`` module - Go to Employees > Departments > Delete ``Administration`` - Go to Attendances > click on ``Load sample data`` Traceback: ``` ValueError: External ID not found in the system: hr.dep_administration ParseError: while parsing /home/odoo/src/odoo/18.0/addons/hr/data/scenarios/hr_scenario.xml: 126 somewhere inside <record id="employee_mw" model="hr.employee" forcecreate="1"> ``` https://github.com/odoo/odoo/blob/7757de56b3038710f2958c71ec9b3f1fdfbc7936/addons/hr/models/hr_employee.py#L681 When the user clicks on ``Load sample data``, ``data/scenarios/hr_scenario.xml`` file will load, but when ``dep_administration(Administration)`` is deleted, It will lead to the above traceback because ``dep_administration`` is used in ``data/scenarios/hr_scenario.xml`` file. sentry-6002819667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users without employee-related permissions can now load sample data in the Attendance app without seeing an error. This prevents a setup-time crash and makes it easier for teams to explore or demo HR Attendance safely.
Original PR description
Currently, an error occurs when a user without Employees value tries to load the sample data in hr_attendance. Steps to produce: 1) Install the hr and hr_attendance modules. 2) Create a user without…
Currently, an error occurs when a user without Employees value tries to load the sample data in hr_attendance.
Steps to produce:
1) Install the hr and hr_attendance modules.
2) Create a user without Employees value.
3) Log in with the newly created user.
4) Open the hr_attendance module.
5) Attempt to load the sample data.
6) An error occurs.
ValueError
ParseError('while parsing /home/odoo/src/odoo/saas-18.1/addons/hr/data/scenarios /hr_scenario.xml:5, somewhere inside`)
This error occurs when a user tries to load sample data in the hr_attendance module without having the necessary Employees permissions due to security restrictions.
This commit resolves the issue by using sudo() to grant the necessary access to the user while loading data in hr.attendance, preventing a ParseError.
[1] -https://github.com/odoo/odoo/blob/9e5e1fc68001c71538ceb6d4033f2fd6f6f256ee/addons/hr/data/scenarios/hr_scenario.xml#L5-L8
sentry - 6264589252
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix prevents an error when users open the Indian GSTR-1 report after the related GSTR module has been uninstalled. It keeps accounting reporting accessible and avoids a disruptive traceback in this configuration.
Original PR description
When ``l10n_in_reports_gstr`` module is uninstalled and user tries to open GSTR-1, A traceback will appear. Steps to reproduce the error: - Install ``l10n_in_reports`` - Uninstall ``l10n_in_reports_gstr`` - Go to Accounting > Reporting > GSTR-1 Traceback: ``` AttributeError: 'account.move' object has no attribute 'get_fiscal_year_start_date' ``` https://github.com/odoo/enterprise/blob/3db92f5b9c7de9a5bb26787de1a74fe4cedbd3a6/l10n_in_reports/models/l10n_in_report_handler.py#L146 ``get_fiscal_year_start_date`` method is in the ``l10n_in_reports_gstr`` and it is used in the ``_get_out_of_fiscal_year_reversed_moves`` method, which is in the ``l10n_in_reports`` module. So when the ``l10n_in_reports_gstr`` module is uninstalled. It will lead to the above traceback. sentry-6238978689