Thursday, March 12, 2020
26 changes · master
Enhancements to existing features
The core record-checking behavior now keeps results in a predictable order. This helps reduce inconsistent test outcomes and makes performance measurements easier to compare between runs.
Original PR description
When testing odoo, error can occur an undeterministic way, wich can lead to strange and unroproductible behaviour. This also means that the perormances can change from one execution to another, making it quite difficult to track performance drop/imrpovement on a global scope. This commit tryies to make exists determinist hopefuly without running performances to much. The other side effect is to keep ids in the same order as the initial recordset wich can be usefull. 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
Administrators can now view and edit digest tips from the technical email menu, making it easier to maintain the guidance shown in digest emails. Each tip also has a clear name, so teams can identify and improve tips without reading through the full content first.
Original PR description
PURPOSE Allow to edit and improve digest tips. SPECIFICATIONS Add views for digest tips. Locate those views in technical menu, in email section, below Digest Emails. Add a name on digest tips. Even if technical and not send to customers it allows to see them at a glance in list view without having to guess their content.
Helpdesk digest tips now include internal names so staff can identify them more easily in list views. This makes administration faster by removing the need to open each tip to understand its content.
Original PR description
Add a name on digest tips. Even if technical and not send to customers it allows to see them at a glance in list view without having to guess their content. LINKS Task ID 2214325
Resolved issues and error corrections
This fixes an error in how purchase requisition records are searched, which could cause incorrect or missing results. The change helps users find the right purchase agreement information more reliably.
Original PR description
bug introduced by ef16266ad6cd7b0900c2bdc9922cd3c1c405c177 Task : 2210230 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
With l10n_mx installed: - Check in the settings that cash basis option is activated, and enabled on a Purchase Tax (example : IVA(16%) COMPRAS) - Create a vendor bill with this tax, validate it and register payment. - Create a credit note to this invoice, validate and register payment. - Cancel the credit note Error will occur, a record is already deleted. This occur because the canceling action recursively find every related move to delete, but in the process an account.full.reconcil
Original PR description
With l10n_mx installed: - Check in the settings that cash basis option is activated, and enabled on a Purchase Tax (example : IVA(16%) COMPRAS) - Create a vendor bill with this tax, validate it and register payment. - Create a credit note to this invoice, validate and register payment. - Cancel the credit note Error will occur, a record is already deleted. This occur because the canceling action recursively find every related move to delete, but in the process an account.full.reconcile is going to be unlinked twice: a check on reverse the exchange rate entry will trigger the error because the record is already deleted opw-2199093 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47341
In POS Settings activate IoTBox, and its suboption 'Receipt Printer' Activate now 'Reprint Receipt' Open the POS, make an order, validate and go to a next new order. Click on 'Reprint Receipt', then 'Print Invoice', fill the customer and try again Server Error message will popup, reprinting the invoice is thus, impossible. In v13 the action warn the user to print the invoice via backend, so this commit replace entirely the button with the message opw-2195440 -- I confirm I hav
Original PR description
In POS Settings activate IoTBox, and its suboption 'Receipt Printer' Activate now 'Reprint Receipt' Open the POS, make an order, validate and go to a next new order. Click on 'Reprint Receipt', then 'Print Invoice', fill the customer and try again Server Error message will popup, reprinting the invoice is thus, impossible. In v13 the action warn the user to print the invoice via backend, so this commit replace entirely the button with the message opw-2195440 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47049
Before this commit: - Install some random module that can be uninstalled (so not base) - Open the uninstall wizard for said module in two different tabs / windows / whatever - In one tab, confirm the module uninstall and wait for it to be done - As soon as the other tab is done with the uninstall, go to the second one with the uninstall wizard still open, and proceed with the second uninstall - Boom, the registry crashes and completely
Original PR description
Before this commit: - Install some random module that can be uninstalled (so not base) - Open the uninstall wizard for said module in two different tabs / windows / whatever - In one tab, confirm the…
Before this commit:
- Install some random module that can be uninstalled (so not base)
- Open the uninstall wizard for said module in two different tabs /
windows / whatever
- In one tab, confirm the module uninstall and wait for it to be
done
- As soon as the other tab is done with the uninstall, go to the
second one with the uninstall wizard still open, and proceed
with the second uninstall
- Boom, the registry crashes and completely fucks up the DB because
there's no check at all that prevents the uninstall of already
uninstalled modules.
After this commit:
- `ir.module.module.button_uninstall` will check if any of the
modules being uninstalled are already in the uninstalled state
and if so a UserError will be raised, preventing a second
uninstall of the module which could potentially break the DB
Do note that this fix is LOCAL, the problem is however more or less
global, wherever there's user-actionable buttons that should only be
pressed once there's a potential for bugs / breakage if a similar fix is
not implemented locally. Perhaps a more global fix should be implemented
eventually, but it's generally less annoying for business cases since
those probably won't break the registry, see task 1859014.
opw-2213679
opw-2212594
opw-2206446
Forward-Port-Of: odoo/odoo#47414A constraint was added. That is why we had the error, but we need the fix anyways, otherwise the tags won't be visible in the configuration of the taxes. Task id: 2214184 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#47410
Original PR description
A constraint was added. That is why we had the error, but we need the fix anyways, otherwise the tags won't be visible in the configuration of the taxes. Task id: 2214184 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#47410
Open every model with the chatter Schedule an activity Click on "Done" button and insert a feedback with an accent/quote. Escaped sequence will appear as result. In v13 the html feedback field which was used to store feedback was replaced by the mail subsystem, so the value should be sent to the message_post_with_view function unescaped opw-2209081 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#46867
Original PR description
Open every model with the chatter Schedule an activity Click on "Done" button and insert a feedback with an accent/quote. Escaped sequence will appear as result. In v13 the html feedback field which was used to store feedback was replaced by the mail subsystem, so the value should be sent to the message_post_with_view function unescaped opw-2209081 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#46867
### Issue - Have 2 languages installed - Install Invoicing & Website - Go in Settings - Search "logo" (image) - Upload a logo for your website - Save - Search "Default terms & conditions" (translatable field) - Click on the translate button (e.g. EN if you are in english) A popup will appears saying that you should save your changes. - Click on Save & do not edit translation (not needed) - Search "logo" Image disappeared (because the value is it's size)
Original PR description
### Issue - Have 2 languages installed - Install Invoicing & Website - Go in Settings - Search "logo" (image) - Upload a logo for your website - Save - Search "Default terms & conditions"…
### Issue
- Have 2 languages installed
- Install Invoicing & Website
- Go in Settings
- Search "logo" (image)
- Upload a logo for your website
- Save
- Search "Default terms & conditions" (translatable field)
- Click on the translate button (e.g. EN if you are in
english)
A popup will appears saying that you should save your
changes.
- Click on Save & do not edit translation (not needed)
- Search "logo"
Image disappeared (because the value is it's size)
and saving = parsing error
### Cause
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
This is why the image disappeared.
### Solution
As configuration is dirty, you are forced to save &
it will always read with bin_size set to true.
My solution would be to prioritize the context and
set it to False for settings
**OPW-2208232**
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#47297Description 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#47457 Forward-Port-Of: odoo/odoo#47418
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#47457 Forward-Port-Of: odoo/odoo#47418
Before this commit: - Install a module - Uninstall the previously installed module - The registry will complain that some dependencies may be missing for the module being uninstalled This happens because we check after the installation / upgrade of modules that none have been left in a transient state to verify that new dependencies have been properly installed and loaded, this applies to 'to install' and 'to upgrade' states however it's not the same for 'to remove
Original PR description
Before this commit:
- Install a module
- Uninstall the previously installed module
- The registry will complain that some dependencies may be missing
for the module being uninstalled
This happens because we check after the installation / upgrade of
modules that none have been left in a transient state to verify that new
dependencies have been properly installed and loaded, this applies to
'to install' and 'to upgrade' states however it's not the same for 'to
remove' states, as the process of uninstall happens much later in the
code.
After this commit, simply uninstalling modules will not trigger this
error log.
Do note that in case of a problem with an uninstall, the function
"reset_module_states" will tackle the case of leftover transient states.
Forward-Port-Of: odoo/odoo#47463Task: https://www.odoo.com/web#id=2212790&action=327&model=project.task&view_type=form&cids=2&menu_id=4720 Forward-Port-Of: odoo/odoo#47404
Original PR description
Task: https://www.odoo.com/web#id=2212790&action=327&model=project.task&view_type=form&cids=2&menu_id=4720 Forward-Port-Of: odoo/odoo#47404
Steps to reproduce the bug: - Let's consider a company C with Belgian chart of accounts - Let's consider a product P with 21% of Tax at 100€ - Go to POS and create an order O for P - Pay O and close the POS - Open the journal entry JE of O - Reset to draft JE and change the Analytic Tags of the 100€ credit line Bug: The Tax grids of the 21€ credit line was removed. PS: This fix avoids the recomputation of taxes when adding analytics tags closes: #46827 opw-2189255 Forward
Original PR description
Steps to reproduce the bug: - Let's consider a company C with Belgian chart of accounts - Let's consider a product P with 21% of Tax at 100€ - Go to POS and create an order O for P - Pay O and close the POS - Open the journal entry JE of O - Reset to draft JE and change the Analytic Tags of the 100€ credit line Bug: The Tax grids of the 21€ credit line was removed. PS: This fix avoids the recomputation of taxes when adding analytics tags closes: #46827 opw-2189255 Forward-Port-Of: odoo/odoo#47389
Steps to reproduce: - install acounting, make sure you have account_analytic_default installed - go to settings and activate Analytic Accounting - go to accounting > configuration > analytic accounts > create an account - go to accounting > customers > invoices > create > make an invoice line with an analytical account > save > edit > add a new line to the invoice and select any product Previous behavior: analytic accounts previously saved are deleted by an onchange Current behavior
Original PR description
Steps to reproduce: - install acounting, make sure you have account_analytic_default installed - go to settings and activate Analytic Accounting - go to accounting > configuration > analytic accounts > create an account - go to accounting > customers > invoices > create > make an invoice line with an analytical account > save > edit > add a new line to the invoice and select any product Previous behavior: analytic accounts previously saved are deleted by an onchange Current behavior: analytic accounts remains set after any update of the invoice lines opw-2209169 Forward-Port-Of: odoo/odoo#47344
[FIX] web_editor: fixes the rgb/rgba color selection Before this commit, `selectStyle` could incorrectly split the widgetValue (as described below) which resulted in invalid CSS. widgetValue: `"rgba(55, 12, 99, 0.7) 55px"` result: `["rgba(55,", "12,", "99,", "0.7)", "55px"]` expected: `["rgba(55, 12, 99, 0.7)", "55px"]` fixed: `["rgba(55,12,99,0.7)", "55px"]` This commit fixes the issue. Forward-Port-Of: odoo/odoo#47076
Original PR description
[FIX] web_editor: fixes the rgb/rgba color selection Before this commit, `selectStyle` could incorrectly split the widgetValue (as described below) which resulted in invalid CSS. widgetValue: `"rgba(55, 12, 99, 0.7) 55px"` result: `["rgba(55,", "12,", "99,", "0.7)", "55px"]` expected: `["rgba(55, 12, 99, 0.7)", "55px"]` fixed: `["rgba(55,12,99,0.7)", "55px"]` This commit fixes the issue. Forward-Port-Of: odoo/odoo#47076
Validating a receipt of 90 stock moves having ~300k products in the database goes from 7 minutes to 11 seconds thanks to the addition of "active_test=False in the context before doing the searches on valuation layers. Most searches on "stock.valuation.layer" are done when validating a move, but since this model contains an active field, the orm will pathologically complete the searches expression by adding "id in active" products. If the list is long, it slows down everything. Since
Original PR description
Validating a receipt of 90 stock moves having ~300k products in the database goes from 7 minutes to 11 seconds thanks to the addition of "active_test=False in the context before doing the searches on valuation layers. Most searches on "stock.valuation.layer" are done when validating a move, but since this model contains an active field, the orm will pathologically complete the searches expression by adding "id in active" products. If the list is long, it slows down everything. Since this field was only added to have a filter on the valuation reports, it doesn't matter at all to ignore it in "_action_done". It would probably have been cleaner to just remove the field but it doesn't fit the stable policy. Nevertheless, we're going to remove the field in master with task-2178269, as well as this patch. opw-2209797 Forward-Port-Of: odoo/odoo#47478
Fix in gallery snippet (carousel mode). Create a new id and update links id when this snippet is duplicated. task-2162952 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#47501 Forward-Port-Of: odoo/odoo#44180
Original PR description
Fix in gallery snippet (carousel mode). Create a new id and update links id when this snippet is duplicated. task-2162952 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#47501 Forward-Port-Of: odoo/odoo#44180
…move form This field is used by the account.move.line to know the currency of the invoice. However, the currency_id is not always set when dealing with a single currency. In this case, currency_id is False on account.move.line and we need the additional always_set_currency_id field to know the currency to be used to round the price_subtotal/price_total. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47499
Original PR description
…move form This field is used by the account.move.line to know the currency of the invoice. However, the currency_id is not always set when dealing with a single currency. In this case, currency_id is False on account.move.line and we need the additional always_set_currency_id field to know the currency to be used to round the price_subtotal/price_total. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#47499
At the moment, when a rule has a supply method "Take from stock, if unavailable, trigger another rule", it is displayed as a "take from stock" rule In order to differentiate the rule supply method, we should rather show, thanks to a vertical bar, when a rule is in take from stock, and use both a vertical bar and the three dots when it is in "take from stock, if unavailable, trigger another rule" task-2205748 Forward-Port-Of: odoo/odoo#47399
Original PR description
At the moment, when a rule has a supply method "Take from stock, if unavailable, trigger another rule", it is displayed as a "take from stock" rule In order to differentiate the rule supply method, we should rather show, thanks to a vertical bar, when a rule is in take from stock, and use both a vertical bar and the three dots when it is in "take from stock, if unavailable, trigger another rule" task-2205748 Forward-Port-Of: odoo/odoo#47399
Commit 5e76dd006402fad5030ae916d introduced the error message translation by using `_lt`. However, `result['error_message']` now contains a callable function, not a `string`. It is necessary to call `__str__()` to get the string. opw-2210531 Forward-Port-Of: odoo/enterprise#9181
Original PR description
Commit 5e76dd006402fad5030ae916d introduced the error message translation by using `_lt`. However, `result['error_message']` now contains a callable function, not a `string`. It is necessary to call `__str__()` to get the string. opw-2210531 Forward-Port-Of: odoo/enterprise#9181
If the context contained default values for an 'account.move' object when creating an account from the IBAN, we got a traceback because the ORM tried to set those fields on the created 'res.partner.bank' object, which of course, doesn't exist. Forward-Port-Of: odoo/enterprise#8973
Original PR description
If the context contained default values for an 'account.move' object when creating an account from the IBAN, we got a traceback because the ORM tried to set those fields on the created 'res.partner.bank' object, which of course, doesn't exist. Forward-Port-Of: odoo/enterprise#8973
When the OCR found a VAT number in the invoice, it's better to try to match a partner with it first before using the detected name. Forward-Port-Of: odoo/enterprise#8934
Original PR description
When the OCR found a VAT number in the invoice, it's better to try to match a partner with it first before using the detected name. Forward-Port-Of: odoo/enterprise#8934
We need to add information in the xml about which taxes are applied with their edi code. Before, we searched for these taxes by taking the tax lines of the invoice (tax_line_id). However, there is no tax_line_id generated for the 0% taxes. Now, in order to have all the taxes, they are put anyways on the base amounts, where we have the tax_ids. Task id: 2209925 Forward-Port-Of: odoo/enterprise#9164
Original PR description
We need to add information in the xml about which taxes are applied with their edi code. Before, we searched for these taxes by taking the tax lines of the invoice (tax_line_id). However, there is no tax_line_id generated for the 0% taxes. Now, in order to have all the taxes, they are put anyways on the base amounts, where we have the tax_ids. Task id: 2209925 Forward-Port-Of: odoo/enterprise#9164
- Activate multi-currency - Go to Accounting / Accounting / Deferred Expenses - Create one in a company different than the company currency It crashes. And the currency of the journal entry is incorrect. opw-2211127 Forward-Port-Of: odoo/enterprise#9165
Original PR description
- Activate multi-currency - Go to Accounting / Accounting / Deferred Expenses - Create one in a company different than the company currency It crashes. And the currency of the journal entry is incorrect. opw-2211127 Forward-Port-Of: odoo/enterprise#9165
Steps to reproduce the bug: - Let's consider that the current company C is in United States - Let's consider a product template PT with two variants V1 and V2 - V1 has a weight of 10kg per Unit and its purchase unit is Unit - Create a bill B for a Vendor V (in Belgium) with 10 Units of V1 - Set the intrastat country to Belgium and validate B Bug: In the intrastat report, the weight of V1 to Belgium was equal to 0 instead of 100kg (10 Units * 10 kg) opw:2200954 Forward-Port-Of:
Original PR description
Steps to reproduce the bug: - Let's consider that the current company C is in United States - Let's consider a product template PT with two variants V1 and V2 - V1 has a weight of 10kg per Unit and its purchase unit is Unit - Create a bill B for a Vendor V (in Belgium) with 10 Units of V1 - Set the intrastat country to Belgium and validate B Bug: In the intrastat report, the weight of V1 to Belgium was equal to 0 instead of 100kg (10 Units * 10 kg) opw:2200954 Forward-Port-Of: odoo/enterprise#8929