Thursday, December 9, 2021
31 changes · master
Enhancements to existing features
Customer ratings submitted by clicking a rating link are now followed up even if the customer closes the feedback page before sending the form. This helps ensure related tasks show the correct activity history and status, giving teams a more accurate view of customer feedback.
Original PR description
Previously, when a customer submitted a rating by clicking on a link, but closed the page without sending the feedack form, the rating would be created, but wouldn't be logged in the chatter of the related task, and the kanban state of the task wouldn't change. This PR introduces a new hourly cron job, whose role is to identify such ratings, and log them in the chatter and change the kanban state of the task. Task-2207626
This update cleans up inaccurate or broken internal developer documentation in Odoo core and the Base module, and adds automated checks to prevent similar issues from being introduced later. It helps maintain code quality and reduces confusion for teams working on the platform, with no expected direct impact on end users.
Original PR description
Lots of docstrings are wrong in the details with invalid rST, documenting parameters which don't exist (anymore), *not* documenting parameters which do, fucking up info fields, specifying types incorrectly, ... This PR is a stab at fixing some of those issues and trying to make things last a bit, by enabling a checker to try and prevent broken docstrings from being committed. Note that the checker is currently configured to only check the core (odoo and the `base` module): this is already a fair amount of changes, so to avoid Extreme Conflicts I think it'd be a good idea to get that merged, then start expanding the scope of the checker.
Point of Sale now starts with more practical default settings for shops, including real-time inventory updates, tax-included pricing, and the product configurator. This reduces setup effort and helps businesses use key sales features immediately.
Original PR description
We provide a better experience when more settings are activated by default. For this reason, we activated by default the following settings: 1. POS Settings - Inventory Management is set to "In real time" 2. POS Shop Settings - Product Prices is set to "Tax-Included Price" - Product Configurator is activated task-2616749 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
This change simplifies an internal testing helper used by Odoo's web module by removing an option that was no longer needed. It makes the test code easier to maintain without changing how users experience the product.
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
A wrong field is used to control propagation of questions from event template to child events. Currently an event template must use automated emails to propagate its questions, instead of correctly checking the question enabled field ``use_questions``. As most templates use automated email this was not seen before. Task-2703285 (event performance) Task-2703289 (event testing) Forward-Port-Of: odoo/odoo#81060 Forward-Port-Of: odoo/odoo#81044
Original PR description
A wrong field is used to control propagation of questions from event template to child events. Currently an event template must use automated emails to propagate its questions, instead of correctly checking the question enabled field ``use_questions``. As most templates use automated email this was not seen before. Task-2703285 (event performance) Task-2703289 (event testing) Forward-Port-Of: odoo/odoo#81060 Forward-Port-Of: odoo/odoo#81044
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#81062
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#81062
There was an issue when saving the LinkDialog with invalid data. The _DialogLinkWidget.save methods return values were not consistent. Also, tests are added for the menu and mega menu edition. task-2513588 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71168
Original PR description
There was an issue when saving the LinkDialog with invalid data. The _DialogLinkWidget.save methods return values were not consistent. Also, tests are added for the menu and mega menu edition. task-2513588 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71168
## Aim of this commit: - Prevent user to create credit note for 0 value based invoice. - Hide the disabled radio button on reversal wizard. ## before this commit: - The button add a credit note is present on invoice and bill even when the amount_total is 0. - The radio buttons in the reversal wizard are visible even when it's disabled. ## after this commit: - The button add a credit note is hidden when the amount_total is 0. - Radio buttons are hidden when it can't be used. task
Original PR description
## Aim of this commit: - Prevent user to create credit note for 0 value based invoice. - Hide the disabled radio button on reversal wizard. ## before this commit: - The button add a credit note is present on invoice and bill even when the amount_total is 0. - The radio buttons in the reversal wizard are visible even when it's disabled. ## after this commit: - The button add a credit note is hidden when the amount_total is 0. - Radio buttons are hidden when it can't be used. task/ticket:#2603144 Forward-Port-Of: odoo/odoo#79527
Current behavior : When you add a promotion campagn to a PoS the promotion is applied on every line of every order everytime you load the order. This cause situations where you have multiple discount for a single product. Steps to reproduce: - create a standrard promotion program (automatically applied, 10%) - set that promotion on the PoS (bar) - open a session, chooses a table and make an order --> promotion correctly applied - get out of the table and go back to the same table --> 2
Original PR description
Current behavior : When you add a promotion campagn to a PoS the promotion is applied on every line of every order everytime you load the order. This cause situations where you have multiple discount for a single product. Steps to reproduce: - create a standrard promotion program (automatically applied, 10%) - set that promotion on the PoS (bar) - open a session, chooses a table and make an order --> promotion correctly applied - get out of the table and go back to the same table --> 2 additional lines are created because of the promotion opw-2699544 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80925
- Use a company located in France - Install point_of_sale and l10n_fr_pos_cert - Open a POS session - Make some orders - Quit session without closing it (Keep session open) - Come back more than 24 hours later - Try to open the session (Continue selling) An UserError is triggered with the following message: "This session has been opened another day. To comply with the French law, you should close sessions on a daily basis. Please close session POS/00007 and open a new one." However,
Original PR description
- Use a company located in France - Install point_of_sale and l10n_fr_pos_cert - Open a POS session - Make some orders - Quit session without closing it (Keep session open) - Come back more than 24…
- Use a company located in France - Install point_of_sale and l10n_fr_pos_cert - Open a POS session - Make some orders - Quit session without closing it (Keep session open) - Come back more than 24 hours later - Try to open the session (Continue selling) An UserError is triggered with the following message: "This session has been opened another day. To comply with the French law, you should close sessions on a daily basis. Please close session POS/00007 and open a new one." However, it is not possible to close the session as the closing control is managed in the fontend inside the session. Therefore the POS is stuck as we cannot close the last session, neither open a new one. This fix allows an user with the rights to close a session to connect to the stuck session to close it. He will only have access to the closing control popup, without the possibility to continue selling. opw-2696823 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80680
A designer may not have access to ir.model.fields, use the fields_get helper instead Fixes odoo/odoo#80948 Forward-Port-Of: odoo/odoo#80991
Original PR description
A designer may not have access to ir.model.fields, use the fields_get helper instead Fixes odoo/odoo#80948 Forward-Port-Of: odoo/odoo#80991
Oversight of https://github.com/odoo/odoo/pull/81017 Forward-Port-Of: odoo/odoo#81109
Original PR description
Oversight of https://github.com/odoo/odoo/pull/81017 Forward-Port-Of: odoo/odoo#81109
Whenever there was a tag inside a link (e.g.`<a href="..."><b>link</b></a>`), it was impossible to unlink. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80890
Original PR description
Whenever there was a tag inside a link (e.g.`<a href="..."><b>link</b></a>`), it was impossible to unlink. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80890
It is possible that the wysiwyg focus method is called before the odooEditor being loaded. This commit insure that the odooEditor properly being loaded. Task-2704538 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80910
Original PR description
It is possible that the wysiwyg focus method is called before the odooEditor being loaded. This commit insure that the odooEditor properly being loaded. Task-2704538 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80910
Due to floating point representation, some floats may have some insignificant decimals. Therefore, `float_compare` should be used when comparing such numbers OPW-2699576 Forward-Port-Of: odoo/odoo#80983
Original PR description
Due to floating point representation, some floats may have some insignificant decimals. Therefore, `float_compare` should be used when comparing such numbers OPW-2699576 Forward-Port-Of: odoo/odoo#80983
In a undeterministic circumstance, the editor element is not in the page at the moment of checking it. There is probably some promises somewhere that remains unresolved and prevent the element to be inserted in time. Task-2682104 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81095
Original PR description
In a undeterministic circumstance, the editor element is not in the page at the moment of checking it. There is probably some promises somewhere that remains unresolved and prevent the element to be inserted in time. Task-2682104 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81095
An employee could not confirm an allocation request of a type that doesn't need validation Steps to reproduce: 1. Connect as admin 2. Install and open the Time Off app 3. Create a time off type in Configuration->Time Off Types with - Requires allocation: Yes - Approval: No validation needed 4. Connect as demo 5. Open the Time Off app and create an allocation request of the type created just before and try to save Solution: Add a condition before raising the error that checks the
Original PR description
An employee could not confirm an allocation request of a type that doesn't need validation Steps to reproduce: 1. Connect as admin 2. Install and open the Time Off app 3. Create a time off type in Configuration->Time Off Types with - Requires allocation: Yes - Approval: No validation needed 4. Connect as demo 5. Open the Time Off app and create an allocation request of the type created just before and try to save Solution: Add a condition before raising the error that checks the allocation validation type OPW-2683477 Forward-Port-Of: odoo/odoo#81101 Forward-Port-Of: odoo/odoo#80926
Current behavior: When changing unit price in the SO of a product tracked by SN the price reset to the normal price when entering the SN in the PoS. Expected behavior: The modified price from the SO shouldn't be modified in the PoS when entering the SN Steps to reproduce: Create a SO with a product tracked by SN and change the price of the product in the SO Go to the PoS app and add this SO Click on the product to add the SN The price change opw-2687001 -- I confirm I have s
Original PR description
Current behavior: When changing unit price in the SO of a product tracked by SN the price reset to the normal price when entering the SN in the PoS. Expected behavior: The modified price from the SO shouldn't be modified in the PoS when entering the SN Steps to reproduce: Create a SO with a product tracked by SN and change the price of the product in the SO Go to the PoS app and add this SO Click on the product to add the SN The price change opw-2687001 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80631
How to reproduce: 1: create two employees (A B) and two departments (C D) 2: Assign A as manager of C and B as manager of D 3: Assign C as A's department and A as A's manager 4: Change A's department to D -> A is deleted This is due to `parent_id` being both a computed field and the source field for a One2many. By changing the `department_id` the `parent_id` also changed which results in it being report in the `onchange` method. For some reason however the command sent by the orm is n
Original PR description
How to reproduce: 1: create two employees (A B) and two departments (C D) 2: Assign A as manager of C and B as manager of D 3: Assign C as A's department and A as A's manager 4: Change A's department to D -> A is deleted This is due to `parent_id` being both a computed field and the source field for a One2many. By changing the `department_id` the `parent_id` also changed which results in it being report in the `onchange` method. For some reason however the command sent by the orm is not `UNLINK` but `DELETE` which results in the `active_id` being deleted. TaskId-2711428 Forward-Port-Of: odoo/odoo#81122
Since #45352, the dropdown actions "Edit" / "Close" / "Delete" were no longer working; clicking on them was not submitting the form like it was supposed to. TaskID: 2499623 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81082
Original PR description
Since #45352, the dropdown actions "Edit" / "Close" / "Delete" were no longer working; clicking on them was not submitting the form like it was supposed to. TaskID: 2499623 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81082
Avoid iterating over all channels every time a new channel is added. Part of task-2702450 Forward-Port-Of: odoo/odoo#81132 Forward-Port-Of: odoo/odoo#81001
Original PR description
Avoid iterating over all channels every time a new channel is added. Part of task-2702450 Forward-Port-Of: odoo/odoo#81132 Forward-Port-Of: odoo/odoo#81001
Have a [TEST] product tracked by serial number Create a SO with [TEST], quantity N (at least 2) Add FEDEX int. delivery to the order Validate and confirm delivery On the shipping invoice the product is reported on N lines, one for each serial number, but the price is not splitted accordingly so the total of the invoice will be the original price multiplied by N This commit revert f3488749eed3c4e96f1cc50a2bb2cf87b423c890 not needed anymore after e13f048a78b41d81602e868a3b0c7ded24ce99
Original PR description
Have a [TEST] product tracked by serial number Create a SO with [TEST], quantity N (at least 2) Add FEDEX int. delivery to the order Validate and confirm delivery On the shipping invoice the product is reported on N lines, one for each serial number, but the price is not splitted accordingly so the total of the invoice will be the original price multiplied by N This commit revert f3488749eed3c4e96f1cc50a2bb2cf87b423c890 not needed anymore after e13f048a78b41d81602e868a3b0c7ded24ce992b opw-2703581 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#81036 Forward-Port-Of: odoo/odoo#80930
Before this commit, some elements (e.g. sidebar, livechat button) were not correctly positioned in edit mode or/and full screen mode. task-2677132 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#80978 Forward-Port-Of: odoo/odoo#78926
Original PR description
Before this commit, some elements (e.g. sidebar, livechat button) were not correctly positioned in edit mode or/and full screen mode. task-2677132 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#80978 Forward-Port-Of: odoo/odoo#78926
Forcing a fetch of all channel partners for all channels is not efficient because there are too many of them. Replace by a count done in SQL through `read_group`. Time goes from 100ms to 3ms for 1000s of members in 100s of channels. Part of task-2702450 Forward-Port-Of: odoo/odoo#81113
Original PR description
Forcing a fetch of all channel partners for all channels is not efficient because there are too many of them. Replace by a count done in SQL through `read_group`. Time goes from 100ms to 3ms for 1000s of members in 100s of channels. Part of task-2702450 Forward-Port-Of: odoo/odoo#81113
Without this index, finding the user(s) of a partner makes a seq scan, which could take up to 100ms on my machine with only few thousand users. By adding the index, the time is reduced to around 5ms. Part of task-2702450 Forward-Port-Of: odoo/odoo#81137
Original PR description
Without this index, finding the user(s) of a partner makes a seq scan, which could take up to 100ms on my machine with only few thousand users. By adding the index, the time is reduced to around 5ms. Part of task-2702450 Forward-Port-Of: odoo/odoo#81137
When we crop illustrations using the editor crop tool, the resulted image will disappear as soon as we save the update. we have this issue because we cannot get the right svg string using toDataURL on the new cropped canvas with mimetype = 'image/svg+xml' (see 'web_editor.image_processing' > 'applyModifications') To solve this issue we set svg illustrations as uncroppable (for now). task-2312878 Forward-Port-Of: odoo/odoo#59536
Original PR description
When we crop illustrations using the editor crop tool, the resulted image will disappear as soon as we save the update. we have this issue because we cannot get the right svg string using toDataURL on the new cropped canvas with mimetype = 'image/svg+xml' (see 'web_editor.image_processing' > 'applyModifications') To solve this issue we set svg illustrations as uncroppable (for now). task-2312878 Forward-Port-Of: odoo/odoo#59536
**Steps to follow** - Go to contacts - Schedule an activity - Click on edit next to the activity - Click on the Mark as done button -> The activity isn't refreshed **Cause of the issue** - The record is deleted when clicking on the mark as done button - The fetchAndUpdate is called after the form is closed - An exception is thrown -> the method exists early **Solution** Handle odoo.exceptions.MissingError and delete the record client side opw-2702492
Original PR description
**Steps to follow** - Go to contacts - Schedule an activity - Click on edit next to the activity - Click on the Mark as done button -> The activity isn't refreshed **Cause of the issue** - The record is deleted when clicking on the mark as done button - The fetchAndUpdate is called after the form is closed - An exception is thrown -> the method exists early **Solution** Handle odoo.exceptions.MissingError and delete the record client side opw-2702492 Forward-Port-Of: odoo/odoo#81147
This fixes inconsistencies when dealing with fields that are computed and inversed by the same methods. Consider two fields F1, F2 with the same compute and inverse methods. Consider a record where we wrote on a dependency of the common compute method. At this point, both fields F1 and F2 are marked to be computed. Now let us write on F1 only. Here is what happens: - the write discards the computation of F1, but not F2 - the inverse method of F1 is called: - the method access
Original PR description
This fixes inconsistencies when dealing with fields that are computed and inversed by the same methods. Consider two fields F1, F2 with the same compute and inverse methods. Consider a record where…
This fixes inconsistencies when dealing with fields that are computed
and inversed by the same methods.
Consider two fields F1, F2 with the same compute and inverse methods.
Consider a record where we wrote on a dependency of the common compute
method. At this point, both fields F1 and F2 are marked to be computed.
Now let us write on F1 only. Here is what happens:
- the write discards the computation of F1, but not F2
- the inverse method of F1 is called:
- the method accesses F2
-> this calls the compute method, which assigns both F1 and F2
- the method accesses F1
-> the value of F1 has been replaced by the computation above
The issue comes from a combination of factors:
- the value of F2 must be determined by the computation;
- the computation assigns both F1 and F2;
- the computation is done while inversing F1 (and F2).
The solution is to force the computation before actually writing on the
fields and calling their inverse methods. Note that this is necessary
only when part of the fields computed by a common method are updated.
When all fields computed by a common method are updated, the computation
will automatically be cancelled.
Forward-Port-Of: odoo/odoo#81105Steps: - Create 2 projects - Create tasks in both - Go to map view - Group by project Issue: - The numbering on the map doesn't match the numbering in the list. Cause: - The numbering on the map happens as if there was no groupby. Fix: - Take the index of the record inside of its group for the numbering. opw-2682486 Forward-Port-Of: odoo/enterprise#22584
Original PR description
Steps: - Create 2 projects - Create tasks in both - Go to map view - Group by project Issue: - The numbering on the map doesn't match the numbering in the list. Cause: - The numbering on the map happens as if there was no groupby. Fix: - Take the index of the record inside of its group for the numbering. opw-2682486 Forward-Port-Of: odoo/enterprise#22584
Users could get stuck in loops when changing the product/name * Enter name: wrong product gets detected and name is set to product's * Remove product * Go back to step 1 Another workaround would be * Enter name: wrong product gets detected and name is set to product's * Correct name, account and taxes * Remove product [opw-2691578](https://www.odoo.com/web#id=2691578&cids=1&menu_id=4720&action=333&active_id=49&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#22596
Original PR description
Users could get stuck in loops when changing the product/name * Enter name: wrong product gets detected and name is set to product's * Remove product * Go back to step 1 Another workaround would be * Enter name: wrong product gets detected and name is set to product's * Correct name, account and taxes * Remove product [opw-2691578](https://www.odoo.com/web#id=2691578&cids=1&menu_id=4720&action=333&active_id=49&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#22596
…ines Forward-Port-Of: odoo/enterprise#22782
Original PR description
…ines Forward-Port-Of: odoo/enterprise#22782