Thursday, November 23, 2023
28 changes · master
Enhancements to existing features
Test logs now identify the specific test case that produced each message, making failures easier to investigate. This improves internal debugging for browser-based and JavaScript tests, with a small increase in log size.
Original PR description
Currently the HttpCase logging uses a class-bound logger. This means the messages (including browser messages during tours) are associated with the test *class*, making debugging more difficult than necessary as the logs don't actually say which test the log comes from, you have to hunt that information somewhere else. Add a per-instance sub-logger, such that a test case's inner logs are associated with that test specifically, clarifying the logs (especially tours and js tests), at the cost of increasing the size of the logs a bit.
Knowledge article moves now create fewer chatter messages by combining parent and root article changes into one entry when possible. This makes article history easier to read and reduces noise for users tracking hierarchy changes.
Original PR description
When the user moves an article in the hierarchy, the chatter will display one log entry when either the parent article or the root article changes. To minimize the number of log entries, we will consolidate these two changes into a single log entry whenever possible, using the same format as the command palette (i.e., \<parent article\> - \<root article\>). This will make the chatter less noisy. task-3491588
Resolved issues and error corrections
The employee form layout has been corrected so the main content fills the available screen width instead of leaving an empty area on the right. This makes employee information easier to view and improves the usability of the HR screens.
Original PR description
Before this fix, at the right of the window nothing are displayed. Now the main window takes all the width. task : 3503980 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Features or functions removed from Odoo
An outdated core compatibility file was removed as part of ongoing cleanup. This reduces maintenance overhead without changing normal business workflows.
Code cleanup and technical improvements
This update simplifies how Odoo's internal legacy test files reference each other, replacing older aliases with direct file paths. It does not change product features, but helps keep the test code easier to maintain and less dependent on legacy configuration.
Original PR description
This commit removes the alias of the module in web/tests/legacy in favor of the file path like @web/../tests/legacy/test_env. `export default`s that were used in these modules are converted to simple `export` and their associated `import` are also adapted. task id: 3162300
Miscellaneous changes
Issue: ====== When we have 1 delivery method enabled that have pickup locations, it will be selected by default and the pickup locations will never be displayed. Steps to reproduce the issue: ============================= - Set up pickup locations carried for sendcloud (like mondial relay) - Go through the website with just that shipping method available and add a product to cart valid with the configuration of sendcloud. - Go to checkoutout you will get the shipping method selected but
Original PR description
Issue: ====== When we have 1 delivery method enabled that have pickup locations, it will be selected by default and the pickup locations will never be displayed. Steps to reproduce the issue: ============================= - Set up pickup locations carried for sendcloud (like mondial relay) - Go through the website with just that shipping method available and add a product to cart valid with the configuration of sendcloud. - Go to checkoutout you will get the shipping method selected but no pick up options Origin of the issue: ==================== If the delivery method is already selected it will skip showing pickup locations. Solutions: ========== Now there is another check to make sure that it will be skipped only when the pick up locations are displayed. opw-3569497 Forward-Port-Of: odoo/odoo#142958 Forward-Port-Of: odoo/odoo#142484
When users create a subtask from a task form, they can no longer manually choose its stage from the parent view. This prevents inconsistent task setup and ensures subtasks follow the parent task's workflow as intended.
Original PR description
When creating a sub-task from a task form view, it should not be possible to choose the stage of the subtask from the parent's view as It should heritate from it. taskid:3551354 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
The leave-course confirmation dialog now keeps its warning message neatly aligned beside the icon. This prevents confusing text overlap and provides a cleaner experience for customers managing paid course enrollments.
Original PR description
Change a float-left to a flex view so that the text doesn't flow under the warning icon. [task-id-3559210](https://www.odoo.com/web#menu_id=4720&cids=1&id=3559210&action=333&active_id=10888&model=project.task&view_type=form) Before:  After:  First time using bootstrap, please be gentle :see_no_evil:
This change updates the web interface code to use the current internal data context after an earlier model change. It helps keep related field behavior working reliably without changing the user-facing experience.
Original PR description
Since the new RelationalModel (PR: odoo/odoo#114024), getEvalContext no longer exists. In this commit, we will therefore replace the uses of getEvalContext with evalContext. 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
The timesheet grid timer header was adjusted to work with a newer internal web framework model. This keeps the feature compatible after an underlying platform change, with no expected change to day-to-day user behavior.
Original PR description
Since the new RelationalModel (PR: odoo/odoo#114024), getEvalContext no longer exists. In this commit, we will therefore replace the uses of getEvalContext with evalContext.
This change updates internal automated test files to use direct file paths instead of older shortcut names. It helps keep the codebase easier to maintain without changing how users experience the product.
Original PR description
This commit removes the alias of the module in web/tests/legacy in favor of the file path like @web/../tests/legacy/test_env. `export default`s that were used in these modules are converted to simple `export` and their associated `import` are also adapted. task id: 3162300
This traceback arises when the user tries to delete `Work Locations`. To reproduce this issue: 1) Install `hr_homeworking` 2) Open `Employees/Configuration/Work Locations` 3) Try to delete multiple records Error:- ``` ValueError: too many values to unpack (expected 3) 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/serv
Original PR description
This traceback arises when the user tries to delete `Work Locations`. To reproduce this issue: 1) Install `hr_homeworking` 2) Open `Employees/Configuration/Work Locations` 3) Try to delete multiple…
This traceback arises when the user tries to delete `Work Locations`.
To reproduce this issue:
1) Install `hr_homeworking`
2) Open `Employees/Configuration/Work Locations`
3) Try to delete multiple records
Error:-
```
ValueError: too many values to unpack (expected 3)
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 "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 "odoo/models.py", line 4160, in unlink
func(self)
File "addons/hr_homeworking/models/hr_work_location.py", line 17, in _unlink_except_used_by_employee
exceptions_using_location = self.env['hr.employee.location'].search(('work_location_id', 'in', self.ids))
File "odoo/models.py", line 1604, in search
return self.search_fetch(domain, [], offset=offset, limit=limit, order=order)
File "odoo/models.py", line 1627, in search_fetch
query = self._search(domain, offset=offset, limit=limit, order=order or self._order)
File "odoo/models.py", line 5366, in _search
query = self._where_calc(domain)
File "odoo/models.py", line 5081, in _where_calc
return expression.expression(domain, self).query
File "odoo/osv/expression.py", line 788, in __init__
self.expression = domain_combine_anies(domain, model)
File "odoo/osv/expression.py", line 597, in domain_combine_anies
domain_any = _anyfy_leaves(domain, model)
File "odoo/osv/expression.py", line 371, in _anyfy_leaves
left, operator, right = item = tuple(item)
```
An invalid domain format is used when searching for the record in `hr.employee.location`.
See:
https://github.com/odoo/odoo/blob/def16f3725f8005874a18eb28b171523af1a0ecf/addons/hr_homeworking/models/hr_work_location.py#L17
sentry-4644429734
Forward-Port-Of: odoo/odoo#142866Summary: Being able to add withholdings in a user-friendly way. The 1st Phase will be mostly manual, and for other iterations, we can add more complex computation for the AR market specifically. This is a legal requirement for many companies in AR that are withholding agents, where the company is meant to compute, create and share the Vendor WTHs (in this case the WTH is not electronic, but a PDF report with the details of the WTHs created need to be shared with the Vendor) Conclusion & S
Original PR description
Summary: Being able to add withholdings in a user-friendly way. The 1st Phase will be mostly manual, and for other iterations, we can add more complex computation for the AR market specifically. This…
Summary: Being able to add withholdings in a user-friendly way. The 1st Phase will be mostly manual, and for other iterations, we can add more complex computation for the AR market specifically. This is a legal requirement for many companies in AR that are withholding agents, where the company is meant to compute, create and share the Vendor WTHs (in this case the WTH is not electronic, but a PDF report with the details of the WTHs created need to be shared with the Vendor) Conclusion & Scope: - A first MVP will be released covering the basic use cases: - Manual allocation of Withholdings on the payment wizards For 1st iteration it will be all manual, both for sales and purchases, we will work on the automation on the 2nd iteration of this feature. This module adds - New taxes (withholding of IIBB and Earnings) - A new group of withholding taxes - Extends the payment register view to be able to add withholding taxes. - Extends the payment receipt document report to reflect the register withholding taxes --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140607
If you have a survey of several pages, but don't valid all, you don't have any survey_input_line for some question, so the [0] will crash. Since the method wait only one input_line maximum, instead to force to take the first one without take care if no reply, we just use the browser record that will work in both case. If it is empty it will enter in the 4th case, 'skipped' what is expected and was dead code before. -- Bug on the prod -- Forward-Port-Of: odoo/odoo#142500 Forward-Port-Of:
Original PR description
If you have a survey of several pages, but don't valid all, you don't have any survey_input_line for some question, so the [0] will crash. Since the method wait only one input_line maximum, instead to force to take the first one without take care if no reply, we just use the browser record that will work in both case. If it is empty it will enter in the 4th case, 'skipped' what is expected and was dead code before. -- Bug on the prod -- Forward-Port-Of: odoo/odoo#142500 Forward-Port-Of: odoo/odoo#142219
To reproduce ============ on POS (without having a connected print), make an order and print the receipt, the preview will show the receipt not well rendered Problem ======= we add the element that contains the receipt to the page, so we have two copies of the receipt (the page using CSS `@media print` and the added element) Solution ======== hide the original element on the page while printing, and bring it back after opw-3596341 --- I confirm I have signed the CLA and read
Original PR description
To reproduce ============ on POS (without having a connected print), make an order and print the receipt, the preview will show the receipt not well rendered Problem ======= we add the element that contains the receipt to the page, so we have two copies of the receipt (the page using CSS `@media print` and the added element) Solution ======== hide the original element on the page while printing, and bring it back after opw-3596341 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142699
Without it, like in no-demo testing conditions, tests with rights depending on Karma fail. Task-3575692 Forward-Port-Of: odoo/odoo#142785 Forward-Port-Of: odoo/odoo#140309
Original PR description
Without it, like in no-demo testing conditions, tests with rights depending on Karma fail. Task-3575692 Forward-Port-Of: odoo/odoo#142785 Forward-Port-Of: odoo/odoo#140309
Since https://github.com/odoo/odoo/commit/7dda6bb92715ea25b2818a62fec5e646f3678b81 _split_productions do not consume quantities anymore. For example, mass producing a serial finished product built from components moves the finished products but not the components. This restores the expected behavior. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142895
Original PR description
Since https://github.com/odoo/odoo/commit/7dda6bb92715ea25b2818a62fec5e646f3678b81 _split_productions do not consume quantities anymore. For example, mass producing a serial finished product built from components moves the finished products but not the components. This restores the expected behavior. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142895
This issue arises when attempting to edit the job location field for a remote job or when there is no value in the job location, try to edit and save record. Steps to produce : - Install `website_hr_recruitment` module. - Open a job position that has a remote job location or no value in the job location. - Open editor > Edit that field and save the record. - Error will be generated. see the traceback: ``` TypeError: int() argument must be a string, a bytes-like object or a real numbe
Original PR description
This issue arises when attempting to edit the job location field for a remote job or when there is no value in the job location, try to edit and save record. Steps to produce : - Install…
This issue arises when attempting to edit the job location field for a remote job or when there is no value in the job location, try to edit and save record.
Steps to produce :
- Install `website_hr_recruitment` module.
- Open a job position that has a remote job location or no value in the job location.
- Open editor > Edit that field and save the record.
- Error will be generated.
see the traceback:
```
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
File "odoo/http.py", line 2139, in __call__
response = request._serve_db()
File "odoo/http.py", line 1715, 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 1742, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1943, 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 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, 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 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/website/models/ir_ui_view.py", line 485, in save
super(View, self).save(value, xpath=xpath)
File "addons/web_editor/models/ir_ui_view.py", line 175, in save
self.save_embedded_field(arch_section)
File "addons/web_editor/models/ir_ui_view.py", line 46, in save_embedded_field
value = converter.from_html(Model, Model._fields[field], el)
File "addons/web_editor/models/ir_qweb_fields.py", line 230, in from_html
many2one_id = int(element.get('data-oe-many2one-id'))
```
This issue occurs because here
https://github.com/odoo/odoo/blob/5e0f5c98330ca1b5d0696c109c9e3a2050a6210c/addons/web_editor/models/ir_qweb.py#L215 it will get None and then when it will try to convert in int than error occurs.
after this commit user will not be able to edit the job location field.
sentry-4588277341
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#141825
Forward-Port-Of: odoo/odoo#140857Since commit 3d218e1, clicking outside a popover closes the popover and performs a preventDefault on the event. As a consequence, changes made in the property definition popover are no longer applied when the popover is closed by clicking outside. Problem: The preventDefault has the consequence of cancelling the input change event allowing the change to be applied to the property definition when the popover is closed. Solution: Remove the preventDefault by default and only use it in the
Original PR description
Since commit 3d218e1, clicking outside a popover closes the popover and performs a preventDefault on the event. As a consequence, changes made in the property definition popover are no longer applied…
Since commit 3d218e1, clicking outside
a popover closes the popover and performs a preventDefault on the event. As a consequence, changes made in the property definition popover are no longer applied when the popover is closed by clicking outside.
Problem:
The preventDefault has the consequence of cancelling the input change event allowing the change to be applied to the property definition when the popover is closed.
Solution:
Remove the preventDefault by default and only use it in the case of the calendar view, which is the only use case that wants to prevent the click event so as not to open a record creation dialog (see commit 3d218e1).
How to reproduce the PropertyField bug:
- Go to a form view with a properties field
- Click on the edit property button
- A popover opens so that you can edit the field definition
- Type a few characters in the label input
- Click outside the popover
Before this commit:
The value inserted in the popover is ignored
After this commit:
The value inserted in the popover is applied to the property.
It is not possible to write a test reproducing this native browser behaviour.
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
Forward-Port-Of: odoo/odoo#142842After this fix, UBL now uses the same helper as Factur-X for the import of the product. Also clean some dead code in UBL. task-3559040 Forward-Port-Of: odoo/odoo#142766 Forward-Port-Of: odoo/odoo#139153
Original PR description
After this fix, UBL now uses the same helper as Factur-X for the import of the product. Also clean some dead code in UBL. task-3559040 Forward-Port-Of: odoo/odoo#142766 Forward-Port-Of: odoo/odoo#139153
After this commit, detailed operations is no longer a tab in the picking but under a smart button on the form view TaskId: 3486636 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140898
Original PR description
After this commit, detailed operations is no longer a tab in the picking but under a smart button on the form view TaskId: 3486636 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140898
In COM PR linked, `show_operations` field is removed from the form view inherited here. COM PR: odoo/odoo#140898 Forward-Port-Of: odoo/enterprise#50805
Original PR description
In COM PR linked, `show_operations` field is removed from the form view inherited here. COM PR: odoo/odoo#140898 Forward-Port-Of: odoo/enterprise#50805
### Steps to reproduce * install `industry_fsm_report` and `industry_fsm_sale` * in the settings, switch to global rounding * create a product of type Service, and invoiced based on timesheets. * create and confirm a sales order with your product * create a field service task liked to your sales order * register some timesheet hours on that task * print the task report You should see that the total is 0. (One column is also missing a header. That column should actually not be displaye
Original PR description
### Steps to reproduce * install `industry_fsm_report` and `industry_fsm_sale` * in the settings, switch to global rounding * create a product of type Service, and invoiced based on timesheets. * create and confirm a sales order with your product * create a field service task liked to your sales order * register some timesheet hours on that task * print the task report You should see that the total is 0. (One column is also missing a header. That column should actually not be displayed) opw-3566787 Before:  After:  Forward-Port-Of: odoo/enterprise#51175 Forward-Port-Of: odoo/enterprise#51040
Prior to this commit, the override made on the method _setValue in the product screen was including a call to the parent method without the correct arguments leading to no behaviour when clicking on the numpad in the product screen when the pos_blackbox_be module was installed (e.g. when trying to do a discount). This commit fixes this error. Forward-Port-Of: odoo/enterprise#51111
Original PR description
Prior to this commit, the override made on the method _setValue in the product screen was including a call to the parent method without the correct arguments leading to no behaviour when clicking on the numpad in the product screen when the pos_blackbox_be module was installed (e.g. when trying to do a discount). This commit fixes this error. Forward-Port-Of: odoo/enterprise#51111
The balance moves were taking into account canceled entries in the query This make sure they are not included when fetching the account.move.line balances Forward-Port-Of: odoo/enterprise#51165
Original PR description
The balance moves were taking into account canceled entries in the query This make sure they are not included when fetching the account.move.line balances Forward-Port-Of: odoo/enterprise#51165
When you don't have the multi company group on the user that will create an offer, you get a traceback when you try to create a new offer. The issue is caused, because when it opens the form view of offer, it will compute the display name and for this computation it needs the currency_id which is a related to the company. As the company field is not present in the view when you don't have the multi-company group, the state sent by the onchange doesn't contains the company so it cannot get the
Original PR description
When you don't have the multi company group on the user that will create an offer, you get a traceback when you try to create a new offer. The issue is caused, because when it opens the form view of offer, it will compute the display name and for this computation it needs the currency_id which is a related to the company. As the company field is not present in the view when you don't have the multi-company group, the state sent by the onchange doesn't contains the company so it cannot get the currency for the display name. So we put this field in invisible for users that don't have the group to be able to compute the display_name. Forward-Port-Of: odoo/enterprise#51203 Forward-Port-Of: odoo/enterprise#51167
This fix reverts some changes of this commit : https://github.com/odoo/enterprise/commit/2711a3ad30bf306df35042d658c7b62a20fcb96f Issue: ====== The planned hours in project timesheet forecast is counting the holdiays as working days too , so the displayed hours are wrong. Steps to reproduce the issue: ============================= Activate timesheets and planning in project setting. Create a product with the following values: - Type : Service - Create on order : Project & task - Pla
Original PR description
This fix reverts some changes of this commit : https://github.com/odoo/enterprise/commit/2711a3ad30bf306df35042d658c7b62a20fcb96f Issue: ====== The planned hours in project timesheet forecast is…
This fix reverts some changes of this commit : https://github.com/odoo/enterprise/commit/2711a3ad30bf306df35042d658c7b62a20fcb96f Issue: ====== The planned hours in project timesheet forecast is counting the holdiays as working days too , so the displayed hours are wrong. Steps to reproduce the issue: ============================= Activate timesheets and planning in project setting. Create a product with the following values: - Type : Service - Create on order : Project & task - Plan Services : active and select anything work planner for example - Unit of Measure / Purchase UoM: Days Create a sale order with that product and choose 10 quantities and confirm it. Click on smart button (8O hours to plan) Click on new and select a resource and start and end date that have 80 alloctated time and save it. Go to project , click on the 3 dots on the project related to the sale order and select Timesheets and Planning analysis You will get more planned hours than expected , you can groupby day to see the planned hours for each day. Origin of the issue: ==================== When creating the table we didn't take into account the calendar of the employee , so it will always count all days from start to end. Solution: ========= I reverted some of the changed of the commit mentioned above which was responsible for this. opw-3482252 opw-3563938 Forward-Port-Of: odoo/enterprise#51120 Forward-Port-Of: odoo/enterprise#49901
Steps to reproduce: 1. Set up UPS with EasyPost shipping integration 2. Make a shipping with destination in Mexico 3. Attempt to validate the delivery Get an error message: `"EasyPost returned an error : A package in a Mexico shipment must have a Merchandise description"` Based on new Carta Porte regulation in Mexico, (See https://www.easypost.com/blog/2023-02-13-all-you-need-to-know-about-the-new-ups-carta-porte-regulation) EasyPost enforces some carriers to have `contents_explanaton`
Original PR description
Steps to reproduce: 1. Set up UPS with EasyPost shipping integration 2. Make a shipping with destination in Mexico 3. Attempt to validate the delivery Get an error message: `"EasyPost returned an error : A package in a Mexico shipment must have a Merchandise description"` Based on new Carta Porte regulation in Mexico, (See https://www.easypost.com/blog/2023-02-13-all-you-need-to-know-about-the-new-ups-carta-porte-regulation) EasyPost enforces some carriers to have `contents_explanaton` field. This field is a package-level description of the shipment. This commit uses a truncated list of product names to this field so that the labels can be generated. opw-3555670 Forward-Port-Of: odoo/enterprise#50856 Forward-Port-Of: odoo/enterprise#49546