Tuesday, July 11, 2023
12 changes · master
Enhancements to existing features
Managers can now view an employee's next appraisal date directly on the public employee profile. This makes appraisal planning easier by giving managers quick access to upcoming review timing without navigating elsewhere.
Original PR description
The next appraisal date is shown to the manager on the public employee profile. task-2882052
Code cleanup and technical improvements
The VoIP call transfer action has been reorganized to use the newer application structure instead of older legacy code. This helps keep the calling feature easier to maintain and test without changing the expected user experience.
Original PR description
task-3416597
Miscellaneous changes
Create an expense for [EMPLOYEE] Create the report Submit to Manager > Approve > Report in next payslip Create a new payslip batch including the date of the expense Add [EMPLOYEE] > create payslips Generate draft entries then mark the payslip as paid Issue: expense sheet payment status will not be marked as paid opw-3292560 Forward-Port-Of: odoo/enterprise#43677 Forward-Port-Of: odoo/enterprise#42916
Original PR description
Create an expense for [EMPLOYEE] Create the report Submit to Manager > Approve > Report in next payslip Create a new payslip batch including the date of the expense Add [EMPLOYEE] > create payslips Generate draft entries then mark the payslip as paid Issue: expense sheet payment status will not be marked as paid opw-3292560 Forward-Port-Of: odoo/enterprise#43677 Forward-Port-Of: odoo/enterprise#42916
before this commit, for the pos_preparation_display module, the license is added as LGPL-3 after this commit, license of the modules will be updated to OEEL-1. Forward-Port-Of: odoo/enterprise#43709
Original PR description
before this commit, for the pos_preparation_display module, the license is added as LGPL-3 after this commit, license of the modules will be updated to OEEL-1. Forward-Port-Of: odoo/enterprise#43709
In order to make it possible to use hotkeys in an embedded view, we need to allow events to propagate above the embedded view. The issue with that is that their propagation was stopped in the first place because we don't want to let the editor handle those events as it would in a normal edition context. The solution proposed in this commit is twofold: Let any event initiated in an element inside the embedded view bubble, but skip over the editor. This is done by stopping the propagati
Original PR description
In order to make it possible to use hotkeys in an embedded view, we need to allow events to propagate above the embedded view. The issue with that is that their propagation was stopped in the first…
In order to make it possible to use hotkeys in an embedded view, we need to allow events to propagate above the embedded view. The issue with that is that their propagation was stopped in the first place because we don't want to let the editor handle those events as it would in a normal edition context. The solution proposed in this commit is twofold: Let any event initiated in an element inside the embedded view bubble, but skip over the editor. This is done by stopping the propagation of the original event like before, but creating a clone that will be re-dispatched from the parent of the editable so that it can be catched by other elements, the window or the document. Then, to make the ui service (and by extension the hotkey service) aware that the hotkey comes from and concerns the embedded view, we make it possible for the anchor of the embedded view to capture focus related events (`focusin` and `focusout`), and when the focus is in the embedded view, we manually set its anchor to be the `activeElement` that the ui service (and the hotkey service) use to limit the scope of the hotkey targets. task-3302786 Forward-Port-Of: odoo/enterprise#43710 Forward-Port-Of: odoo/enterprise#41008
This commit is the counter-part of odoo/odoo#127974. I couldn't find a smarter way to ensure that the clickbot really enters Studio. Indeed, there may be apps for which we do not enter Studio at all, and it doesn't mean the selector is wrong. As the click_everywhere test runs the clickbot app by app, we can't simply assert at the end that we entered Studio at least once. Forward-Port-Of: odoo/enterprise#43892
Original PR description
This commit is the counter-part of odoo/odoo#127974. I couldn't find a smarter way to ensure that the clickbot really enters Studio. Indeed, there may be apps for which we do not enter Studio at all, and it doesn't mean the selector is wrong. As the click_everywhere test runs the clickbot app by app, we can't simply assert at the end that we entered Studio at least once. Forward-Port-Of: odoo/enterprise#43892
How to reproduce: - Create an asset - Modify -> disposal - Put the asset's depreciation account as the loss account - Dispose it => You have a weird error saying that the remaining value on the last line is different than 0 (while the values are right). You should not select the same account. So we remove the asset's depreciation account from the domain of the loss account. We also raise an explicit error if the user does it without the wizard. Forward-Port-Of: odoo/enterprise#40279
Original PR description
How to reproduce: - Create an asset - Modify -> disposal - Put the asset's depreciation account as the loss account - Dispose it => You have a weird error saying that the remaining value on the last line is different than 0 (while the values are right). You should not select the same account. So we remove the asset's depreciation account from the domain of the loss account. We also raise an explicit error if the user does it without the wizard. Forward-Port-Of: odoo/enterprise#40279
*: sale_renting_sign Steps to reproduce: - login as admin - install sale_renting_sign - activate debug mode - sign > 3 dots menu on Rental Agreement > properties - Who can sign: All Users - Template access group: Sign / User: Own and Shared Templates - Save - logout and login with user who has Sign / User privilege - Rental Agreement > Send Issue: User gets error message: `Sorry, you are not allowed to access this document.` If we repeat the same process on another exist
Original PR description
*: sale_renting_sign Steps to reproduce: - login as admin - install sale_renting_sign - activate debug mode - sign > 3 dots menu on Rental Agreement > properties - Who can sign: All Users - Template access group: Sign / User: Own and Shared Templates - Save - logout and login with user who has Sign / User privilege - Rental Agreement > Send Issue: User gets error message: `Sorry, you are not allowed to access this document.` If we repeat the same process on another existing template, such as `Non-Disclosure Agreement.pdf`, the user will not get an error when clicking Send. This happens because the `check` function will raise an error if the template does not have a `res_model` and `res_id`. opw-3250596 Forward-Port-Of: odoo/enterprise#43589
Currently the asset depreciation moves computation does not take the lock dates into account. It might thus create journal entries (in draft) before the lock date, causing an error when trying to post them or when you want to change the computation on the Asset form. This fix checks whether there are any moves generated with a date before the lock date and sets the date for these moves to the end of the first period after the lock date (or containing the lock date if it's not the last day of
Original PR description
Currently the asset depreciation moves computation does not take the lock dates into account. It might thus create journal entries (in draft) before the lock date, causing an error when trying to post them or when you want to change the computation on the Asset form. This fix checks whether there are any moves generated with a date before the lock date and sets the date for these moves to the end of the first period after the lock date (or containing the lock date if it's not the last day of the period). [opw-3305506](https://www.odoo.com/web#id=3305506&cids=1&menu_id=4720&action=333&active_id=49&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#43226 Forward-Port-Of: odoo/enterprise#43081
When the user schedules a resource shift at that time, "End Date" will be null a traceback will appear. Steps to produce: - Install the planning module. - Go to the "Planning" menu, then the Gantt view will open. - Click on the "New" button, and the Add Shift wizard will open. - Set the "End Date" as null and apply it. Error: TypeError: unsupported operand type(s) for -: 'bool' and 'datetime.datetime' This PR will resolve the issue when the user sets the "End Date" to null. In th
Original PR description
When the user schedules a resource shift at that time, "End Date" will be null a traceback will appear. Steps to produce: - Install the planning module. - Go to the "Planning" menu, then the Gantt…
When the user schedules a resource shift at that time, "End Date" will be null a traceback will appear.
Steps to produce:
- Install the planning module.
- Go to the "Planning" menu, then the Gantt view will open.
- Click on the "New" button, and the Add Shift wizard will open.
- Set the "End Date" as null and apply it.
Error: TypeError: unsupported operand type(s) for -: 'bool' and
'datetime.datetime'
This PR will resolve the issue when the user sets the "End Date" to null. In that case, the "End Date" field value will return zero.
Sentry Traceback:
```TypeError: unsupported operand type(s) for -: 'bool' and 'datetime.datetime'
File "odoo/http.py", line 2123, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1927, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "odoo/models.py", line 6695, in onchange
todo = [
File "odoo/models.py", line 6698, in <listcomp>
if name not in done and snapshot0.has_changed(name)
File "odoo/models.py", line 6495, in has_changed
return self[name] != record[name]
File "odoo/models.py", line 6122, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 1155, in __get__
self.recompute(record)
File "odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4486, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.3/planning/models/planning.py", line 271, in _compute_allocated_hours
slot.allocated_hours = slot._calculate_slot_duration() * ratio
File "home/odoo/src/enterprise/saas-16.3/planning/models/planning.py", line 1436, in _calculate_slot_duration
period = self.end_datetime - self.start_datetime
```
Sentry-4292022755
Forward-Port-Of: odoo/enterprise#43604…d on old renewal quotes. Before this commit, when an account move was posted it could trigger a trceback when it tries to update renewal quotes if they have no start_date. We should also avoid updating canceled quotes. Forward-Port-Of: odoo/enterprise#43871 Forward-Port-Of: odoo/enterprise#43853
Original PR description
…d on old renewal quotes. Before this commit, when an account move was posted it could trigger a trceback when it tries to update renewal quotes if they have no start_date. We should also avoid updating canceled quotes. Forward-Port-Of: odoo/enterprise#43871 Forward-Port-Of: odoo/enterprise#43853
Steps to produce the traceback ============================== 1. Install website_helpdesk. 2. Open Website --> Site menu --> Pages --> Click on ticket received page title. Technical ========= If the 'ticket' variable value is null then the same value is being used in t-attf-href="/helpdesk/ticket/#{ticket.id}" that causes the view to be broken and causes the traceback. After this Commit ================= The conditional rendering of the tag based on 'ticket' value resolves the trace
Original PR description
Steps to produce the traceback
==============================
1. Install website_helpdesk.
2. Open Website --> Site menu --> Pages --> Click on ticket received page title.
Technical
=========
If the 'ticket' variable value is null then the same value is being used in t-attf-href="/helpdesk/ticket/#{ticket.id}" that causes the view to be broken and causes the traceback.
After this Commit
=================
The conditional rendering of the tag based on 'ticket' value resolves the traceback.
Task-3366890
Forward-Port-Of: odoo/enterprise#42589