Tuesday, February 4, 2020
29 changes · master
Resolved issues and error corrections
This update cleans up outdated internal code patterns that were causing deprecation warnings during development and testing. It helps keep Odoo easier to maintain and better prepared for future dependency and platform updates, with little expected impact on day-to-day users.
Original PR description
@Julien00859 already made a pass on this at some point but there's a bunch of warnings either dynamic or from not the stdlib left over. Some of them can't really be fixed in-code and have been explicitly ignored instead: * `setuptools` uses the deprecated `imp` module until v41.6.0 * `zeep` uses defusedxml.lxml which was never intended to be a public / production API, not sure what to do there (cf mvantellingen/python-zeep#956) * there are a ton of invalid escapes in non-raw string literals, they're unlikely to ever be relevant so ignore them
Invoices that are marked as in payment will now show the outstanding credit widget. This helps accounting users apply available credits at the right stage, reducing confusion and avoiding missed credit allocations.
Original PR description
… in_payment -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a duplicate test module name in the stock app that could prevent one set of tests from running. It helps keep automated checks reliable, reducing the risk of unnoticed issues reaching users.
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
System notifications now show sender names with normal punctuation instead of visible web-safe codes. This makes message alerts easier to read, for example showing Bob's friend rather than Bob's friend, while preserving existing security handling for web content.
Original PR description
The title of notification is the author name escaped (for security reasons). https://github.com/odoo/odoo/blob/e3fa264d1053e0f0a5181da56f205cc05cc06316/addons/mail/static/src/js/services/mail_manager.js#L987-L989 When forwarded to the system notification, it does not need to be escaped though, as the system notification is not HTML based. Without this patch, a user named `Bob's friend` sending a message was creating a notification with the title `Bob's friend` Fixes odoo/odoo#24846 PS: PR targeting master as low issue and not worth to potentially break user's notifications for a corner case.
This change removes deprecated internal calls and updates an outdated test method so the affected apps remain compatible with newer supporting libraries. It helps reduce future maintenance risk without changing day-to-day user workflows.
Original PR description
cf odoo/odoo#44164
Miscellaneous changes
Simple `this` instead of `self` mistake which prevents the widgets to trigger up events. Forward-Port-Of: odoo/odoo#44411
Original PR description
Simple `this` instead of `self` mistake which prevents the widgets to trigger up events. Forward-Port-Of: odoo/odoo#44411
When an order is synchronized to the server, there is a timeout of 7.5 seconds that is left before considering that the order has not been synchronized, and should be re-syncronised. Since syncronization of order in pos_restaurant have been made, there are more operations than before that are performed, and the synchronization of an order can take more than that. The validation of a picking can also take a lot of time, almost when products are kits and compose of multiple products.
Original PR description
When an order is synchronized to the server, there is a timeout of 7.5 seconds that is left before considering that the order has not been synchronized, and should be re-syncronised. Since…
When an order is synchronized to the server, there is a timeout of 7.5 seconds that is left before considering that the order has not been synchronized, and should be re-syncronised. Since syncronization of order in pos_restaurant have been made, there are more operations than before that are performed, and the synchronization of an order can take more than that. The validation of a picking can also take a lot of time, almost when products are kits and compose of multiple products. The problem, is that if it takes more than 7.5, the same order will be pushed again to the server, even if the previous sychro still running, which will lead to wait the previous request that has the lok on the same records, all this blocked request can lead to block all workers of the server because all requests are trying to modify same objects. So we've increased the timout for flushed orders. 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#44600
Purpose ======= Before this commit, the method _mail_find_partner_from_emails could return a list mixing partner ids and partner recordset, that could lead to issue when trying to read the different elements. With this commit, we ensure that we return a list of records only. 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/s
Original PR description
Purpose ======= Before this commit, the method _mail_find_partner_from_emails could return a list mixing partner ids and partner recordset, that could lead to issue when trying to read the different elements. With this commit, we ensure that we return a list of records only. 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#44588
With the commit some time ago #d382288, I removed to take the first, but you can have multiple transfer accounts in one company. The best way is to just do a limit=1, 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#44592
Original PR description
With the commit some time ago #d382288, I removed to take the first, but you can have multiple transfer accounts in one company. The best way is to just do a limit=1, 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#44592
It very rarely happens that the test is failing due to the following error: `Tour shop_list_view_b2c failed at step .oe_product_cart .oe_currency_value:contains("825.00")` The value found in that case is 750 instead of 825, which indicates that the b2c setting was not correctly activated. To exclude the RPC themselves from the equation, it is decided here to move the setting change directly in the Python. Forward-Port-Of: odoo/odoo#44581 Forward-Port-Of: odoo/odoo#44492
Original PR description
It very rarely happens that the test is failing due to the following error:
`Tour shop_list_view_b2c failed at step
.oe_product_cart .oe_currency_value:contains("825.00")`
The value found in that case is 750 instead of 825, which indicates that the b2c
setting was not correctly activated.
To exclude the RPC themselves from the equation, it is decided here to move the
setting change directly in the Python.
Forward-Port-Of: odoo/odoo#44581
Forward-Port-Of: odoo/odoo#44492Forward-Port-Of: odoo/odoo#44558
Original PR description
Forward-Port-Of: odoo/odoo#44558
During the port to 13.0 and the new Settings dashboard, the "Load demo data" button visibility condition was reversed. Also rewrote the `&&` operator to `and` for XML readability. Cfr #34290 or https://github.com/odoo/odoo/pull/34290/files#diff-e5df7b873d03867c9527da957b762802L131 Forward-Port-Of: odoo/odoo#44526
Original PR description
During the port to 13.0 and the new Settings dashboard, the "Load demo data" button visibility condition was reversed. Also rewrote the `&&` operator to `and` for XML readability. Cfr #34290 or https://github.com/odoo/odoo/pull/34290/files#diff-e5df7b873d03867c9527da957b762802L131 Forward-Port-Of: odoo/odoo#44526
#### Description of the issue/feature this PR addresses: We found this error because in l10n_ar module we have 3 chart of accounts that actually have same transfer_account_code_prefix. #### Current behavior before PR: When installing chart of accounts of l10n_ar module it is setting a bad transfer account in the company because the account does not belongs to the current company.  If you active superuser you will see that the "(AR) Responsable Inscripto" company has set a transfer_account_id that does not belongs to "(AR) Exento" company  #### Desired behavior after PR is merged: Properly set the transfer account in the company taking account the accounts defined in the current company -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44506
[FIX] im_livechat: add missing dependency to livechat widget Bug === A dependecy is missing "lazyloader.js" Task #2118959 Forward-Port-Of: odoo/odoo#39763
Original PR description
[FIX] im_livechat: add missing dependency to livechat widget Bug === A dependecy is missing "lazyloader.js" Task #2118959 Forward-Port-Of: odoo/odoo#39763
Description of the issue/feature this PR addresses: Followup on https://github.com/odoo/odoo/commit/3ef3aeb640c90e2817878eaa11701aedbf6b6ecb , PR https://github.com/odoo/odoo/pull/29812 Current behavior before PR: Before this commit, Creating New Template from "Send Invoice" wizard doesn't update template_id on the Wizard.  Desired behavior after PR is merged: In this co
Original PR description
Description of the issue/feature this PR addresses: Followup on https://github.com/odoo/odoo/commit/3ef3aeb640c90e2817878eaa11701aedbf6b6ecb , PR https://github.com/odoo/odoo/pull/29812 Current behavior before PR: Before this commit, Creating New Template from "Send Invoice" wizard doesn't update template_id on the Wizard.  Desired behavior after PR is merged: In this commit, We write newly created template_id on the wizard.  Cc @qdp-odoo based on https://github.com/odoo/odoo/pull/29812#issuecomment-459262514 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42655
Description of the issue/feature this PR addresses: Fixes #43705 Current behavior before PR: Before this commit, There will be tracback on converting currecy if there is not date on tax line. Desired behavior after PR is merged: Now we use current date to as fallback to convert currency. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44421
Original PR description
Description of the issue/feature this PR addresses: Fixes #43705 Current behavior before PR: Before this commit, There will be tracback on converting currecy if there is not date on tax line. Desired behavior after PR is merged: Now we use current date to as fallback to convert currency. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44421
- Create a product A MTO, Buy Add a supplier S1 and set a specific reference - Create a product B MTO, Buy Add a supplier S2 and set a specific reference - Create a SO with A & B, confirm - 2 RFQ are created The first RFQ is created with the correct reference, but not the second one. This is because `display_name` depends on context keys: it is computed once for both products with `partner_id` set as `S1`, while it should be recomputed for product B with `partner_id` set
Original PR description
- Create a product A MTO, Buy Add a supplier S1 and set a specific reference - Create a product B MTO, Buy Add a supplier S2 and set a specific reference - Create a SO with A & B, confirm - 2 RFQ are created The first RFQ is created with the correct reference, but not the second one. This is because `display_name` depends on context keys: it is computed once for both products with `partner_id` set as `S1`, while it should be recomputed for product B with `partner_id` set as `S2`. In order to avoid this, we explicitly call `name_get`. opw-2176638 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#44533 Forward-Port-Of: odoo/odoo#44487
The web_diagram module was removed in saas-13.1, along with the diagram view support but some translation files were brought back by forwardports. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44507
Original PR description
The web_diagram module was removed in saas-13.1, along with the diagram view support but some translation files were brought back by forwardports. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44507
- Create an invoice for 1000 - Make a partial payment (e.g. cash) for 250 - Print the ISR The ISR contains an amount of 1000 (total amount), while it should be 750 (amount left to pay). opw-2180538 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#44518 Forward-Port-Of: odoo/odoo#44276
Original PR description
- Create an invoice for 1000 - Make a partial payment (e.g. cash) for 250 - Print the ISR The ISR contains an amount of 1000 (total amount), while it should be 750 (amount left to pay). opw-2180538 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#44518 Forward-Port-Of: odoo/odoo#44276
### Issue - Install eLearning - Edit the header > change image - Save Image not changed ### Cause We do not take new style/class attrib in account in replace_arch_section. ### Solution Take them in account **OPW-2122947 OPW-2182109** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44389
Original PR description
### Issue
- Install eLearning
- Edit the header > change image
- Save
Image not changed
### Cause
We do not take new style/class attrib in account in
replace_arch_section.
### Solution
Take them in account
**OPW-2122947
OPW-2182109**
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#44389The parameter `lot_id` must be a recordset, not an `int`. opw-2188752 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#44512
Original PR description
The parameter `lot_id` must be a recordset, not an `int`. opw-2188752 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#44512
The computation was incorrect, the answer was 10, not 110 with the previous formula Courtesy of Frederico Freire Boaventura Forward-Port-Of: odoo/odoo#44503
Original PR description
The computation was incorrect, the answer was 10, not 110 with the previous formula Courtesy of Frederico Freire Boaventura Forward-Port-Of: odoo/odoo#44503
Steps to reproduce: - install sales - create a new quotation Previous behavior: the avatar next to the author's name is empty in the mailthread Current behavior: avatar is displayed as expected opw-2187231 Forward-Port-Of: odoo/odoo#44379
Original PR description
Steps to reproduce: - install sales - create a new quotation Previous behavior: the avatar next to the author's name is empty in the mailthread Current behavior: avatar is displayed as expected opw-2187231 Forward-Port-Of: odoo/odoo#44379
The default journal depends on the company define in the context or the company in the environment In case of online signature/payment of a SO in a different company then the public user The company will be wrong and the journal_id as well It lead to a fail of the payment since the payment could not be reconciled with the invoices This is happening because the force_company is not taken into account for the default journal This commit take the force_company into account, it take the pre
Original PR description
The default journal depends on the company define in the context or the company in the environment In case of online signature/payment of a SO in a different company then the public user The company will be wrong and the journal_id as well It lead to a fail of the payment since the payment could not be reconciled with the invoices This is happening because the force_company is not taken into account for the default journal This commit take the force_company into account, it take the precedences on the default_company Forward-Port-Of: odoo/odoo#44231
Previously doing so was causing an error but the problem has been fixed by ponto, therefore in order to have the correct account balance in Odoo, we also trigger the refresh of the account when doing the refresh for transactions. Forward-Port-Of: odoo/enterprise#8142
Original PR description
Previously doing so was causing an error but the problem has been fixed by ponto, therefore in order to have the correct account balance in Odoo, we also trigger the refresh of the account when doing the refresh for transactions. Forward-Port-Of: odoo/enterprise#8142