Monday, November 13, 2023
26 changes · 17.0
Enhancements to existing features
This update restores automated testing for the add-to-cart experience on the website store. It helps ensure customers can reliably add products to their cart, reducing the risk of checkout disruptions going unnoticed.
Original PR description
task-3547913
This update adds comprehensive test cases for WhatsApp templates to ensure reliable functionality across key scenarios including template synchronization, submission, and webhook updates. The improvements enhance code quality and maintainability by organizing tests properly and applying consistent standards across the WhatsApp module.
Original PR description
Added test cases for WhatsApp templates covering the following scenarios: - Template synchronization from a WhatsApp account. - Single template synchronization from Template. - Template submit to WhatsApp account - Template status update webhook. - Template quality update webhook. - Template category update webhook. Task - 3536176 Forward-Port-Of: odoo/enterprise#49815
Resolved issues and error corrections
The online shop category filter sidebar no longer shows an unwanted background when a category section is expanded. This makes the shopping filters look cleaner and more consistent for visitors.
Original PR description
This commit removes an undesired background on collapsible categories when they are displayed in the left filter sidebar task-3593419 | Before | After | |--------|--------| |  |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Features or functions removed from Odoo
This update removes outdated, unused code from Odoo's web and website components. It helps keep the platform easier to maintain without introducing expected changes for end users.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Before this commit, the templates of the embed live chat were not translated. This is due to the live chat embed app being mounted without giving any `translateFn`. This commit fixes this issue. opw-3509309 Forward-Port-Of: odoo/odoo#141783
Original PR description
Before this commit, the templates of the embed live chat were not translated. This is due to the live chat embed app being mounted without giving any `translateFn`. This commit fixes this issue. opw-3509309 Forward-Port-Of: odoo/odoo#141783
This update fixes a loading problem that could prevent tooltip support from working correctly when the website editor runs inside an embedded page. It helps keep the editing experience stable and avoids errors caused by missing dependencies.
Original PR description
[FIX] web_editor: dependency errors in iframe bundle [FIX] web_editor: Bootstrap tooltip lib load in iframe task-3537756
Creating a new attendance record no longer crashes when the current user has no employee linked in their default company. This prevents an error screen and lets HR attendance workflows continue normally in that setup.
Original PR description
Steps to reproduce: ------------------- - Create user with default company A - User may have related employees, but not in company A - Go to attendance - click -> New You will get a traceback related to the sql request of _compute_overtime_hours Explanation: ------------ - The query needs a non-empty list of employees Fix: ---- - Don't run the sql query if we haven't defined any employees yet on the attendance
When a delivery carrier is duplicated, the new copy now has “(copy)” added to its name. This helps users quickly tell the original carrier from the duplicate and reduces confusion when managing shipping options.
Original PR description
Main Changes:
Precise (copy) in the name of a duplicate of a delivery carrier
Before:
When we duplicate a delivery carrier, the name of the copy is
exactly the same as the name of the source
After:
When we duplicate a delivery carrier, we append ' (copy)' at the end
of the name for the copySteps to reproduce: 1.Enable new language Spanish(PE)(language=ES_pe) 2. Install Contact Module 3. Go to Contact module 4. Try to create new contact or view exesting conact Issue: Caused by: EvalError: Can not evaluate python expression: (bool(no is_company)) Cause: Incorrect python expression use in es_mx.po file. Fix: Change the terms in base module es_mx.po file invisible="is_company" to invisible="not is_company" using this issues has been fixed. Description of the issue/f
Original PR description
Steps to reproduce: 1.Enable new language Spanish(PE)(language=ES_pe) 2. Install Contact Module 3. Go to Contact module 4. Try to create new contact or view exesting conact Issue: Caused by: EvalError: Can not evaluate python expression: (bool(no is_company)) Cause: Incorrect python expression use in es_mx.po file. Fix: Change the terms in base module es_mx.po file invisible="is_company" to invisible="not is_company" using this issues has been fixed. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: Closes #141739 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that when several XML files in an asset bundle are broken, each error report is handled separately instead of causing a duplicate-template failure. This helps administrators and developers see the real asset issues more clearly and prevents confusing secondary errors during bundle processing.
Original PR description
When there are multiple broken XML files in an assets bundle. During the bundle processing, a template containing the parsing error message is returned for each XML file that is broken.
Before this commit, each of the returned templates had the same name, raising another error ("Template already exists in module").
Now, all the returned templates has unique names.This update fixes internal automated checks for Point of Sale flows after a previous cleanup left outdated references behind. It helps keep testing reliable for checkout, payment, loyalty, and online payment scenarios without changing day-to-day user behavior.
Original PR description
After the refactor of pos tours all classes in the tours are removed. The problem is that some instances of `this` were still kept. This is obviously wrong. In this commit we fix the issue. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This pull request appears to support invoice fixes, but the available details only show a change to project requirements rather than specific invoice screens or workflows. The business impact is likely limited unless the dependency change directly resolves invoice processing issues.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When selecting a purchase order on a vendor bill, the payment_reference is replaced even it was manually filled. Steps: - Create and confirm a PO - Create a vendor bill, set the bill ref and the payment reference (different than bill ref) - Select PO as purchase_vendor_bill_id -> payment_reference is replaced by bill ref value With this commit, we keep the payment_reference as it is if not empty. opw-3549673 Forward-Port-Of: odoo/odoo#141510 Forward-Port-Of: odoo/odoo#139526
Original PR description
When selecting a purchase order on a vendor bill, the payment_reference is replaced even it was manually filled. Steps: - Create and confirm a PO - Create a vendor bill, set the bill ref and the payment reference (different than bill ref) - Select PO as purchase_vendor_bill_id -> payment_reference is replaced by bill ref value With this commit, we keep the payment_reference as it is if not empty. opw-3549673 Forward-Port-Of: odoo/odoo#141510 Forward-Port-Of: odoo/odoo#139526
Versions: --------- - 15.0+ Steps to reproduce: ------------------- 1. install project & hr_timesheet; 2. create a follower-only project with timesheets enabled; 3. assign a task to a non-follower with user-level access rights; 4. log in as user; 5. go to timesheets app; 6. add a line. Issue: ------ The assigned task doesn't show in the search results. Cause: ------ The task's `allow_timesheets` field is set to be `related` to its project's `allow_timesheets` field. This fi
Original PR description
Versions: --------- - 15.0+ Steps to reproduce: ------------------- 1. install project & hr_timesheet; 2. create a follower-only project with timesheets enabled; 3. assign a task to a non-follower…
Versions: --------- - 15.0+ Steps to reproduce: ------------------- 1. install project & hr_timesheet; 2. create a follower-only project with timesheets enabled; 3. assign a task to a non-follower with user-level access rights; 4. log in as user; 5. go to timesheets app; 6. add a line. Issue: ------ The assigned task doesn't show in the search results. Cause: ------ The task's `allow_timesheets` field is set to be `related` to its project's `allow_timesheets` field. This field is inaccessible for private projects the user doesn't follow, so it doesn't show up when searching tasks assigned to user where `allow_timesheets=True`. Solution: --------- Make the field computed instead of related. By default, fields are computed in a superuser environment, so this way the task does have access. Computed fields aren't searchable by default unless stored, so a search method is required as well. opw-3450671 Forward-Port-Of: odoo/odoo#141719 Forward-Port-Of: odoo/odoo#133443
Before this commit, for some synced users, a weird behavior was happening when an event was created in Microsoft: the event info was being sent to Odoo with a different organizer than 'self.env.user' even though it was the same user creating the event. After this commit, a condition checking if the event was created in Microsoft is added for skipping the checking since only events created in Odoo can have different organizers during their creation. Issue from: 3450045 Forward-Port-Of: odo
Original PR description
Before this commit, for some synced users, a weird behavior was happening when an event was created in Microsoft: the event info was being sent to Odoo with a different organizer than 'self.env.user' even though it was the same user creating the event. After this commit, a condition checking if the event was created in Microsoft is added for skipping the checking since only events created in Odoo can have different organizers during their creation. Issue from: 3450045 Forward-Port-Of: odoo/odoo#140880
In stock_production_lot model, there is a field last_delivery_partner_id which is displayed in a Tree View. This fields require to compute ALL the delivery_ids of each LOT, only to display the last_delivery_partner. This implies a big performance issue for big lots with huge tracability needs in it. The idea is simple, dissociate the computation for delivery_ids, which is only used in Form View and the last_delivery_partner_id which is only used in the Tree View. I do agree that if both ar
Original PR description
In stock_production_lot model, there is a field last_delivery_partner_id which is displayed in a Tree View. This fields require to compute ALL the delivery_ids of each LOT, only to display the…
In stock_production_lot model, there is a field last_delivery_partner_id which is displayed in a Tree View. This fields require to compute ALL the delivery_ids of each LOT, only to display the last_delivery_partner. This implies a big performance issue for big lots with huge tracability needs in it. The idea is simple, dissociate the computation for delivery_ids, which is only used in Form View and the last_delivery_partner_id which is only used in the Tree View. I do agree that if both are used in the same view, it would double the computation time. But currently there is a lot of useless computation. Currently the only way to mitigate is by removing the field last_delivery_partner_id in the Tree View, but if client needs that field, it doesn't works. # Benchmark |Lots/Serial |# Lots | # Delivery | Before PR | After PR | |:------------:|:---------:|:--------:|:--------:|:--------:| |Lots| 3 | 3 | 0.2723 s |0.0091 s | |Lots| 4 | 6699 | 307.98 s | 0.0059 s | |Lots | 13 | 9575 | 569.85 | 0.0036 s | |Serial | 80 | 80 | 0.30 s | 0.42 s | |Serial | 150 | 150 |0.39 s | 0.51 s | |Serial | 7000 | 2000 | 0.50 s/Batch of 1000 | 0.60 s/Batch of 1000| Forward-Port-Of: odoo/odoo#137618 Forward-Port-Of: odoo/odoo#129363
This commit adds the missing neutralisation necessary for the `pos_paytm` module introduced in [1] The purpose of the standard neutralisation framework is to allow us to create database copies that will not interract with external systems in ways that could impact the production database (or if it is not possible to prevent the interractions, make sure that they are benign or wont result in actual changes), or impact the customers of the operator of the production database. This is ma
Original PR description
This commit adds the missing neutralisation necessary for the `pos_paytm` module introduced in [1] The purpose of the standard neutralisation framework is to allow us to create database copies that will not interract with external systems in ways that could impact the production database (or if it is not possible to prevent the interractions, make sure that they are benign or wont result in actual changes), or impact the customers of the operator of the production database. This is mainly useful to allow safe support investigation on database duplicates. [1] https://github.com/odoo/odoo/pull/133334 Forward-Port-Of: odoo/odoo#135505
Current behavior: When importing a sale order with a product that is not groupable, the line is not split and the whole quantity is added to one line. Steps to reproduce: - Create a new uom category that is not groupable - Add a new uom to the category - Create a new product with the uom - Create a new sale order with the product - Settle the order in the PoS - All quantity is on one line This is also an issue if the product is tracked by serial number. The popup to fill the serial
Original PR description
Current behavior: When importing a sale order with a product that is not groupable, the line is not split and the whole quantity is added to one line. Steps to reproduce: - Create a new uom category that is not groupable - Add a new uom to the category - Create a new product with the uom - Create a new sale order with the product - Settle the order in the PoS - All quantity is on one line This is also an issue if the product is tracked by serial number. The popup to fill the serial number will only have one field, even if the quantity is greater than 1. opw-3493378 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#139444 Forward-Port-Of: odoo/odoo#135213
Succeeds #140464 Misunderstood `had_failure` and should not have reused it, its goal is to avoid eagerly aborting some JS tests -- specifically the unit test suites -- while still logging errors normally (useful when watching interactively, or for the runbot's own reporting). So the *checks* added on `had_failure` should in fact be checks on `_result.exception()`, and as it turns out on `_result.done()`: if a tour is already marked as successful we can't fail it either. So we should not
Original PR description
Succeeds #140464 Misunderstood `had_failure` and should not have reused it, its goal is to avoid eagerly aborting some JS tests -- specifically the unit test suites -- while still logging errors normally (useful when watching interactively, or for the runbot's own reporting). So the *checks* added on `had_failure` should in fact be checks on `_result.exception()`, and as it turns out on `_result.done()`: if a tour is already marked as successful we can't fail it either. So we should not, we should log an error (to notify the caller / runbot) and then bail. While #140464 did improve some things, we could still lose legit errors and get pages of unhelpful `InvalidStateError` if a tour would succeed *then* failures would occur, as the guard only checked that the tour had already failed. Forward-Port-Of: odoo/odoo#141754 Forward-Port-Of: odoo/odoo#141180
Commit [1](https://github.com/odoo/odoo/commit/03a134c) implemented an approach for changing style of a list item to normal. It no longer wrapped the content in a `p` to remove extra spacing to next list item. Later commit [2](https://github.com/odoo/odoo/commit/324e138) was introduced which did the same thing but in sanatize. Hence the code added in commit [1](https://github.com/odoo/odoo/commit/03a134c) is no longer needed. This PR removes the redundant code from `setTagName`. Forward-P
Original PR description
Commit [1](https://github.com/odoo/odoo/commit/03a134c) implemented an approach for changing style of a list item to normal. It no longer wrapped the content in a `p` to remove extra spacing to next list item. Later commit [2](https://github.com/odoo/odoo/commit/324e138) was introduced which did the same thing but in sanatize. Hence the code added in commit [1](https://github.com/odoo/odoo/commit/03a134c) is no longer needed. This PR removes the redundant code from `setTagName`. Forward-Port-Of: odoo/odoo#141702
Currently, an error occurs when the user tries to open an employees who checks in but does not check out. Steps to produce: 1. Install 'hr_attendance' 2. Open Attendence > Attendences > Click new 3. Set the current user as an employee, set the `check In` date for the previous month, and no add `Check out` date 5. Go to employees > try to open current user Employee Traceback: ``` TypeError: '<=' not supported between instances of 'bool' and 'datetime.datetime' File "odoo/http
Original PR description
Currently, an error occurs when the user tries to open an employees who checks in but does not check out. Steps to produce: 1. Install 'hr_attendance' 2. Open Attendence > Attendences > Click new 3.…
Currently, an error occurs when the user tries to open an employees who checks in but does not check out.
Steps to produce:
1. Install 'hr_attendance'
2. Open Attendence > Attendences > Click new
3. Set the current user as an employee, set the `check In` date
for the previous month, and no add `Check out` date
5. Go to employees > try to open current user Employee
Traceback:
```
TypeError: '<=' not supported between instances of 'bool' and 'datetime.datetime'
File "odoo/http.py", line 2157, in __call__
response = request._serve_db()
File "odoo/http.py", line 1732, 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 1759, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1960, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 207, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "addons/web/models/models.py", line 86, in web_read
values_list: List[Dict] = self.read(fields_to_read, load=None)
File "odoo/models.py", line 3521, in read
return self._read_format(fnames=fields, load=load)
File "odoo/models.py", line 3732, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "odoo/models.py", line 6570, in __getitem__
return self._fields[key].__get__(self, type(self))
File "odoo/fields.py", line 1205, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1383, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 424, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4848, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 101, in determine
return needle(*args)
File "addons/hr_attendance/models/hr_employee.py", line 103, in _compute_hours_last_month
for att in employee.attendance_ids.filtered(
File "odoo/models.py", line 6082, in filtered
return self.browse([rec.id for rec in self if func(rec)])
File "odoo/models.py", line 6082, in <listcomp>
return self.browse([rec.id for rec in self if func(rec)])
File "addons/hr_attendance/models/hr_employee.py", line 104, in <lambda>
lambda att: att.check_in >= start_naive and att.check_out <= end_naive
```
This is because https://github.com/odoo/odoo/pull/140629 added [1] in the filter, but in certain cases, the `att.check_out` may not be present.
This commit fixes the above issue by filtering attendees who have a check-out date.
[1]-https://github.com/odoo/odoo/blob/46f2a019bd141389233257f24f0ddae05b0fa008/addons/hr_attendance/models/hr_employee.py#L82
sentry-4616207347
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#141673Before this commit, with the synchronization with Outlook active, it was not possible editing the organizer of an event to a different user than yourself or even creating a new event with a different organizer because Outlook didn't accept the change. After this commit, it is possible creating a new event with this characteristic and changing the event's organizer to a different user too. Changing the organizer will delete the current event and create a new one, and creating a brand new event
Original PR description
Before this commit, with the synchronization with Outlook active, it was not possible editing the organizer of an event to a different user than yourself or even creating a new event with a different organizer because Outlook didn't accept the change. After this commit, it is possible creating a new event with this characteristic and changing the event's organizer to a different user too. Changing the organizer will delete the current event and create a new one, and creating a brand new event will create the event directly with the different organizer. Task-id: 3450045 Forward-Port-Of: odoo/odoo#140680 Forward-Port-Of: odoo/odoo#131142
Before this PR online and offline cache getter where called when not needed. This PR move the code inside the onWillRender hook to cache the results and avoid useless computation of getters. task-3572093 Forward-Port-Of: odoo/odoo#141367 Forward-Port-Of: odoo/odoo#139914
Original PR description
Before this PR online and offline cache getter where called when not needed. This PR move the code inside the onWillRender hook to cache the results and avoid useless computation of getters. task-3572093 Forward-Port-Of: odoo/odoo#141367 Forward-Port-Of: odoo/odoo#139914
When submitting invoices with a foreign partneer using the fiscal device, the device will throw an error when the VAT number is not formatted as per the Kenyan VAT number. In this case, we should only send the vat number when it matches the format of a Kenyan VAT number. opw-3557736 Forward-Port-Of: odoo/odoo#140381
Original PR description
When submitting invoices with a foreign partneer using the fiscal device, the device will throw an error when the VAT number is not formatted as per the Kenyan VAT number. In this case, we should only send the vat number when it matches the format of a Kenyan VAT number. opw-3557736 Forward-Port-Of: odoo/odoo#140381
**Before this PR:** 1) The `certification` field was visible when `scoring_type` was set to 'No scoring'. 2) The `description` field of the Badge in form view was not taking the full width of the sheet. **After this PR:** 1) The `certification` field will be invisible if `scoring_type` is set to 'No scoring'. 2) The `description` field of the Badge in form view will take the full width of the sheet. **Task**-3367524 Forward-Port-Of: odoo/odoo#140151 Forward-Port-Of: odoo/odoo#139033
Original PR description
**Before this PR:** 1) The `certification` field was visible when `scoring_type` was set to 'No scoring'. 2) The `description` field of the Badge in form view was not taking the full width of the sheet. **After this PR:** 1) The `certification` field will be invisible if `scoring_type` is set to 'No scoring'. 2) The `description` field of the Badge in form view will take the full width of the sheet. **Task**-3367524 Forward-Port-Of: odoo/odoo#140151 Forward-Port-Of: odoo/odoo#139033
Updated po file to consider the rename to Peruvian reports Forward-Port-Of: odoo/enterprise#48743 Forward-Port-Of: odoo/enterprise#48276
Original PR description
Updated po file to consider the rename to Peruvian reports Forward-Port-Of: odoo/enterprise#48743 Forward-Port-Of: odoo/enterprise#48276