Monday, August 16, 2021
31 changes · master
Enhancements to existing features
The event agenda page now uses a wider layout so schedules with many columns fit more comfortably. This makes it easier for visitors to view complex agendas without cramped content or excessive wrapping.
Original PR description
Agenda can have a lot of columns, it works much better in a fluid container. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website theme recommendations now better handle preview images, helping users see more accurate visuals when choosing a theme. This makes theme selection clearer and reduces confusion during website setup.
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
Odoo now includes each field's name directly inside its description, making field information easier to use without relying on a separate lookup key. This is a small internal improvement that helps developers and tools work with model metadata more conveniently.
Original PR description
The fields dict maps field names to their description. Before this commit, the field name wasn't specified in the description, meaning that we could never manipulate the field description without its key, which would often be convenient.
Resolved issues and error corrections
The partner tax identification field now keeps the standard "Tax ID" label instead of changing it to "VAT". This avoids confusing businesses in countries where tax identifiers are not referred to as VAT.
Original PR description
The default label of the `vat` field is "Tax ID". This code override this for no apparent reason with the label "VAT". It is incorrect to override "Tax ID" for "VAT" because many countries have a Tax ID that they don't call VAT. Keep the default.
Miscellaneous changes
The zoom feature of Image Widget expects a field `image_` being present in the view to check if a zoomable image is available or not. Since #69819 the image field was replaced by an avatar one thus breaking the zoom. TaskID: 2622671 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#75087
Original PR description
The zoom feature of Image Widget expects a field `image_` being present in the view to check if a zoomable image is available or not. Since #69819 the image field was replaced by an avatar one thus breaking the zoom. TaskID: 2622671 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#75087
Customer invoices processed by invoice extraction now place the detected invoice number as the invoice name instead of the customer reference. This improves invoice accuracy and avoids mislabeling important billing information.
Original PR description
…voice Previously, the invoice id was set as the customer reference. This was wrong as the invoice id detected is the vendor reference, so it should be set as the name of the customer invoice.
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#74975
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 Forward-Port-Of: odoo/odoo#74975
Steps to reproduce the bug: - Website in another language than English - Go to Courses (elarning) and share a title by email - The "Thank you" message is in English no matter what the language of the website is opw:2574385 Forward-Port-Of: odoo/odoo#74883 Forward-Port-Of: odoo/odoo#74761
Original PR description
Steps to reproduce the bug: - Website in another language than English - Go to Courses (elarning) and share a title by email - The "Thank you" message is in English no matter what the language of the website is opw:2574385 Forward-Port-Of: odoo/odoo#74883 Forward-Port-Of: odoo/odoo#74761
Description of the issue/feature this PR addresses: This PR will fix an error that occurs when the user clicks on a button from a list view that is not linked to an action. Current behavior before PR: When the user clicks on a button from a list view, the script will call the action linked to the corresponding button. For the buttons with `type="button"`, the event listener will raise an exception as these buttons are not linked to an action. Desired behavior after PR is merged: The scr
Original PR description
Description of the issue/feature this PR addresses: This PR will fix an error that occurs when the user clicks on a button from a list view that is not linked to an action. Current behavior before PR: When the user clicks on a button from a list view, the script will call the action linked to the corresponding button. For the buttons with `type="button"`, the event listener will raise an exception as these buttons are not linked to an action. Desired behavior after PR is merged: The script will no longer call the button action if the button has the 'button' type. task-2612033 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#75013 Forward-Port-Of: odoo/odoo#74348
Bug === 1. Login as "Portal" 2. Go to "/my/opportunity" 3. Create an opportunity 4. Edit this opportunity from the frontend and set the probability empty => Save, an error is raised Technical ========= The probability is set to "None" and not to "False", therefor the verification "probability >= 100" in the write method of the lead will raise an error. By using False instead of None, this verification will work. Task-2613208 Forward-Port-Of: odoo/odoo#75084 Forward-Port-Of: o
Original PR description
Bug === 1. Login as "Portal" 2. Go to "/my/opportunity" 3. Create an opportunity 4. Edit this opportunity from the frontend and set the probability empty => Save, an error is raised Technical ========= The probability is set to "None" and not to "False", therefor the verification "probability >= 100" in the write method of the lead will raise an error. By using False instead of None, this verification will work. Task-2613208 Forward-Port-Of: odoo/odoo#75084 Forward-Port-Of: odoo/odoo#74790
Fine tuning of 02d9b51e43904420afe31e1f65ea455e3ed2c8ea Steps: - Install l10n_fr_pos_cert - Open POS session with French company - Add product - Hit backspace: set new quantity to 0 - Hit backspace again Error will be shown. This occur because `event.detail.buffer` might be null 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
Original PR description
Fine tuning of 02d9b51e43904420afe31e1f65ea455e3ed2c8ea Steps: - Install l10n_fr_pos_cert - Open POS session with French company - Add product - Hit backspace: set new quantity to 0 - Hit backspace again Error will be shown. This occur because `event.detail.buffer` might be null 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#74711
Powerbox (and its related hint) should not be activable on any Odoo fields. Also, element hints should not be shown in some technical node. 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#74316
Original PR description
Powerbox (and its related hint) should not be activable on any Odoo fields. Also, element hints should not be shown in some technical node. 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#74316
Backport of 14.0 PR odoo/odoo#73082 changing name to_unlink_candidates -> to_unlink_candidate_ids. Backport of master PR odoo/odoo#62083 Improve `stock.picking._compute_state` by computing pickings new state conditions beforehand. This avoids looping through picking.move_lines for each condition for each picking. Add `picking.move_lines` to defaultdict beforehand to avoid calling `picking.move_lines` in for loop. #### Speedup Validating a 171 lines inventory in a customer DB with
Original PR description
Backport of 14.0 PR odoo/odoo#73082 changing name to_unlink_candidates -> to_unlink_candidate_ids. Backport of master PR odoo/odoo#62083 Improve `stock.picking._compute_state` by computing pickings…
Backport of 14.0 PR odoo/odoo#73082 changing name to_unlink_candidates -> to_unlink_candidate_ids. Backport of master PR odoo/odoo#62083 Improve `stock.picking._compute_state` by computing pickings new state conditions beforehand. This avoids looping through picking.move_lines for each condition for each picking. Add `picking.move_lines` to defaultdict beforehand to avoid calling `picking.move_lines` in for loop. #### Speedup Validating a 171 lines inventory in a customer DB with 2M stock_moves and 22k stock_pickings. min, max and avg time shown for each optimization. Total time taken by `inventory.action_validate()` | Before PR | Backport 14 only | Backport 14 + Backport master | Backport 14 + Backport master + _compute_state | |:----------:|:--------------:|:-------------------------------:|:-------------------------------------------------:| | +1h*| 17min | 13 min | 7min40s | Avg, Min, Max time taken by `move_line._free_reservation` | | Before PR | Backport 14 only | Backport 14 + Backport master | Backport 14 + Backport master + _compute_state | |:--:|:----------:|:--------------:|:-------------------------------:|:-------------------------------------------------:| | avg | 15s* | 5s | 4.71s | 2s | | min | 0.001s | 0.001s | 0.001s | 0.001s | | max | 11min* | 6min | 1min30s | 54s | _\* validating the inventory 'Before PR' was stopped after 1h while still running. Thus the reported total, avg and max time 'Before PR' is probably underestimated._ -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#74970 Forward-Port-Of: odoo/odoo#74808
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#75017
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#75017
It may be a recordset in case of partner duplicates. The variable bounced_partner is simple search by email: https://github.com/odoo/odoo/blob/72b5a17fc0e6f439d462647a7b55c9a26235a8df/addons/mail/models/mail_thread.py#L1349 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#75101 Forward-Port-O
Original PR description
It may be a recordset in case of partner duplicates. The variable bounced_partner is simple search by email: https://github.com/odoo/odoo/blob/72b5a17fc0e6f439d462647a7b55c9a26235a8df/addons/mail/models/mail_thread.py#L1349 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#75101 Forward-Port-Of: odoo/odoo#69445
`update_list` is an expensive operation and could be avoided when no modules are updated. Particually, it speeds up initial theme installation on website, which has following code: ``` themes.filtered(lambda m: m.state == 'installed').button_upgrade() ``` Benchmark for Odoo 15: `/website/configurator_apply` was spent 36% for unneeded `update_list` call. Forward-Port-Of: odoo/odoo#74935
Original PR description
`update_list` is an expensive operation and could be avoided when no modules are
updated. Particually, it speeds up initial theme installation on website, which
has following code:
```
themes.filtered(lambda m: m.state == 'installed').button_upgrade()
```
Benchmark for Odoo 15: `/website/configurator_apply` was spent 36% for unneeded
`update_list` call.
Forward-Port-Of: odoo/odoo#74935The commit fixes a small UI glitch in the website.visitors kanban view when website_livechat is installed. Since 5a0a1e76b372d80adc1bad6ad29a20bedf764100 The img element requires to be wrapped inside another element with the "o_m2o_avatar" class to receive the appropriate css styling (small round icon). We simply add this wrapper element around the img to fix the layout. Task-2612936 Description of the issue/feature this PR addresses: Current behavior before PR: Desired beha
Original PR description
The commit fixes a small UI glitch in the website.visitors kanban view when website_livechat is installed. Since 5a0a1e76b372d80adc1bad6ad29a20bedf764100 The img element requires to be wrapped inside another element with the "o_m2o_avatar" class to receive the appropriate css styling (small round icon). We simply add this wrapper element around the img to fix the layout. Task-2612936 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#74633
Description of the issue/feature this PR addresses: When the user creates a new marketing compaign, the action helper of the notebook (page "Mail Body") can be placed off the parent container. Current behavior before PR: The action helper is placed relatively to the form sheet container. Desired behavior after PR is merged: The action helper is placed relatively to the notebook page content. task-2614456 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/
Original PR description
Description of the issue/feature this PR addresses: When the user creates a new marketing compaign, the action helper of the notebook (page "Mail Body") can be placed off the parent container. Current behavior before PR: The action helper is placed relatively to the form sheet container. Desired behavior after PR is merged: The action helper is placed relatively to the notebook page content. task-2614456 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#74765
All accross Odoo, when a document is assigned to a salesperson, that person is notified via email. However, the `account.move` model is inconsistent with that behavior, because the salesperson field name is `invoice_user_id` instead of just `user_id`. With this fix: - When creating an invoice from a sales order, the salesperson will get the assignment notification. - When modifying the salesperson in the invoice form, the new salesperson will get the assignment notification. - In both
Original PR description
All accross Odoo, when a document is assigned to a salesperson, that person is notified via email. However, the `account.move` model is inconsistent with that behavior, because the salesperson field name is `invoice_user_id` instead of just `user_id`. With this fix: - When creating an invoice from a sales order, the salesperson will get the assignment notification. - When modifying the salesperson in the invoice form, the new salesperson will get the assignment notification. - In both cases, the salesperson will get subscribed to the invoice. This restores the behavior that `account.invoice` had in v12. For master, a better fix should be considered (a.k.a. simply removing the `invoice_user_id` field and using only `user_id` to avoid these kind of inconsistencies). @Tecnativa TT29909 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#74074 Forward-Port-Of: odoo/odoo#71328
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#74978
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 Forward-Port-Of: odoo/odoo#74978
_Port-forwarding of #74507_ When combining a reordering rule, the 3-steps manufacture and by-products option, the picking from the post-production to the stock will not contain the residual products produced by the MO (by-products) To reproduce the error: 1. In Settings, enable: - By-Products - Multi-Step Routes 2. Inventory > Configuration > Warehouse Management > Warehouses, edit company's warehouse: - Manufacture: 3 steps 3. Create 3 products P_compo, P_finished, P_
Original PR description
_Port-forwarding of #74507_ When combining a reordering rule, the 3-steps manufacture and by-products option, the picking from the post-production to the stock will not contain the residual products…
_Port-forwarding of #74507_
When combining a reordering rule, the 3-steps manufacture and
by-products option, the picking from the post-production to the stock
will not contain the residual products produced by the MO (by-products)
To reproduce the error:
1. In Settings, enable:
- By-Products
- Multi-Step Routes
2. Inventory > Configuration > Warehouse Management > Warehouses, edit
company's warehouse:
- Manufacture: 3 steps
3. Create 3 products P_compo, P_finished, P_secondary
- P_compo is consumable
- P_finished and P_secondary are storable
- Routes of P_finished: Manufacture
4. Create a reordering rule for P_finished:
- Min = Max = 1
5. Create a BoM:
- Product: P_finished
- Type: Manufacture
- Components: 1 x P_compo
- By-products: 1 x P_secondary
6. Inventory > Operations > Run Scheduler
7. Open the generated MO
8. Check Availability, Produce, Mark as Done
- Note that in the "Produce" wizard, we mention that one P_secondary
is also produced
- Also note that in "Finished Products" tab, there are 1 x
P_finished and 1 x P_secondary
9. Open the Transfers
Error: The picking Post-Production -> Stock does not exist
When creating the byproducts move
https://github.com/odoo/odoo/blob/ad62f877c174d56b90ec516cf24494d751383db9/addons/mrp/models/mrp_production.py#L587
the field `move_dest_ids` is present (is the move created after
evaluating the RR)
https://github.com/odoo/odoo/blob/ad62f877c174d56b90ec516cf24494d751383db9/addons/mrp/models/mrp_production.py#L580
so it is used, but this will cause the `_push_apply` to skip the
evaluation of the move
https://github.com/odoo/odoo/blob/f0eaa756c4947e2a595359959b34b14bfda81a07/addons/stock/models/stock_move.py#L678-L679
and `_assign_picking` will not run, as it normally do when creating the
manufacture
Thanks to this change, the picking Post-Production -> Stock will exist
and contain the residual products
OPW-2581762
Forward-Port-Of: odoo/odoo#74851Report by @ploegvde Forward-Port-Of: odoo/odoo#75118 Forward-Port-Of: odoo/odoo#69321
Original PR description
Report by @ploegvde Forward-Port-Of: odoo/odoo#75118 Forward-Port-Of: odoo/odoo#69321
When a color combination was used as "color" (base case) for the menu, the menu background in the boxed template, the footer or the copyright section, it was not properly marked as selected in the color palette widget of the editor panel. Related to task-2599770 Forward-Port-Of: odoo/odoo#75132
Original PR description
When a color combination was used as "color" (base case) for the menu, the menu background in the boxed template, the footer or the copyright section, it was not properly marked as selected in the color palette widget of the editor panel. Related to task-2599770 Forward-Port-Of: odoo/odoo#75132
Whenever using the `getPowerboxElement`, it is possible to have a null node. 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#75153
Original PR description
Whenever using the `getPowerboxElement`, it is possible to have a null node. 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#75153
Forward-Port-Of: odoo/enterprise#20175 Forward-Port-Of: odoo/enterprise#20104
Original PR description
Forward-Port-Of: odoo/enterprise#20175 Forward-Port-Of: odoo/enterprise#20104
Oversight of e17897ea88dea7d483007b79fdaa2ce0da3c8128 This commit fixes an attribute on a label tag that was wrongly defined as a t-att while its value is one of an t-attf. Task-2621272 Forward-Port-Of: odoo/enterprise#20149
Original PR description
Oversight of e17897ea88dea7d483007b79fdaa2ce0da3c8128 This commit fixes an attribute on a label tag that was wrongly defined as a t-att while its value is one of an t-attf. Task-2621272 Forward-Port-Of: odoo/enterprise#20149
Enterprise part of odoo/odoo#69321 Forward-Port-Of: odoo/enterprise#20234 Forward-Port-Of: odoo/enterprise#17721
Original PR description
Enterprise part of odoo/odoo#69321 Forward-Port-Of: odoo/enterprise#20234 Forward-Port-Of: odoo/enterprise#17721
- Create an bill for a new partner at the date 07/13/2021 - Register a payment for this invoice at the date 08/02/2021 then unreconcile this payment - Go to the Aged Payable report and filter the date to 07/13/2021 and unfold your user => show 1 line - Change the filter to 08/03/2021 => show 2 lines but not the partner section opw-2613120 Forward-Port-Of: odoo/enterprise#20141
Original PR description
- Create an bill for a new partner at the date 07/13/2021 - Register a payment for this invoice at the date 08/02/2021 then unreconcile this payment - Go to the Aged Payable report and filter the date to 07/13/2021 and unfold your user => show 1 line - Change the filter to 08/03/2021 => show 2 lines but not the partner section opw-2613120 Forward-Port-Of: odoo/enterprise#20141
Bug === If a "Social User" open the dashboard view and try to refresh the statistics of a LinkedIn account, an error is raised. To be: the "Social Poster" should be able to refresh the statistics of the LinkedIn accounts / posts even if he do not have the write ACL. Task-2614038 Forward-Port-Of: odoo/enterprise#20115
Original PR description
Bug === If a "Social User" open the dashboard view and try to refresh the statistics of a LinkedIn account, an error is raised. To be: the "Social Poster" should be able to refresh the statistics of the LinkedIn accounts / posts even if he do not have the write ACL. Task-2614038 Forward-Port-Of: odoo/enterprise#20115
no need to iterate over all products to set empty values --- opw-2583903 Forward-Port-Of: odoo/enterprise#19949
Original PR description
no need to iterate over all products to set empty values --- opw-2583903 Forward-Port-Of: odoo/enterprise#19949
Create an invoice, confirm and register the payment Create a bank statement for the invoice. Reconcile No button 'Close statement' will be shown opw-2548026 Forward-Port-Of: odoo/enterprise#20076
Original PR description
Create an invoice, confirm and register the payment Create a bank statement for the invoice. Reconcile No button 'Close statement' will be shown opw-2548026 Forward-Port-Of: odoo/enterprise#20076