Thursday, November 16, 2023
18 changes · 17.0
Enhancements to existing features
This update changes the icons used for pivot and list menu items in the spreadsheet editor to match Odoo's standard icons. The change also consolidates duplicate pivot and list insert menu items, improving the user interface consistency and reducing menu clutter.
Original PR description
This commit changes the icons of the pivot/list menu items to match the standard pivot/list icons of Odoo. Task: [3559271](https://www.odoo.com/web#id=3559271&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
Resolved issues and error corrections
The test tooling was corrected so server-side form tests save records in the same way as the Odoo web client. This helps prevent tests from passing in situations where real users might experience different behavior, improving confidence in future changes.
Documentation and clarification updates
This pull request adds or duplicates contributor license agreement records for an individual contributor. It supports legal compliance by ensuring the contributor's agreement documentation is present in the repository.
Original PR description
doc/cla/individual/pallavisrivastavaa.md and doc/cla/individual/PallaviSrivastavaa.md --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
## Description Since 81fe11fabb60de56241ea912a65f41a2d9f8538f, the field `expense_sheet_id` was converted from a One2many to a Many2one, making it a stored field. Since then opening the form view of an expense report can be quite slow (around +-1.6s) in a database with a lot of `account.move`, as the whole table needs to be scanned to match the `id` of the `expense_sheet_id`. We add a partial not null index on the field (since not a lot of `account.move` are linked to an expense) and it speed
Original PR description
## Description Since 81fe11fabb60de56241ea912a65f41a2d9f8538f, the field `expense_sheet_id` was converted from a One2many to a Many2one, making it a stored field. Since then opening the form view of an expense report can be quite slow (around +-1.6s) in a database with a lot of `account.move`, as the whole table needs to be scanned to match the `id` of the `expense_sheet_id`. We add a partial not null index on the field (since not a lot of `account.move` are linked to an expense) and it speeds up the read to 60ms. ## Reference task-3572440 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140057
Spanish point-of-sale orders under the legal invoicing threshold can now be validated without an invoice when the invoice option is turned off. This prevents an unnecessary customer selection popup and keeps checkout aligned with the cashier's choice.
Original PR description
Steps to reproduce: 1. Open a pos configured with a spanish localization; 2. Make an order that is less then 400 euros; 3. Click on invoice; 4. Click on invoice again such that it is toggled off. 5. Observe that validating the order brings the popup to select a partner The issue is that toggling the invoice off doesn't actually work correctly. Task: 3597292 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now insert an Odoo chart from a different app into a spreadsheet that already has a filtered list or pivot without triggering an error. The fix ensures the spreadsheet only checks charts that already exist, improving reliability when combining data from multiple apps.
Original PR description
Steps to reproduce: - Insert a list/pivot in a blank spreadsheet from a module (say Sales). - Apply a global filter on it. - Insert an odoo chart in the same sheet but from a different module (eg. CRM) The issue is that when there are no charts in the sheet, the existing code of `getOdooChartIds` retrieves the incorrect chart ids (`getChartIds` getter returns all chart ids, including the id of chart being inserted). This leads to a traceback as the code tries to fetch fieldMatchings for a non-existent chart within the sheet. This PR resolves the issue by modifying the `getOdooChartIds` method to now utilize `this.charts` instead of `getChartIds` getter, which correctly provides the ids of charts already present in the sheet. Task ID: 3573402 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Project app now prevents users from choosing parent tasks from projects where subtasks are not allowed. This keeps task organization aligned with each project's settings and avoids inconsistent subtask creation.
Original PR description
Steps: - project > configuration > settings > Enable Allow sub-tasks. - try to add subtasks by searching project name it will show tasks of projects whose subtask is false. Issue: - able to select a task from projects whose allow sub-tasks feature is disable. Cause: - There no domain to restrict user from selecting non allow sub tasks feature. Fix: - Add domain to restrict user from selecting non allow sub tasks feature. task-3178619 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 creating a new helpdesk ticket, the breadcrumb navigation was incorrectly displaying "False(#False)" instead of "New". This fix corrects the breadcrumb display by properly returning the parent method, ensuring users see the correct navigation label when creating new tickets.
Original PR description
Steps: - Install helpdesk - Open helpdesk - Go to my tickets - Create new ticket Issue: - when create new ticket breadcrumb shows "False(#False)" instead of "New". Cause: - Not returning the super method. Fix: - Create new field filtered with name running loop on that field and returning the super method. task-3478920
A bug in the Knowledge editor's /article command has been fixed. Previously, when users opened the article selection menu, both articles and templates were displayed together. This update ensures that only articles appear in the selection menu, with templates properly filtered out, providing a cleaner and more intuitive user experience.
Original PR description
When merging the models `knowledge.article` and `knowledge.article.template`, we unintentionally forgot to add a condition in the search domain of the select menu to filter out the templates from the search results. As a result, the select menu currently lists both articles and templates. This commit will simply add the missing condition in the search domain to exclude the templates from the search results. Steps to reproduce the issue: 1. Open the Knowledge editor 2. Type the /article command 3. Click on the selection menu => The select menu lists the articles and the templates. TO BE: The selection menu should only display the articles and not the templates Reference: https://github.com/odoo/enterprise/pull/48691 task-3593373
Steps to reproduce ================== - Go to invoices - Open studio > report > Invoices - Add a text block - On the sidebar, click on the pencil next to "Visible If" - Add a filter - Set the condition to "doc.partner.name contains 'a'" ``` Error when compiling xml template SyntaxError: invalid syntax. Perhaps you forgot a comma? (<>, line 1) ``` Cause of the issue ================== The edit is the following ``` <span t-if='o.partner_id.name ilike "a"' data-oe-id="742"
Original PR description
Steps to reproduce ================== - Go to invoices - Open studio > report > Invoices - Add a text block - On the sidebar, click on the pencil next to "Visible If" - Add a filter - Set the condition to "doc.partner.name contains 'a'" ``` Error when compiling xml template SyntaxError: invalid syntax. Perhaps you forgot a comma? (<>, line 1) ``` Cause of the issue ================== The edit is the following ``` <span t-if='o.partner_id.name ilike "a"' data-oe-id="742" data-oe-xpath="/t/t/div[2]/div/div[3]/div/span" /> ``` The t-if isn't a valid python expression. THe ilike operator shouldn't be available in this case. cf: https://github.com/odoo/enterprise/commit/26ac3f2199cdb1ad34ba9afe3cd2b63241cc9638 opw-3560346 Forward-Port-Of: odoo/odoo#141018
Current behavior: When you sell a kit made of kit, the COGS are not registered correctly in the invoice. Steps to reproduce: - Create Kit A with product A - Create Kit B with product B - Create Kit Final with kit A and kit B - Make sure the Category of the products is in FIFO automated - Open PoS, and sell Kit Final and invoice it. - Go in the backend, and check the invoice lines of the order. - The COGS of the products are not registered correctly. Note: This was happening becaus
Original PR description
Current behavior: When you sell a kit made of kit, the COGS are not registered correctly in the invoice. Steps to reproduce: - Create Kit A with product A - Create Kit B with product B - Create Kit Final with kit A and kit B - Make sure the Category of the products is in FIFO automated - Open PoS, and sell Kit Final and invoice it. - Go in the backend, and check the invoice lines of the order. - The COGS of the products are not registered correctly. Note: This was happening because the price unit of the kit was not calculated correctly. Because when the product was a kit made of kit, the bom was not exploded to consider all the components of the kit. opw-3548604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#142101 Forward-Port-Of: odoo/odoo#141512
## Description Portal routes `/my/tickets` or `/my/tasks` were reported slow to load with many items. ## Analysis The avatars that are loaded are of too large sizes (encoded in base64) compared to their rendering size. `img.o_avatar` limits the dimensions to `1.7145em` (roughly `27px` on desktop), so it's useless to load `avatar_1024` for those image sources. This has a significant impact when the user has a slow connection, the server is hosted far away from the user, or the images used ar
Original PR description
## Description Portal routes `/my/tickets` or `/my/tasks` were reported slow to load with many items. ## Analysis The avatars that are loaded are of too large sizes (encoded in base64) compared to their rendering size. `img.o_avatar` limits the dimensions to `1.7145em` (roughly `27px` on desktop), so it's useless to load `avatar_1024` for those image sources. This has a significant impact when the user has a slow connection, the server is hosted far away from the user, or the images used are of badly compressed (so each images takes a quite a few MiB). ## Fix Scan for all instances of the usage of `avatar_1024` on an `<img>` with the class `o_avatar` and reduce it to `avatar_128`. ## Reference opw-3470171 ## Linked PR https://github.com/odoo/enterprise/pull/50557 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141877
Prices on pricelist rules were rounded to the currency decimal precision instead of the field decimal precision, meaning that even if a customer changed the "Product prices" decimal precision, he wasn't able to specify detailed prices through pricelist rules. Forward-Port-Of: odoo/odoo#141680
Original PR description
Prices on pricelist rules were rounded to the currency decimal precision instead of the field decimal precision, meaning that even if a customer changed the "Product prices" decimal precision, he wasn't able to specify detailed prices through pricelist rules. Forward-Port-Of: odoo/odoo#141680
In a recent fix (de77cef), the Kenyan EDI was adapted to exclude VAT numbers for non-Kenyan partners. The field was also adapted to be stripped before being serialised (due to a particular bug originating from a space in front of the VAT). Stripping this field results in a traceback when the field is empty, since the type is not adapted from a bool to an empty string first. This commit corrects this by using an empty string if the partner vat is False. It also adapts the check to specifica
Original PR description
In a recent fix (de77cef), the Kenyan EDI was adapted to exclude VAT numbers for non-Kenyan partners. The field was also adapted to be stripped before being serialised (due to a particular bug originating from a space in front of the VAT). Stripping this field results in a traceback when the field is empty, since the type is not adapted from a bool to an empty string first. This commit corrects this by using an empty string if the partner vat is False. It also adapts the check to specifically use the country of the commercial partner id instead of that of the partner. task-id:None Forward-Port-Of: odoo/odoo#142224
For Confirmed MOs, the date that should be used is the `date_start`, not the `date_deadline`: - Confirmed MOs have StockMoves with `move.date == mo.date_start` - When computing the qty_to_order, the move.date will be used - When finding existing MO to add quantity If `mo.date_deadline != mo.date_start` Then we can end up in a situation where a Confirm MO is too late to take its quantity into account, but not too late to add the qty_to_order to it. Then e
Original PR description
For Confirmed MOs, the date that should be used is the `date_start`, not the `date_deadline`: - Confirmed MOs have StockMoves with `move.date == mo.date_start` - When computing the qty_to_order, the…
For Confirmed MOs, the date that should be used is the `date_start`, not the `date_deadline`:
- Confirmed MOs have StockMoves with `move.date == mo.date_start`
- When computing the qty_to_order, the move.date will be used
- When finding existing MO to add quantity
If `mo.date_deadline != mo.date_start`
Then we can end up in a situation where a Confirm MO is too late to take its quantity into account, but not too late to add the qty_to_order to it.
Then everytime you run the scheduler, this MO will be too late, so new quantity must be ordered, and the quantity will be added on this MO which is too late.
## TO REPRODUCE ##
https://watch.screencastify.com/v/R7cv6XGPugSN3FBx7is4
- Create product P_M
- Create BoM
- Create Reordering Rule: trigger: auto | min: 10 | max: 20 | route: manufacture
- Create & Confirm SO for 10 unit of P_M => new confirmed MO for P_M should have been created
- Update MO scheduled date to 2 days in the future
- Run Scheduler => New quantity added, you can run the scheduler as many times as you want, new quantity will always be added
OPW-3524854
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#138506This traceback arises when the user removes `Start Date` and changes `End Date`, while printing `Sale Details`. To reproduce this issue: 1) Install `point_of_sale` 2) Open `reporting/Sale Deatils` 3) Remove `Start Date` and change the date of `End Date` Error:- ``` TypeError: '<' not supported between instances of 'datetime.datetime' and 'bool' File "odoo/http.py", line 2138, in __call__ response = request._serve_db() File "odoo/http.py", line 1714, in _serve_db
Original PR description
This traceback arises when the user removes `Start Date` and changes `End Date`, while printing `Sale Details`. To reproduce this issue: 1) Install `point_of_sale` 2) Open `reporting/Sale Deatils` 3)…
This traceback arises when the user removes `Start Date` and changes
`End Date`, while printing `Sale Details`.
To reproduce this issue:
1) Install `point_of_sale`
2) Open `reporting/Sale Deatils`
3) Remove `Start Date` and change the date of `End Date`
Error:-
```
TypeError: '<' not supported between instances of 'datetime.datetime' and 'bool'
File "odoo/http.py", line 2138, in __call__
response = request._serve_db()
File "odoo/http.py", line 1714, 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 1741, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1942, in dispatch
result = self.request.registry['ir.http']._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 "odoo/models.py", line 6774, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "odoo/models.py", line 6491, in _onchange_eval
res = method(self)
File "addons/point_of_sale/wizard/pos_details.py", line 42, in _onchange_end_date
if self.end_date and self.end_date < self.start_date:
```
On the `_onchange_end_date` method, when the user removes `start_date`
the value will be `False`.
It leads to the above traceback as `<` is used between `start_date` and `end_date`.
See:-
https://github.com/odoo/odoo/blob/5e3c4dd330184353a585b343741505cc223b1183/addons/point_of_sale/wizard/pos_details.py#L40-L43
Applying this commit will resolve the issue.
sentry-4521731693
Forward-Port-Of: odoo/odoo#137508CLA signature update for factorlibre Forward-Port-Of: odoo/odoo#141536
Original PR description
CLA signature update for factorlibre Forward-Port-Of: odoo/odoo#141536
Before this commit, when iterating over microsoft's recurrences occurrences, the 'stop' attribute was being accessed instead of the 'end' attribute. After this commit, this typo is fixed by changing the access from 'stop' attribute to the 'end' attribute. Issue from: 3525764 Forward-Port-Of: odoo/odoo#142053
Original PR description
Before this commit, when iterating over microsoft's recurrences occurrences, the 'stop' attribute was being accessed instead of the 'end' attribute. After this commit, this typo is fixed by changing the access from 'stop' attribute to the 'end' attribute. Issue from: 3525764 Forward-Port-Of: odoo/odoo#142053