Tuesday, October 1, 2024
13 changes · 17.0
Resolved issues and error corrections
This update fixes a performance issue in the timesheet list view where too many system calls were being made when displaying timesheets. The fix reorganizes how the system determines which projects allow quick task creation, ensuring the check happens only once per list view instead of once per row. This makes the timesheet list load faster and more efficiently.
Original PR description
Before this commit, the changes made in community to call `get_create_edit_project_ids` method to know which projects we only allow to quick create a task on `task_id` field in…
Before this commit, the changes made in community to call `get_create_edit_project_ids` method to know which projects we only allow to quick create a task on `task_id` field in `account.analytic.line` model (timesheets model) introduced a performance issue in the list view because the `TaskWithHours` component doing the rpc call inside `onWillStart` hook is mounted on each row displayed on the list view, this is, the number of rpc call to that method will be the number of the records displayed in the list view instead of calling that rpc once. This commit moves that behavior in industry_fsm module since `get_create_edit_project_ids` method will only return fsm projects when the industry_fsm module is installed. Without that module, no project ids will be returned and so it is not really needed to do a rpc call for nothing. This commit also improves the changes to make sure the rpc call is made only once in the list view. Note: that behavior is not managed in the list view of All Timesheets since it would need to add a custom js class. It will be done in 18.0. task-4221621
The timesheet timer was incorrectly linking to previous timesheets when restarted, causing time tracking errors. This fix ensures the timer properly resets and creates a fresh timesheet entry each time it starts, improving the accuracy of time tracking for employees.
Original PR description
Issue: - The timesheet does not unlink properly when the timer stops. - Consequently, starting the timer again links it to the previous timesheet, causing incorrect behavior. Solution: - Set the timesheet reference to `undefined` when stopping the timer. - This ensures that a new timesheet is created when the timer starts again, preventing any link to the previous timesheet. Steps to reproduce: 1) Install the `timesheet_grid` module. 2) Navigate to Timesheet App > My Timesheet > Kanban view. 3) Start the timer from the Kanban view. 4) Stop the timer from the Kanban view. 5) Repeat step 3. 6) Verify the timer's time. task-4176611
The accounting dashboard was showing incorrect bill counts and totals when the 3-way matching feature was enabled. Bills to validate displayed a different number and amount than what actually appeared when clicking through to view them. This fix corrects the calculation to match the actual bills shown in the detailed view.
Original PR description
When having account_3way_match installed, the number and sum of bill to validate is not consistent with the bills displayed when clicking on the link. With this commit, we adapt the query to be consistent with `view_account_invoice_filter` which has been override. Steps: - Create 3 draft bills, $200 each: 1. invoice_date_due < today, release_to_pay != 'yes 2. invoice_date_due >= today, release_to_pay == 'yes' 3. invoice_date_due >= today, release_to_pay != 'yes' - Go to journal dashboard -> On the vendor bill journal, we display 3 bills to validate and $600, although when clicking on the link we display only bills 1 and 2 opw-4182523
This fix resolves an issue where invited users assigned to helpdesk tickets couldn't create field service tasks. The system now properly allows task creation by reading team information in a way that respects user permissions while enabling the necessary functionality.
Original PR description
Steps ----- 1. Create a user A with only Helpdesk User rights. 2. Create a helpdesk team only with "Invited internal users" visibility and "Field Service" enabled. 3. Create a ticket in this team, assign it to user A. 4. With user A, try to create a task from the ticket. ** AccessError ** Change ----- Read the team in sudo mode since a user may not have access to it (invited-interal teams) but have access to the ticket and should be able to create a FSM task. opw-4134278 Forward-Port-Of: odoo/enterprise#69784
The Gantt view in the Project app now properly supports date fields, allowing users to view, drag, drop, and resize project tasks correctly. This fix enables the Project Stages feature to work as intended when date fields are used in the Gantt view.
Original PR description
The gantt view was not supposed to support fields of type 'date' but a view using such fields was introduced in the app "Project" (it is available in the first menu of the app when the option "Project Stages" is enabled). Here we make the gantt view manage correctly the date fields: display, drag and drop, or resize pills should now work as expected. Task ID: 3424435 Forward-Port-Of: odoo/enterprise#67971
The Fixed Establishment field is no longer required by government regulations for EU OSS (One-Stop Shop) sales reports. This update removes this field from the XML export when using the standard Tax Unit setting, while keeping it available for companies using custom Tax Unit configurations. This ensures compliance with current regulatory requirements and simplifies the exported data.
Original PR description
As the Fixed Establishment is no more an obligation for the government, we remove this information from the xml export of the OSS sales report opw-3981681 Forward-Port-Of: odoo/enterprise#71043 Forward-Port-Of: odoo/enterprise#66876
This fix resolves a data validation error that occurred when upgrading Odoo if certain work entry types (like "Out of Contract") had been customized with specific settings. The system now properly resets all related fields during updates to prevent validation conflicts, ensuring smooth upgrades without manual intervention.
Original PR description
The definition of the records `hr_payroll.hr_work_entry_type_out_of_contract` and `l10n_be_hr_payroll.work_entry_type_partial_incapacity` reset the field `is_leave` to False, but not the field `is_unforeseen`. Because of the constraint `is_unforeseen_is_leave`, if `is_unforeseen` had been previously set as True, when the record gets updated (eg during an upgrade), only one of the fields gets changed and it will trigger the constraint. Steps to reproduce: - Edit 'Out of Contract' work entry type and set Time Off and Unforeseen Absence as True. - Upgrade to the next version. Forward-Port-Of: odoo/enterprise#70104
A test display showing the difference between actual and expected daily time was accidentally left visible in the timesheet timer. This fix removes the unintended display so users only see the actual time spent on tasks, not internal testing information.
Original PR description
Steps to reproduce: - Timesheet > Register time for any task The display of time spent on the task also contains the diff with the expected time for the day, which should not be displayed here. I mistakenly left in a display meant for testing purposes only added in commit 56c7e8ccf5eb92baee258842fe72efa3d1956b96 opw-4123649
This update fixes a visual problem where buttons were appearing cropped or misaligned in the signature request form. The fix reorganizes how the button visibility is controlled, resulting in a cleaner and properly displayed interface for users sending signature requests.
Original PR description
Before this commit, the div was addded for additional condition for button visibility which causing button asymtry and cropping button. after this commit, moved visibility condition in invisible attribute of button.
Portal users can now access the documents button when viewing tasks in shared projects. Previously, this button was only visible to users with specific document permissions. This fix removes unnecessary access restrictions so portal users can see and access project documents just like other team members.
Original PR description
- 17.0 ### Steps to reproduce: - Install documents_product - Create a project - Open the project form view, select use documents in the settings tab - Create a task in the project - Upload document - Share the project with edit access mode with the portal user - Open document application - Share the project workspace - Login with portal user - Select the shared project and open the task - There is no documents stat button ### Issue: Missing 'documents' stat button in project sharing for portal users. ### Cause: It only displayed to the particular group i.e group_documents_user. ### Solution: Removing the groups from the stat button. So, It will visible to the portal user also. task-3884424
Fixed a bug where clicking the Forecast button on a product page would crash when multiple warehouses were selected in the product list filter. The system now properly handles multiple warehouse selections by selecting the first warehouse for the forecast view, allowing users to view inventory forecasts without errors.
Original PR description
Problem: When multiple warehouses are selected in the products list page filter, clicking the Forecast button on the product page causes a traceback due to not handling multiple selected warehouses. This is part of this https://github.com/odoo/odoo/commit/f24ee4af8fb2fd21db703d87b9e6c06f6166ed98 Steps to reproduce: - Create two warehouses. - Go to Inventory > Products. - Add a filter for Warehouse 1 or Warehouse 2. - Open a product page. - Click the Forecast button. - Traceback occurs. opw-4149904
A recent improvement to how fiscal positions are determined in the system now requires additional database queries. This update adjusts the performance test expectations to match the new query count, ensuring tests continue to pass accurately.
Original PR description
After a fix in `res_partner._get_fiscal_position`
we extract the line `eu_country_codes =
set(self.env.ref('base.europe').country_ids.mapped('code'))`
from a condition, therefore we make extra queries and we have to adapt
the `assertQueryCount`.
opw-4072691This update corrects the journal type configuration for the Salaries journal in the Belgian payroll module. The journal was incorrectly set as "Miscellaneous" type while using an expense account, which caused payslip processing to fail. The journal type is now properly set to "Purchase" to match the expense account type, ensuring payroll operations work correctly.
Original PR description
In the PR https://github.com/odoo/odoo/pull/178494, I set default_account_id = None when the journal type is set to Miscellaneous. However, the runbot is failing for that PR. Upon further…
In the PR https://github.com/odoo/odoo/pull/178494, I set default_account_id = None when the journal type is set to Miscellaneous. However, the runbot is failing for that PR. Upon further investigation, I discovered that a Salaries journal was created with the type set to Miscellaneous and a default account of the expense type. I believe this is incorrect. If the default account is of the 'expense' type, the journal type should be set to Purchase instead.
Runbot Traceback :
```
Traceback (most recent call last):
File "/data/build/odoo/odoo/tools/convert.py", line 683, in _tag_root
f(rec)
File "/data/build/odoo/odoo/tools/convert.py", line 333, in _tag_function
_eval_xml(self, rec, env)
File "/data/build/odoo/odoo/tools/convert.py", line 204, in _eval_xml
return odoo.api.call_kw(model, method_name, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 471, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 456, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/data/build/enterprise/l10n_be_hr_payroll/models/hr_payslip.py", line 547, in action_payslip_done
return super().action_payslip_done()
File "/data/build/enterprise/hr_payroll_expense/models/hr_payslip.py", line 67, in action_payslip_done
res = super(HrPayslip, self).action_payslip_done()
File "/data/build/enterprise/hr_payroll_account/models/hr_payroll_account.py", line 31, in action_payslip_done
self._action_create_account_move()
File "/data/build/enterprise/hr_payroll_account/models/hr_payroll_account.py", line 87, in _action_create_account_move
slip._prepare_adjust_line(line_ids, 'debit', debit_sum, credit_sum, date)
File "/data/build/enterprise/hr_payroll_account/models/hr_payroll_account.py", line 159, in _prepare_adjust_line
raise UserError(_('The Expense Journal "%s" has not properly configured the default Account!') % (self.journal_id.name))
odoo.exceptions.UserError: The Expense Journal "Salaries" has not properly configured the default Account!
```
Forward-Port-Of: odoo/enterprise#70712
Forward-Port-Of: odoo/enterprise#70486