Friday, May 27, 2022
15 changes · master
Enhancements to existing features
This update tidies the Sales app's internal access rule records by removing duplicates and misleading labels. It does not change what sales teams or managers can do, but makes the permissions setup clearer and easier to maintain.
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The website now records visits to missing pages in Plausible analytics. This helps teams identify broken links or missing redirects so they can fix common dead ends and improve the visitor experience.
Original PR description
This Goal will help end user to find most 404 hits and fix the legits one... Fixing typo, creating missing redirect, or fixing code. We need to cast the event-name since plausible only accept 'string' as custom event name, so if we push 404 instead of '404' the event crash. 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
Resolved issues and error corrections
This fix reduces unnecessary internal refresh work when updating module dependencies. It helps keep module updates more efficient without changing what business users see or how they work.
Original PR description
This follows up https://github.com/odoo/odoo/pull/87527.
Miscellaneous changes
**Steps to reproduce the bug:** - Create a storable product “P1”: - Standard price: 20$ - Add vendor in the Purchase tab: - name: Azure Interior - min qty: 10 - price: $15 - Create a PO: - Vendor: "Azure Interior" - Product line: “P1” Automatically, the Quantity field will automatically get populated as 10 Units and price:$15 as per the pricelist - Confirm the PO A picking will be created containing a stock_move with a price of $15 and a Q
Original PR description
**Steps to reproduce the bug:** - Create a storable product “P1”: - Standard price: 20$ - Add vendor in the Purchase tab: - name: Azure Interior - min qty: 10 - price: $15 - Create a PO: - Vendor:…
**Steps to reproduce the bug:**
- Create a storable product “P1”:
- Standard price: 20$
- Add vendor in the Purchase tab:
- name: Azure Interior
- min qty: 10
- price: $15
- Create a PO:
- Vendor: "Azure Interior"
- Product line: “P1”
Automatically, the Quantity field will automatically get populated as 10 Units
and price:$15 as per the pricelist
- Confirm the PO
A picking will be created containing a stock_move with a price of $15 and a QTY of 10
- Edit the Quantity to 9 Units and save the PO
The price will be updated to $20 on the PO line, but not in the `stock.move`
**Problem:**
When we update the qty in the PO line, a new move with a quantity of “-1” and
a price of “$20” will be created. Then, it will be merged with the initial move, but since they are not identical in the price,
we can't merge them, so a new picking is created:
https://github.com/odoo/odoo/blob/dda9700d8236091626cbd78efc0ca4116e1e1acd/addons/stock/models/stock_move.py#L869-L881
**Solution:**
when the price is updated in a PO line, the price of its linked `stock.move` must also be updated
opw-2825160
https://user-images.githubusercontent.com/78867936/168018035-daf64350-082c-4ccf-969c-2866733e6290.mp4
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#91801
Forward-Port-Of: odoo/odoo#91016Current behavior: When selling a product that have a taxe set in a PoS, the sale report was not correct. The collumn untaxed amount to invoice would contains the amount to invoice that includes the taxes wich is not correct. Steps to reproduce: - Install sales & pos - Set the Acoustic bloc screen tax to 15% - Open a pos session and Sell an acoustic bloc screen - Validate the payment and close the session - Open the sales app - Sell an acoustic bloc screen to any customer - Deliver i
Original PR description
Current behavior: When selling a product that have a taxe set in a PoS, the sale report was not correct. The collumn untaxed amount to invoice would contains the amount to invoice that includes the taxes wich is not correct. Steps to reproduce: - Install sales & pos - Set the Acoustic bloc screen tax to 15% - Open a pos session and Sell an acoustic bloc screen - Validate the payment and close the session - Open the sales app - Sell an acoustic bloc screen to any customer - Deliver it (update it's quantity if necessary) - Sales > Reporting > Sales - Switch to the pivot view - On the "measures" button, check "Untaxed Amount Invoiced" and "Untaxed Amount To Invoice" - Show the entries by Order# - "Untaxed amount to invoice" should be the same as "untaxed total" opw-2681477 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#91213
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#92259
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#92259
For some editor options, interacting with them and clicking on the editor save button while they were still focused caused a deadlock. As an example: - Drag & drop the "Dynamic Products" snippet - Change the "Speed" option value and keep the input focused - Click on the editor "Save" button => Deadlock Funny enough: if you click slowly (mousedown -> wait -> mouseup), the bug does not happen. This was because this happened in that case: 1) Mousedown on the save button. 2) Foc
Original PR description
For some editor options, interacting with them and clicking on the editor save button while they were still focused caused a deadlock. As an example: - Drag & drop the "Dynamic Products" snippet -…
For some editor options, interacting with them and clicking on the
editor save button while they were still focused caused a deadlock.
As an example:
- Drag & drop the "Dynamic Products" snippet
- Change the "Speed" option value and keep the input focused
- Click on the editor "Save" button
=> Deadlock
Funny enough: if you click slowly (mousedown -> wait -> mouseup), the
bug does not happen.
This was because this happened in that case:
1) Mousedown on the save button.
2) Focusout of the option's input -> the option's method is called.
3) The DOM is edited and the public widgets are restarted, which is an
async operation. The dynamic products widget starts an RPC to render
its content.
4) Mouseup (click) on the save button.
5) The editor immediately asks to destroy public widgets, this is a
synchronous operation.
6) The rpc made at (3) finishes... but the result never reaches the
widget as the ajax service does not let it be done for destroyed
widgets (and the widget was destroyed at (5)).
7) The editor starts saving the content.
=> The editor gets stuck because before saving the content it waits
for the general mutex of the editor to be unlocked... which is
never the case because it is waiting for (3) to finish but never
is marked as finished because the rpc is ignored at (6).
The problem actually is step (5) which should not happen. Indeed
destroying the public widgets is already done by another portion of
code at the appropriate time during the editor panel 'cleanForSave'.
That part was indeed indirectly and recently fixed by [1], ensuring
destroying widgets is only started when the general mutex is already
unlocked.
So, currently, the public widgets are destroyed two times: one too soon
which happens to work by chance most of the time and one at the proper
time (but which did nothing since a while because widgets were already
destroyed). This too-soon step (5) exists since [2] and was apparently
added alongside the existing mechanism for no apparent reason. It was
actually already done in 13.0, but as the editor panel was totally
different at the time, with no mutex ensuring the order of operations,
there should not be any problem having a random double widget destroy.
If a bug actually is reported, this could be backported.
This commit disables the public widget destruction made at step (5)
with a minimal stable diff.
[1]: https://github.com/odoo/odoo/commit/508332963202090bace0a3c877574132063c29a6
[2]: https://github.com/odoo/odoo/commit/f296992317e96562c66bd7ad59a5080d6c551ed5
Related to opw-2767903
Forward-Port-Of: odoo/odoo#92000
Forward-Port-Of: odoo/odoo#91791following commit 55398263f9297ab2709e4c4c2a9c6c3ee7f59c8a Introduce a new param to fix a notification issue. However we could use the context instead of a new parameter in order to avoid breaking the customization. Linked to PR #88303 discussion Forward-Port-Of: odoo/odoo#92305 Forward-Port-Of: odoo/odoo#91530
Original PR description
following commit 55398263f9297ab2709e4c4c2a9c6c3ee7f59c8a Introduce a new param to fix a notification issue. However we could use the context instead of a new parameter in order to avoid breaking the customization. Linked to PR #88303 discussion Forward-Port-Of: odoo/odoo#92305 Forward-Port-Of: odoo/odoo#91530
… violation The constraint is added in `hr_payroll`, checking that if `is_unforeseen` is True, then so must be `is_leave`. To reproduce the error simply install `hr_payroll`, edit Work Entry Type Attendance to set as unforeseen absence and upgrade the module `hr_work_entry_contract`. 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
… violation The constraint is added in `hr_payroll`, checking that if `is_unforeseen` is True, then so must be `is_leave`. To reproduce the error simply install `hr_payroll`, edit Work Entry Type Attendance to set as unforeseen absence and upgrade the module `hr_work_entry_contract`. 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#91736
Using customization, if you add a field on `mail.template` with a `groups=` attribute with a group your regular users do not belong to, e.g. `groups="base.group_system"`, the users will have an access error when attempting to read the given field when checking if the template is dynamic, with the `_is_dynamic` method. We could restrict the list of fields to read/check to the fields the user has access, but that means a user could duplicate a template with code in the fields he cannot s
Original PR description
Using customization, if you add a field on `mail.template` with a `groups=` attribute with a group your regular users do not belong to, e.g. `groups="base.group_system"`, the users will have an access error when attempting to read the given field when checking if the template is dynamic, with the `_is_dynamic` method. We could restrict the list of fields to read/check to the fields the user has access, but that means a user could duplicate a template with code in the fields he cannot see. So, read the field has sudo to make sure they do not contain code is the way to go. Forward-Port-Of: odoo/odoo#90894
The `l10n_de_stnr` (Steuernummer) and `l10n_de_widnr` (Wirtschafts-Identifikationsnummer) are not mandatory anymore for Fiskaly Forward-Port-Of: odoo/enterprise#27794
Original PR description
The `l10n_de_stnr` (Steuernummer) and `l10n_de_widnr` (Wirtschafts-Identifikationsnummer) are not mandatory anymore for Fiskaly Forward-Port-Of: odoo/enterprise#27794
The default background was not getting applied on updated database and was showing a blank image. TaskID: 2863813 Forward-Port-Of: odoo/enterprise#27795
Original PR description
The default background was not getting applied on updated database and was showing a blank image. TaskID: 2863813 Forward-Port-Of: odoo/enterprise#27795
Forward-Port-Of: odoo/enterprise#27752
Original PR description
Forward-Port-Of: odoo/enterprise#27752
#### The issue In the invoice cancellation request, the <ReferenceDate> field should be the related invoice’s issue date. At the moment, it is set to the issue date of the cancellation request. This causes Digiflow (the OSE) to return an error in the cancellation CDR, like this: ``` <cbc:ResponseCode listAgencyName="PE:SUNAT">2375</cbc:ResponseCode> <cbc:Description>Fecha de emision del comprobante no coincide con la fecha de emision consignada en la comunicación Detalle: ' ticket: 2
Original PR description
#### The issue In the invoice cancellation request, the <ReferenceDate> field should be the related invoice’s issue date. At the moment, it is set to the issue date of the cancellation request. This…
#### The issue In the invoice cancellation request, the <ReferenceDate> field should be the related invoice’s issue date. At the moment, it is set to the issue date of the cancellation request. This causes Digiflow (the OSE) to return an error in the cancellation CDR, like this: ``` <cbc:ResponseCode listAgencyName="PE:SUNAT">2375</cbc:ResponseCode> <cbc:Description>Fecha de emision del comprobante no coincide con la fecha de emision consignada en la comunicación Detalle: ' ticket: 20210000000000193100584 error: Doc:[[1-FFRE-1],] fechaDoc: 2021-12-09 fechaRepo:2021-12-13 '</cbc:Description> ``` #### The fix Set the ReferenceDate field to the related invoice’s issue date. #### How to test it 1. Create a fresh v14 db with l10n_pe_edi: `odoo-bin -d testing-pe-v14 -i l10n_pe_edi` 2. In both https://github.com/odoo/enterprise/blob/14.0/l10n_pe_edi/tests/test_edi_iap.py and https://github.com/odoo/enterprise/blob/14.0/l10n_pe_edi/tests/test_edi_digiflow.py create a new UT from this gist: https://gist.github.com/antoine162/2af12b855434245cfc1295b7e6115d39 (I have written this as a gist rather than as a new UT because this is quite a corner case. But, if needed, I can make a UT out of this.) 3. Run the new UTs: `odoo-bin -d testing-pe-v14 --test-tags='*.test_reproduce_error_fecha_no_coincida' --st` 4. Without this fix the UTs should fail, after this fix they should pass. #### Related support ticket opw-2725105 Forward-Port-Of: odoo/enterprise#27561
In case charges are specified at NtryDtls level, the corresponding Amt element does not include the charges in the amount. In some files, this element is sometimes not even specified, but only Amt element at Ntry level is present. We should always look at this element in that case, as it will always be present and include charges. opw-2783889 Forward-Port-Of: odoo/enterprise#27478 Forward-Port-Of: odoo/enterprise#27045
Original PR description
In case charges are specified at NtryDtls level, the corresponding Amt element does not include the charges in the amount. In some files, this element is sometimes not even specified, but only Amt element at Ntry level is present. We should always look at this element in that case, as it will always be present and include charges. opw-2783889 Forward-Port-Of: odoo/enterprise#27478 Forward-Port-Of: odoo/enterprise#27045