Tuesday, June 18, 2024
40 changes · saas-17.2
Resolved issues and error corrections
The Trial Balance report in Mexican closing reports now correctly applies the Month 13 filter when selected. This ensures users can view the expected period-specific balances without the filter appearing unresponsive.
Original PR description
Clicking on the Trial Balance'filter to activate 'Month 13' does nothing. The reason is that the js expects undefined and not null. task-3983699
This change fixes an issue where some mail-related automated tests could get stuck indefinitely after an error. It improves the reliability of the testing process, helping developers detect issues faster and maintain product quality.
Original PR description
Before this PR, a test could hang indefinitely if an error occured. The flow is the following: - error occurs - the contains helper reset his internal `hasUsedContainsPositively` following the `after` callback - an error occurs if the pending contains is a negative assertion (count=0) - hoot never keeps going The `hasUsedContainsPositively` variable should not be cleaned by the contains instances. It should only be cleaned once when the test is done.
Miscellaneous changes
Suppose the SII workflow cron job runs, and there are no records with the `ask_for_status` or `accepted` l10n_cl_dte_status, but there are a lot with the `claimed` status. If the token on the certificate happens to be invalid, `_l10n_cl_ask_claim_status` will raise an InvalidToken exception and abort the cron job. This prevents the records from being processed. This fix clears an invalid token if it's detected, so that when the next record is processed a new one will be created. The record raisi
Original PR description
Suppose the SII workflow cron job runs, and there are no records with the `ask_for_status` or `accepted` l10n_cl_dte_status, but there are a lot with the `claimed` status. If the token on the certificate happens to be invalid, `_l10n_cl_ask_claim_status` will raise an InvalidToken exception and abort the cron job. This prevents the records from being processed. This fix clears an invalid token if it's detected, so that when the next record is processed a new one will be created. The record raising the exception should succeed the next time the cron job runs. opw-3920273 Forward-Port-Of: odoo/enterprise#63809
In ubuntu noble, some timezone where removed, like US/Pacific. Translate it to the equivalent: "America/Los_Angeles" runbot-67857 Forward-Port-Of: odoo/enterprise#64774 Forward-Port-Of: odoo/enterprise#64369
Original PR description
In ubuntu noble, some timezone where removed, like US/Pacific. Translate it to the equivalent: "America/Los_Angeles" runbot-67857 Forward-Port-Of: odoo/enterprise#64774 Forward-Port-Of: odoo/enterprise#64369
Bug === 1. Open Safari or Firefox 2. Open the split tool 3. We can not open the preview by clicking on the upper card of the card Technical ========= The hover effect was done with CSS trickery, so we added a new div to remove the CSS `transform` trick. Task-3863428 Forward-Port-Of: odoo/enterprise#61010
Original PR description
Bug === 1. Open Safari or Firefox 2. Open the split tool 3. We can not open the preview by clicking on the upper card of the card Technical ========= The hover effect was done with CSS trickery, so we added a new div to remove the CSS `transform` trick. Task-3863428 Forward-Port-Of: odoo/enterprise#61010
Currently in the help center, knowledge articles without names are not sorted out, leading to empty divs being displayed. This PR will fix this by excluding articles without name in the _compute_latest_articles(). task-3940889 Forward-Port-Of: odoo/enterprise#62994
Original PR description
Currently in the help center, knowledge articles without names are not sorted out, leading to empty divs being displayed. This PR will fix this by excluding articles without name in the _compute_latest_articles(). task-3940889 Forward-Port-Of: odoo/enterprise#62994
Since https://github.com/odoo/odoo/commit/1f438ca0e109b9e93c895824bd8342a2df170503 , the various product label reports have changed their name. Is still does not make much sense to edit them from studio, since they are composed of mostly generated data and not model fields. We thus blacklist them again. opw-3942356 Forward-Port-Of: odoo/enterprise#63425
Original PR description
Since https://github.com/odoo/odoo/commit/1f438ca0e109b9e93c895824bd8342a2df170503 , the various product label reports have changed their name. Is still does not make much sense to edit them from studio, since they are composed of mostly generated data and not model fields. We thus blacklist them again. opw-3942356 Forward-Port-Of: odoo/enterprise#63425
*l10n_ro_saft According to the related community commit, we consider the account type `liability_credit_card` also as a liquidity account for bank journals. We adapt the reconciliation wizard and Romanian SAFT code to take this into account. task-3891250 Related to https://github.com/odoo/odoo/pull/166258 Forward-Port-Of: odoo/enterprise#63437 Forward-Port-Of: odoo/enterprise#63259
Original PR description
*l10n_ro_saft According to the related community commit, we consider the account type `liability_credit_card` also as a liquidity account for bank journals. We adapt the reconciliation wizard and Romanian SAFT code to take this into account. task-3891250 Related to https://github.com/odoo/odoo/pull/166258 Forward-Port-Of: odoo/enterprise#63437 Forward-Port-Of: odoo/enterprise#63259
Task-3924439 Forward-Port-Of: odoo/enterprise#64310
Original PR description
Task-3924439 Forward-Port-Of: odoo/enterprise#64310
Steps to reproduce ================== - Go to products - Open studio - Edit the 'Product label 2x7' report - Click on 'Print preview' => Product model not defined, Please contact your administrator. Cause of the issue ================== This report is made to be edited from studio, but since the context key is missing, it fails https://github.com/odoo/odoo/blob/26de73f7c5a8fef32aaafa8c36619249caf0318d/addons/product/report/product_label_report.py#L19 Since 17.1, the user s
Original PR description
Steps to reproduce ================== - Go to products - Open studio - Edit the 'Product label 2x7' report - Click on 'Print preview' => Product model not defined, Please contact your administrator. Cause of the issue ================== This report is made to be edited from studio, but since the context key is missing, it fails https://github.com/odoo/odoo/blob/26de73f7c5a8fef32aaafa8c36619249caf0318d/addons/product/report/product_label_report.py#L19 Since 17.1, the user service is no more. This means it is no longer patched to add the studio key automatically https://github.com/odoo/enterprise/pull/52372 opw-3942356 Forward-Port-Of: odoo/enterprise#63426
opw-3935664 Forward-Port-Of: odoo/enterprise#63998
Original PR description
opw-3935664 Forward-Port-Of: odoo/enterprise#63998
On Windows OS if a ctypes method causes a segmentation fault, it leads to an OSError instead of a crash like it does on a raspberry pi. Related Python ctypes documentation link: https://docs.python.org/3/library/ctypes.html#calling-functions  This PR wraps every ctypes C/C++ method call with a try/except OSError to properly detect, log and display an error message to the user. task-3950
Original PR description
On Windows OS if a ctypes method causes a segmentation fault, it leads to an OSError instead of a crash like it does on a raspberry pi. Related Python ctypes documentation link: https://docs.python.org/3/library/ctypes.html#calling-functions  This PR wraps every ctypes C/C++ method call with a try/except OSError to properly detect, log and display an error message to the user. task-3950652 Forward-Port-Of: odoo/enterprise#64413 Forward-Port-Of: odoo/enterprise#64124
[FIX] helpdesk: fix activity default filter Clicking on an Activity group used to set a default filter, in effect of which user will only see helpdesk tickets with HIS activites that are overdue/today. This behaviour got temporarily removed and than reintroduced with (ref.1) (ref.1) achieves that by adding default filters to the search views, it issue persisted in the helpdesk view becase filters wern't present. This commits adds filters to the helpdesk's search view so they can be u
Original PR description
[FIX] helpdesk: fix activity default filter Clicking on an Activity group used to set a default filter, in effect of which user will only see helpdesk tickets with HIS activites that are…
[FIX] helpdesk: fix activity default filter
Clicking on an Activity group used to set a default filter, in effect of which
user will only see helpdesk tickets with HIS activites that are overdue/today.
This behaviour got temporarily removed and than reintroduced with (ref.1)
(ref.1) achieves that by adding default filters to the search views, it issue
persisted in the helpdesk view becase filters wern't present.
This commits adds filters to the helpdesk's search view so they can be used
by mechanisms (re)introdcuted in (ref.1)
(ref.1)
[FIX] mail: Fix activity default filter issue
https://github.com/odoo/odoo/commit/3d18b9faa1fdcf00d48091ad4be244ca00d33524
[Reproduce steps]
- Install helpdesk
- (optional) create a helpdesk ticket where:
- current user has a future activity
- other user has an overdue activity
- open ActivityMenu dropdown (clock icon ".fa-clock-o")
- BUG (ux issue): filters aren't present
- (if optional): created ticket is shown (beside current user not having any overdue/today activity in there)
opw-3859535
https://github.com/odoo/enterprise/assets/33809926/ca77aa45-f842-41a3-b551-d27e4b87a83b
Forward-Port-Of: odoo/enterprise#63748**Steps to reproduce:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click elsewhere or press 'Enter'. **Issues:** - _**Workspace field**_ A validation error is raised when a Workspace name is cleared. However, an alert dialog is not displayed. - _**Name field**_ An alert dialog indicating a validation error is shown yet on clicking the `OK` button, the unnamed docume
Original PR description
**Steps to reproduce:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click elsewhere…
**Steps to reproduce:**
- Go to list view or kanban view.
- Select the document to preview in the inspector.
- Clear the input value of a required field (here, Name or Workspace), and click elsewhere or press 'Enter'.
**Issues:**
- _**Workspace field**_
A validation error is raised when a Workspace name is cleared. However, an alert dialog is not displayed.
- _**Name field**_
An alert dialog indicating a validation error is shown yet on clicking the `OK` button, the unnamed document is saved as is.
Instead, the changes should be reverted.
**Causes:**
- _**Workspace field**_
The `required` attribute was not added to `folder_id` field in the view. As a result, alert dialog was not shown.
- _**Name field**_
The config mode never changes to 'edit'. Even when a user is editing an inspector field, the mode is 'readonly'.
As a result, the boolean `isInEdition` remains false and the code-block meant to be executed
on click of the confirm button of alert dialog does not execute as intended.
**Fix:**
- _**Workspace field**_
The `required` attribute is forcefully set to true for the `folder_id` field so that an empty value for workspace
is not considered to be a 'validSelection' and the user faces an alert popup.
- _**Name field**_
This PR fixes the issue by switching to edit mode whenever user changes the value of a document inspector field.
This PR also adds a testcase in `documents_kanban_tests.js` to ensure that the confirm ('OK') button works as intended.
Task: [3799280](https://www.odoo.com/web#id=3799280&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form)
Forward-Port-Of: odoo/enterprise#64486
Forward-Port-Of: odoo/enterprise#59734Currently, an error occurs when uploading an XML file to generate an invoice. Step to produce: - Install the 'l10n_mx_edi' module. - Go to Accounting / Configuration / Accounting / Taxes, And delete all 'Exento' taxes. - Go to Accounting / Configuration / Accounting / Tax Groups, And delete all 'Exento' Tax Group. - Navigate to Accounting / Customers / Invoices, And upload an XML file to generate an invoice, - Ensure that the XML file contains the "TipoFactor" with a value of "Exento"
Original PR description
Currently, an error occurs when uploading an XML file to generate an invoice. Step to produce: - Install the 'l10n_mx_edi' module. - Go to Accounting / Configuration / Accounting / Taxes, And delete…
Currently, an error occurs when uploading an XML file to generate an invoice. Step to produce: - Install the 'l10n_mx_edi' module. - Go to Accounting / Configuration / Accounting / Taxes, And delete all 'Exento' taxes. - Go to Accounting / Configuration / Accounting / Tax Groups, And delete all 'Exento' Tax Group. - Navigate to Accounting / Customers / Invoices, And upload an XML file to generate an invoice, - Ensure that the XML file contains the "TipoFactor" with a value of "Exento". (use this XML file [1]). AttributeError: 'NoneType' object has no attribute 'id' An error occurs when attempting to generate an invoice by uploading an XML file because system tries to retrieve an ID from the external_id of a tax group at [2] which is not available. link [1]: https://github.com/odoo/enterprise/blob/1e3dfa7c6a57c251d77801c316818b5a9fae6cc5/l10n_mx_edi/tests/test_files/test_bill_import_extento.xml#L1 link [2]: https://github.com/odoo/enterprise/blob/1e3dfa7c6a57c251d77801c316818b5a9fae6cc5/l10n_mx_edi/models/account_move.py#L2381 To resolve the issue, Add a condition to ensure that an external_id of a tax group is available. sentry-5312222893 Forward-Port-Of: odoo/enterprise#63874 Forward-Port-Of: odoo/enterprise#62257
Issue: ------ When we click on "Helpdesk Ticket" in the activities, we are redirected to the kanban view (`helpdesk_ticket_view_kanban`), but no filter is added. Cause: ------ When going to the kanban view via activities, the search view selected is `helpdesk_ticket_view_search_analysis`, which does not contain filters on the `my_activity_date_deadline` field. When we go to the kanban view via the "Tickets" button, we have the search view `helpdesk_tickets_view_search` which is c
Original PR description
Issue: ------ When we click on "Helpdesk Ticket" in the activities, we are redirected to the kanban view (`helpdesk_ticket_view_kanban`), but no filter is added. Cause: ------ When going to the…
Issue: ------ When we click on "Helpdesk Ticket" in the activities, we are redirected to the kanban view (`helpdesk_ticket_view_kanban`), but no filter is added. Cause: ------ When going to the kanban view via activities, the search view selected is `helpdesk_ticket_view_search_analysis`, which does not contain filters on the `my_activity_date_deadline` field. When we go to the kanban view via the "Tickets" button, we have the search view `helpdesk_tickets_view_search` which is correct. Via ticket button, we are taking `helpdesk_ticket_action_team` action that forces the search view with `helpdesk_tickets_view_search`. Via ticket button: helpdesk_tickets_view_search (priority: 20) Via activity: helpdesk_ticket_view_search_analysis (priority: 16) 16 is the default value for the `priority` field. Solution: --------- Set a priority lower than the default on the `helpdesk_tickets_view_search` view, to make sure it is selected. opw-3976395 Forward-Port-Of: odoo/enterprise#64756
When task assignees have more than one task at the same time in field service, and tries to remove the planned date from one of the tasks, A traceback will appear. Steps to reproduce the error: - Go to Field Service > Create a new task with the planned date and Assignees - Create another task with the same planned date and Assignees > Save - Now try to remove the planned date Traceback: ``` AttributeError: 'bool' object has no attribute 'tzinfo' File "odoo/http.py", line 2254, i
Original PR description
When task assignees have more than one task at the same time in field service, and tries to remove the planned date from one of the tasks, A traceback will appear. Steps to reproduce the error: - Go…
When task assignees have more than one task at the same time in field service,
and tries to remove the planned date from one of the tasks,
A traceback will appear.
Steps to reproduce the error:
- Go to Field Service > Create a new task with the planned date and Assignees
- Create another task with the same planned date and Assignees > Save
- Now try to remove the planned date
Traceback:
```
AttributeError: 'bool' object has no attribute 'tzinfo'
File "odoo/http.py", line 2254, in __call__
response = request._serve_db()
File "odoo/http.py", line 1829, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1849, 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 1827, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1834, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2059, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, 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/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 1011, in onchange
todo = [
File "addons/web/models/models.py", line 1014, in <listcomp>
if field_name not in done and snapshot0.has_changed(field_name)
File "addons/web/models/models.py", line 1127, in has_changed
return self[field_name] != self.record[field_name]
File "odoo/models.py", line 6608, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1261, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1443, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 416, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4934, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 100, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-17.2/project_enterprise/models/project_task.py", line 227, in _compute_planning_overlap
absolute_min_start = utc.localize(self[0].planned_date_begin)
File "__init__.py", line 257, in localize
if dt.tzinfo is not None:
```
https://github.com/odoo/enterprise/blob/74e8fa829cf17677ddcb29d91a0521d5d5b9a1b6/project_enterprise/models/project_task.py#L229-L230 When the user removes the planned date,
"planned_date_begin" and "date_deadline" will be False.
So it will lead to the above traceback.
sentry-5444639133
Forward-Port-Of: odoo/enterprise#63976Steps to reproduce: - create a new db `--without-demo=True -i l10n_ar` - Load demo data Issue: Everything goes wild Cause: When we instantiate a database without demo data with l10n_ar, the res_partner(1) has the l10n_latam_identification_type_id field set to 'CUIT'. When loading demo data, a VAT number is assigned to res.partner(1)(*), which triggers a constraint error: https://github.com/odoo/odoo/blob/69e31db6ac90874ed6329599fca8f09709efd119/addons/l10n_ar/models/res_partner.py#L6
Original PR description
Steps to reproduce: - create a new db `--without-demo=True -i l10n_ar` - Load demo data Issue: Everything goes wild Cause: When we instantiate a database without demo data with l10n_ar, the…
Steps to reproduce: - create a new db `--without-demo=True -i l10n_ar` - Load demo data Issue: Everything goes wild Cause: When we instantiate a database without demo data with l10n_ar, the res_partner(1) has the l10n_latam_identification_type_id field set to 'CUIT'. When loading demo data, a VAT number is assigned to res.partner(1)(*), which triggers a constraint error: https://github.com/odoo/odoo/blob/69e31db6ac90874ed6329599fca8f09709efd119/addons/l10n_ar/models/res_partner.py#L60-L61 Since res.partner(1) has the CUIT identification type, its VAT will be checked for correctness here: https://github.com/odoo/odoo/blob/69e31db6ac90874ed6329599fca8f09709efd119/addons/l10n_ar/models/res_partner.py#L106 The dummy VAT added with this PR causes the constraint error: https://github.com/odoo/odoo/commit/a171597d1904de992bcf0e0f606b4c6a4b70b725 (*)By default (even without demo data) there is a "MyCompany" partner: https://github.com/odoo/odoo/blob/7e58f5c5ee772f2a6b4dff7ad3279dc9242ea2b3/odoo/addons/base/data/res_partner_data.xml#L4-L13 Solution: For 'main_partner' we don't set any vat number. Since some irregularities might happen, if the vat is necesarry for it, adding it to the specific module might be a better choice commit:https://github.com/odoo/odoo/commit/a171597d1904de992bcf0e0f606b4c6a4b70b725 opw-3907520 Forward-Port-Of: odoo/odoo#169305 Forward-Port-Of: odoo/odoo#167062
In commit [1], a missing semicolon breaks the neutralization of a database. This commit fixes the issue. task-3895772 [1]: https://github.com/odoo/odoo/commit/44ecef1c6a22afba3e5151fa857fe550ed5d4f8c Forward-Port-Of: odoo/odoo#169598
Original PR description
In commit [1], a missing semicolon breaks the neutralization of a database. This commit fixes the issue. task-3895772 [1]: https://github.com/odoo/odoo/commit/44ecef1c6a22afba3e5151fa857fe550ed5d4f8c Forward-Port-Of: odoo/odoo#169598
Steps to reproduce: [phonenumbers] - Create a customer from Malaysia and add a phone number '123456789' -> it will be formatted '+60 12-345 6789' - Create an invoice - Confirm - Click on Process Now Issue: There will be a warning "The Buyer’s contact phone number (BT-57) shall start with “0“ or “+”, followed by a maximum of 15 number and minimum 4 character after the “+“ or “0“ , if exist." Solution: Only keep digits and the "+" symbol note: The test has changed in order to be m
Original PR description
Steps to reproduce: [phonenumbers] - Create a customer from Malaysia and add a phone number '123456789' -> it will be formatted '+60 12-345 6789' - Create an invoice - Confirm - Click on Process Now…
Steps to reproduce: [phonenumbers] - Create a customer from Malaysia and add a phone number '123456789' -> it will be formatted '+60 12-345 6789' - Create an invoice - Confirm - Click on Process Now Issue: There will be a warning "The Buyer’s contact phone number (BT-57) shall start with “0“ or “+”, followed by a maximum of 15 number and minimum 4 character after the “+“ or “0“ , if exist." Solution: Only keep digits and the "+" symbol note: The test has changed in order to be more realistic. That is, if I have a foreign contact I will: - or use/set the correct format manually (if not, it should raise an error from the third-party api) - or install `phonenumbers` to automatically format it (if not on a saas) `phone_validation` is in 'auto_intsall' whenever `base` and `mail` are installed (and if the library `phonenumbers` is installed) and works as followed: ``` >>> import phonenumbers >>> raw_phone = '(870)-931-0505' >>> parsed_number = phonenumbers.parse(raw_phone, "US") >>> phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.INTERNATIONAL) '+1 870-931-0505' ``` opw-3912128 Forward-Port-Of: odoo/odoo#164717
step: -install l10n_it and account_peppol without demo data -setup a peppol demo account -give your company a codigo fiscal -settings > Italian Electronic Invoicing > check "Allow Odoo to process invoices" -> constraint This happens because when creating demo edi, the id_client is set as "demo{company_id}", but the id_client must be unique so when registering two edi services for the same company, there is a collision. After this PR, we avoid the collision by adding the proxy_type to t
Original PR description
step:
-install l10n_it and account_peppol without demo data -setup a peppol demo account
-give your company a codigo fiscal
-settings > Italian Electronic Invoicing > check "Allow Odoo to process invoices"
-> constraint
This happens because when creating demo edi, the id_client is set as "demo{company_id}", but the id_client must be unique so when registering two edi services for the same company, there is a collision.
After this PR, we avoid the collision by adding the proxy_type to the demo id_client.
opw-3983974
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#169385For a logged user, when applying to a job position, the phone number is filled with phone but updates mobile on submission (instead of phone field) Steps to reproduce: 1.Navigate to jobs > /jobs in the url. 2.Log as an existing user > the phone number is pre filled in the job form based on the user's phone field (can be seen in the contact view). 3.Change the phone number in the job form. 4.Apply to the job position > click on the "i'm feeling lucky" button. 5.Navigate to contact > search
Original PR description
For a logged user, when applying to a job position, the phone number is filled with phone but updates mobile on submission (instead of phone field) Steps to reproduce: 1.Navigate to jobs > /jobs in the url. 2.Log as an existing user > the phone number is pre filled in the job form based on the user's phone field (can be seen in the contact view). 3.Change the phone number in the job form. 4.Apply to the job position > click on the "i'm feeling lucky" button. 5.Navigate to contact > search for the user 6.The given phone number will overwrite the mobile field of the user view Cause: partner_mobile field was been used. Solution: use partner_phone field from hr_applicant model opw-3964062 Forward-Port-Of: odoo/odoo#168745
__Explanation of the issue:__ Creating an allocation for multiple employees create children allocations for each individual employee concerned by that allocation. However, before this commit, refusing a parent allocation would refuse the children allocation, and validating it again would still create new children regardless. This behaviour is reminescent from the draft state which was the only way to modify an allocation __Reproduce the issue:__ - Create a multiple-employee allocation - Va
Original PR description
__Explanation of the issue:__ Creating an allocation for multiple employees create children allocations for each individual employee concerned by that allocation. However, before this commit,…
__Explanation of the issue:__ Creating an allocation for multiple employees create children allocations for each individual employee concerned by that allocation. However, before this commit, refusing a parent allocation would refuse the children allocation, and validating it again would still create new children regardless. This behaviour is reminescent from the draft state which was the only way to modify an allocation __Reproduce the issue:__ - Create a multiple-employee allocation - Validate it - Refuse it - Validate it again - Refuse it again - An error should appear, saying: "Allocation request must be confirmed or validated in order to refuse it." __How the issue was fixed:__ This commit synchronizes both parent and children allocations upon the write of the parent one, which will also update the children. Additionally, validating those parent allocations will now check if children allocations are present beforehand to avoid duplicating them. task-3935358 Forward-Port-Of: odoo/odoo#165990
Issue: ------ With many departments (for example 40), in the kiosk mode, when we identify ourselves manually, we are obliged to reduce the screen size in order to access the employees. Solution: --------- Force a max height for the section with the departments. This enables the `overflow-auto` class to take effect. It is now possible to scroll along the Y axis. opw-3956359 Forward-Port-Of: odoo/odoo#169616
Original PR description
Issue: ------ With many departments (for example 40), in the kiosk mode, when we identify ourselves manually, we are obliged to reduce the screen size in order to access the employees. Solution: --------- Force a max height for the section with the departments. This enables the `overflow-auto` class to take effect. It is now possible to scroll along the Y axis. opw-3956359 Forward-Port-Of: odoo/odoo#169616
When using the action_view_opportunity for assigned partners we should be able to see the lost leads when filtering by 'Lost', but if we don't set the active_test to False for the context we won't be able to see them in this view. So since we retrieve the leads with `self.env['crm.lead'].with_context(**action_context_origin)` we need to make sure the active_test is False to get all the leads related to the partner. ## Steps to reproduce: 1. Install website_crm_partner_assign. 2. Create at
Original PR description
When using the action_view_opportunity for assigned partners we should be able to see the lost leads when filtering by 'Lost', but if we don't set the active_test to False for the context we won't be able to see them in this view. So since we retrieve the leads with `self.env['crm.lead'].with_context(**action_context_origin)` we need to make sure the active_test is False to get all the leads related to the partner. ## Steps to reproduce: 1. Install website_crm_partner_assign. 2. Create at least 2 leads (one active and one lost) for a new partner. 3. Make sure we have set this partner as assigned partner. 4. Now on the partner form go to the leads action to see the leads related to the partner. opw-3903070 Forward-Port-Of: odoo/odoo#166832
The main goal of this PR is to ensure that the `X` button or `Esc` shortcut (Dismiss feature) of the confirmation dialog is allowed to have a different behavior than the `Cancel` button. At present, it performs the same action as the `Cancel` button but there might be cases when the dialog does not have a `Cancel` button and we still want to handle the dialog dismiss action. To enable this, this PR adds an optional callback for `dismiss` operation to the dialogData.dismiss that will
Original PR description
The main goal of this PR is to ensure that the `X` button or `Esc` shortcut (Dismiss feature) of the confirmation dialog is allowed to have a different behavior than the `Cancel` button. At present,…
The main goal of this PR is to ensure that the `X` button or `Esc` shortcut (Dismiss feature) of the confirmation dialog is allowed to have a different behavior than the `Cancel` button. At present, it performs the same action as the `Cancel` button but there might be cases when the dialog does not have a `Cancel` button and we still want to handle the dialog dismiss action. To enable this, this PR adds an optional callback for `dismiss` operation to the dialogData.dismiss that will only be executed when a dialog is closed via of the `X` button or the `Escape` shortcut. Otherwise, it will execute the callback for `cancel` operation, if any. This PR also adds/modifies some tests in `confirmation_dialog_tests.js` and `list_view_tests.js` to ensure that this new feature works as intended. **Example Use Case:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click out or press 'Enter'. - Dismiss the alert dialog via the "X" button or the "Esc" shortcut. **Issue:** An alert dialog indicating a validation error is shown when a field value is cleared. Yet, on closing the dialog, the unnamed document is saved as is. Instead, the changes should be reverted. **Cause:** The dismiss operation is never handled in case of alert dialog for invalid selection. Hence, by default, it applies the changes made to the field. **Fix:** The alert dialog for invalid selection is different from the ones which are simply used to display warnings or alert messages because they do not need to perform any action upon dismissing the dialog. In this case, we want to prevent any invalid changes from being applied. It is achieved by calling the `leaveEditMode` method which discards them and switches the config mode. Hence, we do something similar to what is done on the click of `OK` button, on dismissing the dialog as well. This behavior is introduced because even if the user discards the dialog, any change that is not valid should not be applied. Task: [3799280](https://www.odoo.com/web#id=3799280&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form) Forward-Port-Of: odoo/odoo#169129 Forward-Port-Of: odoo/odoo#166103
In this PR fixes the following issue ---------------------------------------------------------- - The pull request addresses a mobile view issue where the context 'show_project_update' is False so the showProjectUpdate method will not be called and the missing record error will not appear. - As part of this pull request, the visible property will be set for the x and y so that the scroll bar will appear at the bottom when fever records are displayed. task-3681318 Forward-Port-Of
Original PR description
In this PR fixes the following issue ---------------------------------------------------------- - The pull request addresses a mobile view issue where the context 'show_project_update' is False so the showProjectUpdate method will not be called and the missing record error will not appear. - As part of this pull request, the visible property will be set for the x and y so that the scroll bar will appear at the bottom when fever records are displayed. task-3681318 Forward-Port-Of: odoo/odoo#151377
This fixes a bug introduced in 96638eb, where lines with discount apply it twice. Backport of https://github.com/odoo/odoo/pull/168212 cc @robinengels --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168819
Original PR description
This fixes a bug introduced in 96638eb, where lines with discount apply it twice. Backport of https://github.com/odoo/odoo/pull/168212 cc @robinengels --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168819
Versions -------- - 16.0+ Steps ----- 1. Enable lock SO on confirmation; 2. enable wire transfer as payment provider' 3. go to website; 4. buy a product using wire transfer; 5. confirm the generated SO in the back-end; 6. front-end says payment has been confirmed. Issue ----- The confirmation status of the SO doesn't reflect the confirmation status of the payment. Cause ----- The `action_lock` method looks at any relevant wire transfers that are pending, and confirms them.
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Enable lock SO on confirmation; 2. enable wire transfer as payment provider' 3. go to website; 4. buy a product using wire transfer; 5. confirm the generated SO in the back-end; 6. front-end says payment has been confirmed. Issue ----- The confirmation status of the SO doesn't reflect the confirmation status of the payment. Cause ----- The `action_lock` method looks at any relevant wire transfers that are pending, and confirms them. Solution -------- Decouple wire transfer confirmation from the locking of sale orders. opw-3751481 Forward-Port-Of: odoo/odoo#169369 Forward-Port-Of: odoo/odoo#169135
Currently people wanting to use a bank journal for their credit card transactions have to use a hack to set the default account as a credit card account, since the domain does not allow this. To make the life of people easier, we now allow selecting a credit card account on bank journals. [task-3891250](https://www.odoo.com/web#id=3891250&model=project.task) Forward-Port-Of: odoo/odoo#167188 Forward-Port-Of: odoo/odoo#163947
Original PR description
Currently people wanting to use a bank journal for their credit card transactions have to use a hack to set the default account as a credit card account, since the domain does not allow this. To make the life of people easier, we now allow selecting a credit card account on bank journals. [task-3891250](https://www.odoo.com/web#id=3891250&model=project.task) Forward-Port-Of: odoo/odoo#167188 Forward-Port-Of: odoo/odoo#163947
This is a follow-up of [1]. The ability to duplicate from the list view appeared with version 17.0 and was not taken into account during the forward-port. [1]: https://github.com/odoo/odoo/commit/1688a19266809d23f525563dbbb20175cbd8da83 Forward-Port-Of: odoo/odoo#167031
Original PR description
This is a follow-up of [1]. The ability to duplicate from the list view appeared with version 17.0 and was not taken into account during the forward-port. [1]: https://github.com/odoo/odoo/commit/1688a19266809d23f525563dbbb20175cbd8da83 Forward-Port-Of: odoo/odoo#167031
Steps : * Create a loyalty program of any type * Create 2 or more rewards * Create a sale order and use the loyalty program and reward we just created * Go back to the loyalty program and try to delete that reward Issue : The record cannot be deleted as another model requires the record being deleted Fix : Changed the unlink method to delete the record if this record id is not required by another model and archive the record if it is required opw : 3879031 --- I confirm I hav
Original PR description
Steps : * Create a loyalty program of any type * Create 2 or more rewards * Create a sale order and use the loyalty program and reward we just created * Go back to the loyalty program and try to delete that reward Issue : The record cannot be deleted as another model requires the record being deleted Fix : Changed the unlink method to delete the record if this record id is not required by another model and archive the record if it is required opw : 3879031 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164293
Issue ---- When uploading a file, the chatter is unmounted from the right side of the screen then remounted to the bottom as soon as the file is uploaded to preview. For multiple files, the `onUploaded` hook is called before the re-mounted chatter root element becomes accessible to the component. This results in dereferencing `null` in `onUploaded`. Steps ----- - Create a new bill. - Upload multiple attachments. Make sure that: - There are no attachments when you upload. - The
Original PR description
Issue ---- When uploading a file, the chatter is unmounted from the right side of the screen then remounted to the bottom as soon as the file is uploaded to preview. For multiple files, the `onUploaded` hook is called before the re-mounted chatter root element becomes accessible to the component. This results in dereferencing `null` in `onUploaded`. Steps ----- - Create a new bill. - Upload multiple attachments. Make sure that: - There are no attachments when you upload. - The attachments are large enough so the second attachment is uploaded just after the first is previewed (and the chatter is unmounted from the right). opw-3985584 Forward-Port-Of: odoo/odoo#169095
Before this commit: - the tooltip is mismatched to the conditions of service_tracking_type. After this commit: - fixes the tooltip of the product in `task_in_project` and `project_only` fields. ref PR: https://github.com/odoo/odoo/pull/103974 task-3964655 Forward-Port-Of: odoo/odoo#167830
Original PR description
Before this commit: - the tooltip is mismatched to the conditions of service_tracking_type. After this commit: - fixes the tooltip of the product in `task_in_project` and `project_only` fields. ref PR: https://github.com/odoo/odoo/pull/103974 task-3964655 Forward-Port-Of: odoo/odoo#167830
**Steps to reproduce:** - Install Point of Sale module - Create an order through the PoS day and time X - Re-print the receipt/ticket another day **Current behavior before PR:** When reprint an order's receipt in a day different than the order creation date you will have the current date at the end of the receipt. This is happening because when exporting the data of the order to print the receipt we are setting the date to be printed equals to the receipt date which is the current time
Original PR description
**Steps to reproduce:** - Install Point of Sale module - Create an order through the PoS day and time X - Re-print the receipt/ticket another day **Current behavior before PR:** When reprint an order's receipt in a day different than the order creation date you will have the current date at the end of the receipt. This is happening because when exporting the data of the order to print the receipt we are setting the date to be printed equals to the receipt date which is the current time. https://github.com/odoo/odoo/blob/17.0/addons/point_of_sale/static/src/app/store/models.js#L1610 https://github.com/odoo/odoo/blob/17.0/addons/point_of_sale/static/src/app/store/models.js#L1625 **Desired behavior after PR is merged:** We are now passing the order date instead of the receipt date. opw-3979454 Forward-Port-Of: odoo/odoo#169265
This error occurs when we create a new sales order, then proceed to create an invoice within that sales order, and finally attempt to open the ``Accrued Revenue Entry`` from the action button. Steps to reproduce: - Install the ``sale_management`` and ``account_accountant`` modules - Create new sales orders > ``Confirm`` > ``Create Invoice`` button > Down Payment in % > ``Confirm`` > ``Sale Order`` smart button - Go to action button > ``Accrued Revenue Entry`` Traceback : ``Asse
Original PR description
This error occurs when we create a new sales order, then proceed to create an invoice within that sales order, and finally attempt to open the ``Accrued Revenue Entry`` from the action button. Steps…
This error occurs when we create a new sales order, then proceed to create an invoice within that sales order, and finally attempt to open the ``Accrued Revenue Entry`` from the action button. Steps to reproduce: - Install the ``sale_management`` and ``account_accountant`` modules - Create new sales orders > ``Confirm`` > ``Create Invoice`` button > Down Payment in % > ``Confirm`` > ``Sale Order`` smart button - Go to action button > ``Accrued Revenue Entry`` Traceback : ``AssertionError precision_rounding must be positive, got 0.0`` At [1] within ``o.order_line``, we are encountering an issue where ``precision_rounding`` is being retrieved as zero. This is leading to an error. This commit will fix the above error by implementing a check for the ``is_downpayment`` in the order line. [1]: https://github.com/odoo/odoo/blob/34b651de35b986db404a3950866bed7bc7e1fae2/addons/account/wizard/accrued_orders.py#L174 sentry-4857910663 Forward-Port-Of: odoo/odoo#165014
Some part of the `action_send_chat_request` method has been wrongly indented in [1]. As a result, this block is executed as part of a loop while it should not. This PR put the block of code out of the loop. [1]: https://github.com/odoo/odoo/pull/129770 Forward-Port-Of: odoo/odoo#169454 Forward-Port-Of: odoo/odoo#169379
Original PR description
Some part of the `action_send_chat_request` method has been wrongly indented in [1]. As a result, this block is executed as part of a loop while it should not. This PR put the block of code out of the loop. [1]: https://github.com/odoo/odoo/pull/129770 Forward-Port-Of: odoo/odoo#169454 Forward-Port-Of: odoo/odoo#169379
When leaving the table mode, the filter should be removed to show all products again. taskId: 3989229 Forward-Port-Of: odoo/odoo#169642 Forward-Port-Of: odoo/odoo#169416
Original PR description
When leaving the table mode, the filter should be removed to show all products again. taskId: 3989229 Forward-Port-Of: odoo/odoo#169642 Forward-Port-Of: odoo/odoo#169416
When scanning a barcode, the search should return only one partner if the barcode is an exact match. This is the case for example when scanning a membership card. taskId: 3987605 Forward-Port-Of: odoo/odoo#169695 Forward-Port-Of: odoo/odoo#169603
Original PR description
When scanning a barcode, the search should return only one partner if the barcode is an exact match. This is the case for example when scanning a membership card. taskId: 3987605 Forward-Port-Of: odoo/odoo#169695 Forward-Port-Of: odoo/odoo#169603
Steps to reproduce: - install point of sale and HR - create some data in the point of sale app - switch the user language to arabic - open the point of sale dashboard => some cells are in error, the date cannot be recognised. The reason is that `formatDateTime` returns the date with arabic numbers, which can't be parsed by the spreadsheet engine. The option `numberingSystem` is ignored by `formatDateTime`. With this commit, we change the date numbering system before. opw-3992621
Original PR description
Steps to reproduce: - install point of sale and HR - create some data in the point of sale app - switch the user language to arabic - open the point of sale dashboard => some cells are in error, the date cannot be recognised. The reason is that `formatDateTime` returns the date with arabic numbers, which can't be parsed by the spreadsheet engine. The option `numberingSystem` is ignored by `formatDateTime`. With this commit, we change the date numbering system before. opw-3992621 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169627