Monday, March 15, 2021
16 changes · master
Resolved issues and error corrections
This fix removes survey report styling rules that were accidentally applied across all Odoo reports. It helps prevent unrelated reports from having broken layouts and reduces the risk of future style conflicts.
Original PR description
This commit removes 2 css rules that were applied on ALL odoo reports by mistake. Indeed, adding rules on "*" and "body" will most likely break other reporting layouts and is very dangerous / unintended. If these rules are needed for the survey reports, then it should be fixed to make them only applied to those reports instead. We also took this opportunity to get rid of some scss variables. These variables names were too "global" and could also conflict with other reporting css rulesets. If we want to use variables for that report, they should be correctly pre-fixed to avoid collisions. Source: 212b107fa155778e2b2063b66bb88517aba80498 Task-2341847 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
Selecting icons in the website editor's media dialog now behaves correctly and displays the selected state properly. Icons are also centered, making the media picker clearer and easier to use.
Original PR description
The code added in bb65b742e7eec000248b7df0f048dda61ac3ff5a to update style for multi image selection is not compatible with .fa icons and causes a strange behaviour when trying to select one. The goal of this PR is to fix style for selected icons on Media Dialog. task-2326573
Code cleanup and technical improvements
This change removes a duplicated setting used when running automated browser tests in headless mode. It keeps the test setup simpler and reduces the chance of confusion without changing product behavior for users.
Original PR description
It was added here: https://github.com/odoo/odoo/commit/253d5341a4e2d19d2cb9bad6bb1b1986f52dd66f 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
Oversight of 20b34ae867e927eba2951bd81d73661d21084d17 This commit fixes the display condition of the small alert block on top of the mass.mailing form view. The condition was not working because it would hide the alert if: ('failed', '=', 0) OR ( ('state', '!=', 'in_queue') AND ('sent', '=', 0) AND ('scheduled', '=', 0)) Instead, we want to hide it if: ('failed', '=', 0) AND ('state', '!=', 'in_queue') AND ('sent', '=', 0) AND ('scheduled', '=', 0) This would
Original PR description
Oversight of 20b34ae867e927eba2951bd81d73661d21084d17
This commit fixes the display condition of the small alert block on top of the
mass.mailing form view.
The condition was not working because it would hide the alert if:
('failed', '=', 0)
OR (
('state', '!=', 'in_queue')
AND
('sent', '=', 0)
AND
('scheduled', '=', 0))
Instead, we want to hide it if:
('failed', '=', 0)
AND
('state', '!=', 'in_queue')
AND
('sent', '=', 0)
AND
('scheduled', '=', 0)
This would for example prevent showing that the mailing is "scheduled" or that
it has successfully been sent with various mailing statistics.
Task-2457227
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#67505Commit 6a0028f91944b1d9e4eac026e86ca249ef5bc7ee introduced a change that allowed field_triggers to be computed lazily per registry, this change introduced a behavioral change that is not easy to notice, in order to explain the behavioral change I will use the following example which was the original bug reported: * Install * Create an app (create a new custom model M) * Uninstall studio * Uninstall fails because field display_name of the custom model M depends on field M.x_name whi
Original PR description
Commit 6a0028f91944b1d9e4eac026e86ca249ef5bc7ee introduced a change that allowed field_triggers to be computed lazily per registry, this change introduced a behavioral change that is not easy to…
Commit 6a0028f91944b1d9e4eac026e86ca249ef5bc7ee introduced a change that allowed field_triggers to be computed lazily per registry, this change introduced a behavioral change that is not easy to notice, in order to explain the behavioral change I will use the following example which was the original bug reported: * Install * Create an app (create a new custom model M) * Uninstall studio * Uninstall fails because field display_name of the custom model M depends on field M.x_name which has been removed due to the uninstall process. To understand why it didn't happen before the aforementioned commit, we must first understand what happens with said commit applied: * We trigger the uninstall of studio, this triggers the uninstall of any modules that depend on it, namely studio_customizations which is the module in which all customizations done with studio live in. * We gather all data belonging to the studio_customization and we start deleting in the following order: ..., ir.model.fields.selection, ir.model.fields, ..., ir.model * During the unlink process, we first remove the actual fields from the model instances before deleting their database reflections, this is done in the ir.model.fields._drop_column() method, it is this method that will delete the x_name field but **not** the display_name field, since it is a base field and not a custom one. * After the deletion of the fields in memory, we call modified() to mark fields that might've depended on the fields we just modified so that they can be recomputed later. * The call to modified will in turn access field_triggers, but since we're in a new registry and field_triggers is a lazy property, it will be computed right at this moment, this means that it will call resolve_depends on the display_name field which still exists, and this field has a dependency on the x_name field that we just deleted! This is what will trigger the crash. With that context, we can now understand how it didn't crash before commit 6a0028f91944b1d9e4eac026e86ca249ef5bc7ee: * Before the aforementioned commit, the field_triggers attribute was computed during the registry's setup_models(), in the case of an uninstall this call to setup_models was done way before the uninstall step of the registry (Step 3 is the last to call setup_models before Step 5). * This means that the old behavior was technically a bug, because right after removing x_name from the model, the field_triggers still contained a dependency from display_name to x_name, the former being no-longer present in memory. With this commit, we simply reset the _rec_name and the dependencies of the display_name if the x_name field is being removed, this ensures that the computation of field_triggers won't crash and burn. opw-2452498 opw-2478589 Forward-Port-Of: odoo/odoo#67747
Issue: If we get a 'false' for the real_owner_id from the extendedProperties, we will get an error ValueError: invalid literal for int() with base 10: 'false' Fix: We make sure to set a user for the real_owner_id var if it return a 'false' before Explain the issue to LUL, he said it was going to be fix in https://github.com/odoo/odoo/pull/66080/commits/2303a772ec7256c67cbdd1e55981154d21fa4dd4 But as he does not know when and since it's urgent, we decide to make another pull request to
Original PR description
Issue: If we get a 'false' for the real_owner_id from the extendedProperties, we will get an error ValueError: invalid literal for int() with base 10: 'false' Fix: We make sure to set a user for the real_owner_id var if it return a 'false' before Explain the issue to LUL, he said it was going to be fix in https://github.com/odoo/odoo/pull/66080/commits/2303a772ec7256c67cbdd1e55981154d21fa4dd4 But as he does not know when and since it's urgent, we decide to make another pull request to fix it quicker. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67746
Until now, if you have 2 tags (t1, t2) on blog post (P) of blog (B), we ask to index: /blog/B/post/P /blog/B/post/P/t1 /blog/B/post/P/t2 Now, we only ask to index: /blog/B/post/P opw-2413811 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#67819 Forward-Port-Of: odoo/od
Original PR description
Until now, if you have 2 tags (t1, t2) on blog post (P) of blog (B),
we ask to index:
/blog/B/post/P
/blog/B/post/P/t1
/blog/B/post/P/t2
Now, we only ask to index:
/blog/B/post/P
opw-2413811
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#67819
Forward-Port-Of: odoo/odoo#67676**Current behavior before PR:** When delete/archive any user, the user’s profile name changed to 'Administrator' on chatWindow. It happens only in case when the user is ‘Administrator’. **Desired behavior after PR is merged:** chat window name should remain the same after archiving/deleting the user. **LINKS:** PR #66325 Task-2442235 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67791 Forward-Port-Of: odo
Original PR description
**Current behavior before PR:** When delete/archive any user, the user’s profile name changed to 'Administrator' on chatWindow. It happens only in case when the user is ‘Administrator’. **Desired behavior after PR is merged:** chat window name should remain the same after archiving/deleting the user. **LINKS:** PR #66325 Task-2442235 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67791 Forward-Port-Of: odoo/odoo#66325
**PURPOSE** Currently, In channels listing, the order of the channels is case sensitive. The Uppercase names are listing first and then all the Lowercase ones. but it should be displayed in the alphabetical case insensitive order. **SPECIFICATION** We are now comparing the lowercase value in the comparison function of the sort method. Now channels are listing in a case insensitive alphabetical manner. **Task : 2453592** Forward-Port-Of: odoo/odoo#65579
Original PR description
**PURPOSE** Currently, In channels listing, the order of the channels is case sensitive. The Uppercase names are listing first and then all the Lowercase ones. but it should be displayed in the alphabetical case insensitive order. **SPECIFICATION** We are now comparing the lowercase value in the comparison function of the sort method. Now channels are listing in a case insensitive alphabetical manner. **Task : 2453592** Forward-Port-Of: odoo/odoo#65579
The tour system is based on many assumptions, some of those not being true all the time. In practice, it works most of the time, but when some slight changes occurs, we may observe undeterministic behavior. This was actually the case in a dev branch working on assets: the order of some files was changed, and it caused crashes in various tours. This helped us identify two issues in the Tip class: - the Tip class may be destroyed before it is completely started (so, the destroy metho
Original PR description
The tour system is based on many assumptions, some of those not being true all the time. In practice, it works most of the time, but when some slight changes occurs, we may observe undeterministic…
The tour system is based on many assumptions, some of those not being true all the time. In practice, it works most of the time, but when some slight changes occurs, we may observe undeterministic behavior. This was actually the case in a dev branch working on assets: the order of some files was changed, and it caused crashes in various tours. This helped us identify two issues in the Tip class: - the Tip class may be destroyed before it is completely started (so, the destroy method should not assume that the code in start was called - the attach_to method should not resolve if the tip was destroyed meanwhile. This is critical, because some code uses that promise to act on the widget. This commit fixes both of these issues. 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#67872
Without this commit, all tests executed after that one would use the patched version of the FormViewDialog. Issue spotted in the assets revamp branch, by moving form_tests.js after calendar_tests.js 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#67855
Original PR description
Without this commit, all tests executed after that one would use the patched version of the FormViewDialog. Issue spotted in the assets revamp branch, by moving form_tests.js after calendar_tests.js 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#67855
The 'addMockEnvironment' test utils allows to patch a lot of stuff, including the session, for the sake of a test. However, it assumes that it is only called once inside a test (or at least, that its cleanUp function is always called before it is called again). In this hr_attendance test, it isn't the case. 2 client actions are instantiated, and addMockEnvironment is called for each of them, in particular to patch the session. The first call stores the current session (the real one),
Original PR description
The 'addMockEnvironment' test utils allows to patch a lot of stuff, including the session, for the sake of a test. However, it assumes that it is only called once inside a test (or at least, that its…
The 'addMockEnvironment' test utils allows to patch a lot of stuff, including the session, for the sake of a test. However, it assumes that it is only called once inside a test (or at least, that its cleanUp function is always called before it is called again). In this hr_attendance test, it isn't the case. 2 client actions are instantiated, and addMockEnvironment is called for each of them, in particular to patch the session. The first call stores the current session (the real one), to restore it in its cleanup (1). The second call stores the current session (the mocked one, produced by the first call), to restore it in its cleanup (2). The cleanup functions are called in order, so (1) before (2), meaning that at the end, we end up with the session being the mocked one of the first call to addMockEnvironment. The very short term solution is to ensure, in this test, that the cleanup functions are called in the correct order. For the long term, we are working on a robust mechanism to correctly clean up everything after a test. Issue spotted in the assets revamp task, which mixed a bit the order of the tests. 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#67852
Description of the issue/feature this PR addresses: Before this PR, the popup to update all discount doesn't appear if the first ligne is `display_type == 'line_section' or 'line_note'`. Go to runbot - install sale with discount - create a sale order - add first section line - add 4 other lines with products - add discount on the second line --> Issue a popup should appear to update all discount. (It works if the first line is not a section). @simongoffin -- I confirm I have
Original PR description
Description of the issue/feature this PR addresses: Before this PR, the popup to update all discount doesn't appear if the first ligne is `display_type == 'line_section' or 'line_note'`. Go to runbot - install sale with discount - create a sale order - add first section line - add 4 other lines with products - add discount on the second line --> Issue a popup should appear to update all discount. (It works if the first line is not a section). @simongoffin -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#66518
Both warnings were always showing when they're was at least one of them. The previous commit e2a8b91 was incomplete when it got merged (oopsie...). Forward-Port-Of: odoo/enterprise#17011 Forward-Port-Of: odoo/enterprise#17006
Original PR description
Both warnings were always showing when they're was at least one of them. The previous commit e2a8b91 was incomplete when it got merged (oopsie...). Forward-Port-Of: odoo/enterprise#17011 Forward-Port-Of: odoo/enterprise#17006
If the user made a deposit, it should not block the creation of invoices. The deposit has a negative value/quantity on the invoice so it will not impact the tax computation opw-[2464608](https://www.odoo.com/web#active_id=2464608&cids=1&id=2464608&model=project.task&menu_id=) Forward-Port-Of: odoo/enterprise#16995
Original PR description
If the user made a deposit, it should not block the creation of invoices. The deposit has a negative value/quantity on the invoice so it will not impact the tax computation opw-[2464608](https://www.odoo.com/web#active_id=2464608&cids=1&id=2464608&model=project.task&menu_id=) Forward-Port-Of: odoo/enterprise#16995
Steps to reproduce the bug: 1. Register a payment P1 2. Reconcile P1 with a bank statement BS 3. Create a draft payment P2 4. Create a batch B and select a payment Bug: The reconciled payment P1 was suggested. Only not reconciled payment must be suggested. opw:2456171 Forward-Port-Of: odoo/enterprise#16782 Forward-Port-Of: odoo/enterprise#16769
Original PR description
Steps to reproduce the bug: 1. Register a payment P1 2. Reconcile P1 with a bank statement BS 3. Create a draft payment P2 4. Create a batch B and select a payment Bug: The reconciled payment P1 was suggested. Only not reconciled payment must be suggested. opw:2456171 Forward-Port-Of: odoo/enterprise#16782 Forward-Port-Of: odoo/enterprise#16769