Monday, January 22, 2024
16 changes · master
Enhancements to existing features
The web client now includes systray activity information in an existing startup data request, avoiding an extra server call each time users open Odoo. This improves startup efficiency across affected apps without changing the visible user experience.
Original PR description
This will remove one RPC at every webclient startup. Part of task-3605717 https://github.com/odoo/odoo/pull/150367
Code cleanup and technical improvements
This change reorganizes how spreadsheet editing decides when calculations need to be refreshed. It is an internal cleanup that should make future spreadsheet behavior easier to maintain without changing the user experience.
Original PR description
## Task Description This PR aims to change the way we defined the invalidateXXEvaluationCommands sets, by listing only the commands related to a specific set in it, and then checking separately the different sets to invalidate the evaluation when needed. ## Related Task/PRs - Task: 3607272 - https://github.com/odoo/odoo/pull/146093 - https://github.com/odoo/o-spreadsheet/pull/3333
Miscellaneous changes
Before this commit, creating a related field toward a monetary field caused a crash. Since #40597, Studio handles monetary field differently and related field has not been taken into account. With this commit, it is now possible to create a related monetary field. This commit also removes the currency dialog which is not longer used thanks to this fix. Steps to reproduce: - Open Sales and a record - Open studio - Drag&Drop a new related field - Select Customer->Total received field and
Original PR description
Before this commit, creating a related field toward a monetary field caused a crash. Since #40597, Studio handles monetary field differently and related field has not been taken into account. With this commit, it is now possible to create a related monetary field. This commit also removes the currency dialog which is not longer used thanks to this fix. Steps to reproduce: - Open Sales and a record - Open studio - Drag&Drop a new related field - Select Customer->Total received field and confirm - Crash opw-3663307 Forward-Port-Of: odoo/enterprise#54388 Forward-Port-Of: odoo/enterprise#54214
Forward-Port-Of: odoo/enterprise#54772 Forward-Port-Of: odoo/enterprise#54552
Original PR description
Forward-Port-Of: odoo/enterprise#54772 Forward-Port-Of: odoo/enterprise#54552
Steps to reproduce: -------------------------- 1) Install documents_project_sale module. 2) Open project 3) Go to configuration > task stages. 4) There is a 'To Do' stage that isn't linked to any project. Issue: -------- before this commit, the 'To Do' stage that stage that isn't linked to any project. which is showing abnormally. Cause: --------- The created stage will be removed automatically but the problem is it searches for 'To do' not 'To Do' that's why it was not removed.
Original PR description
Steps to reproduce: -------------------------- 1) Install documents_project_sale module. 2) Open project 3) Go to configuration > task stages. 4) There is a 'To Do' stage that isn't linked to any project. Issue: -------- before this commit, the 'To Do' stage that stage that isn't linked to any project. which is showing abnormally. Cause: --------- The created stage will be removed automatically but the problem is it searches for 'To do' not 'To Do' that's why it was not removed. Fix: ----- after this commit, when we go to the task stages it will search for the 'To Do' stage if there is no project linked to the 'To Do' stage then it will be removed automatically the 'To Do' stage. task-3550638 Forward-Port-Of: odoo/enterprise#49641
We need to get rid of this button because it could raise potential legal issues (see linked task). It is marked invisible s.t. new databases won't have it. For the existing databases, we rewrite the returned action to return the content of the first xml attachment on the async export. Also remove the IAP controller `_get_recipient_reports_v2` to make sure it can no longer be called. task-3640693 Forward-Port-Of: odoo/enterprise#52805
Original PR description
We need to get rid of this button because it could raise potential legal issues (see linked task). It is marked invisible s.t. new databases won't have it. For the existing databases, we rewrite the returned action to return the content of the first xml attachment on the async export. Also remove the IAP controller `_get_recipient_reports_v2` to make sure it can no longer be called. task-3640693 Forward-Port-Of: odoo/enterprise#52805
This commit fix a bad usage of the notification service which leads to a crash. Steps to reproduce: - Go to calendar - Click on studio in the systray - Click on views - Click on the activity view to create one <details> <summary> Show the flow </summary>  </details> Current Behaviour ----------------- Crash: `Caused by: TypeError: this.child.mount
Original PR description
This commit fix a bad usage of the notification service which leads to a crash. Steps to reproduce: - Go to calendar - Click on studio in the systray - Click on views - Click on the activity view to create one <details> <summary> Show the flow </summary>  </details> Current Behaviour ----------------- Crash: `Caused by: TypeError: this.child.mount is not a function` Expected Behaviour ------------------ Display a notification indicating that the view cannot be created on this model. opw-3686237 Forward-Port-Of: odoo/enterprise#54767 Forward-Port-Of: odoo/enterprise#54545
Community: https://github.com/odoo/odoo/pull/149732 Forward-Port-Of: odoo/enterprise#54512
Original PR description
Community: https://github.com/odoo/odoo/pull/149732 Forward-Port-Of: odoo/enterprise#54512
Before this commit: By default, all the datetime fields are stored according to `UTC`. If the user tries to send a template whose template variable is set to a field type of `datetime` then no logic is written in `_find_value_from_field_path` to update the field's value according to the user's timezone. It will be sent according to `UTC`. After this commit: In the `_find_value_from_field_path` function, if `field_value` will be received of `datetime` type then a new function `_what
Original PR description
Before this commit: By default, all the datetime fields are stored according to `UTC`. If the user tries to send a template whose template variable is set to a field type of `datetime` then no logic…
Before this commit: By default, all the datetime fields are stored according to `UTC`. If the user tries to send a template whose template variable is set to a field type of `datetime` then no logic is written in `_find_value_from_field_path` to update the field's value according to the user's timezone. It will be sent according to `UTC`. After this commit: In the `_find_value_from_field_path` function, if `field_value` will be received of `datetime` type then a new function `_whatsapp_get_timezone` is used, which is added to the base that will return the desired timezone. By default, `_whatsapp_get_timezone` will return the user's timezone. The `_find_value_from_field_path` will update the `field_value` according to the timezone returned and if no timezone is returned then it will take `UTC` by default. This function can be overridden by any model. e.g. `event.registration` will override `_whatsapp_get_timezone` and return the event's time zone. Task - 3636178 Forward-Port-Of: odoo/enterprise#52208
This commit fixes a bug where the user would click outside the editor space in Knowledge after editing a behavior and this would not be seen as changes inside the record. What is happening is that the editor, and the majority of Odoo, uses the event *blur* to check if any changes has been made to the document. But this event does not bubble, in opposition to *focusout*, which means that any blur done on an element that is lower than the editable would not trigger the *onBlur* method.
Original PR description
This commit fixes a bug where the user would click outside the editor space in Knowledge after editing a behavior and this would not be seen as changes inside the record. What is happening is that the editor, and the majority of Odoo, uses the event *blur* to check if any changes has been made to the document. But this event does not bubble, in opposition to *focusout*, which means that any blur done on an element that is lower than the editable would not trigger the *onBlur* method. What we have done to fix this is simulate a blur event on the editable when we focus out of a behavior => mimicking an event bubbling to the editable and thus triggering the onBlur method. This enables the editable to handle changes done and to save/discard more efficiently and robustly. task-3662914 Forward-Port-Of: odoo/enterprise#54656 Forward-Port-Of: odoo/enterprise#53531
This commit adds the new mandatory fields according to Version 3.0 of the delivery guide. It also extends the functionality of the delivery guide to Receipts. task-3608164 Forward-Port-Of: odoo/enterprise#53506 Forward-Port-Of: odoo/enterprise#52580
Original PR description
This commit adds the new mandatory fields according to Version 3.0 of the delivery guide. It also extends the functionality of the delivery guide to Receipts. task-3608164 Forward-Port-Of: odoo/enterprise#53506 Forward-Port-Of: odoo/enterprise#52580
Currently, you cannot delete a certificate. ### Steps to reproduce - install `l10n_mx_edi` * switch to a Mexican company * go to the settings * under 'MX Electronic invoicing', delete a line from the 'Certificates' field * attempt to save You should be met with a validation error. ### Cause In the `Certificate` model, the `company_id` field is defined as a `Many2one` relation to the `ResCompany` model and is marked as `required=True`. The inverse relation in the `ResCompany` m
Original PR description
Currently, you cannot delete a certificate. ### Steps to reproduce - install `l10n_mx_edi` * switch to a Mexican company * go to the settings * under 'MX Electronic invoicing', delete a line from the 'Certificates' field * attempt to save You should be met with a validation error. ### Cause In the `Certificate` model, the `company_id` field is defined as a `Many2one` relation to the `ResCompany` model and is marked as `required=True`. The inverse relation in the `ResCompany` model contains a `certificate_ids` field. When saving after removing a certificate in the settings, Odoo attempts to unlink the certificate from `company_id.certificate_ids`. Due to the defined relationships, this will result in the system trying to set the `certificate.company_id` field to `False`. However, since `company_id` is a required field, this operation leads to an error. opw-3664517 Forward-Port-Of: odoo/enterprise#54134
Filter 'hide zero lines' wasn't saving the option, so I was not persistent between pages reload. Forward-Port-Of: odoo/enterprise#54486
Original PR description
Filter 'hide zero lines' wasn't saving the option, so I was not persistent between pages reload. Forward-Port-Of: odoo/enterprise#54486
Currently the form sheet have a flex-grow-1, the chatter could use less horizontal space to leave more space for the form sheet's content. This commit follows it's community counterpart, removing the icon of the whatsapp button in the chatter to save space. Community PR: https://github.com/odoo/odoo/pull/147136 task-3641988 Forward-Port-Of: odoo/enterprise#53208
Original PR description
Currently the form sheet have a flex-grow-1, the chatter could use less horizontal space to leave more space for the form sheet's content. This commit follows it's community counterpart, removing the icon of the whatsapp button in the chatter to save space. Community PR: https://github.com/odoo/odoo/pull/147136 task-3641988 Forward-Port-Of: odoo/enterprise#53208
This commit converts server actions from python to more user friendly interface. The commit also improves `_create_records_with_xml_ids`, by removing try/except block and doing same thing using ORM. Commit also adds test, that tests the functionality of `_create_records_with_xml_ids` function. task-3597555 Forward-Port-Of: odoo/enterprise#50898
Original PR description
This commit converts server actions from python to more user friendly interface. The commit also improves `_create_records_with_xml_ids`, by removing try/except block and doing same thing using ORM. Commit also adds test, that tests the functionality of `_create_records_with_xml_ids` function. task-3597555 Forward-Port-Of: odoo/enterprise#50898
Issue: ------ A user who has access rights for payroll but not for expenses will not be able to calculate the payslip. Cause: ------ An additional security check [^1] has been added to the `_flush_search` method to check which fields have groups. Unfortunately, payroll groups are not mentioned in the `groups` attribute of the `refund_in_payslip` field. Solution: --------- Add the group in the `groups` attribute. opw-3691235 [^1]: https://github.com/odoo/odoo/blob/4b096631ad23
Original PR description
Issue: ------ A user who has access rights for payroll but not for expenses will not be able to calculate the payslip. Cause: ------ An additional security check [^1] has been added to the `_flush_search` method to check which fields have groups. Unfortunately, payroll groups are not mentioned in the `groups` attribute of the `refund_in_payslip` field. Solution: --------- Add the group in the `groups` attribute. opw-3691235 [^1]: https://github.com/odoo/odoo/blob/4b096631ad23298c12bbd12593e9358c3e9f404a/odoo/models.py#L5330-L5332 Forward-Port-Of: odoo/enterprise#54619