Friday, June 5, 2020
17 changes · master
Resolved issues and error corrections
The website editor now blocks users from pressing Save again while a save is already in progress. This helps avoid duplicate save attempts that could cause confusion or inconsistent website editing behavior.
Original PR description
While waiting for a better and more robust fix in the editor itself, this prevents to hit the save button of the website editor while a save is in progress.
Miscellaneous changes
Commit bca2926b013733162355879ec4190e327c1a966a introduced a fix for ir.ui.view unlinks during uninstall but forgot to return the result of the super() call to unlink which broke behaviour downstream. This commit restores the proper behavior of returning the result of the call to super. Closes #52364 Forward-Port-Of: odoo/odoo#52401 Forward-Port-Of: odoo/odoo#52390
Original PR description
Commit bca2926b013733162355879ec4190e327c1a966a introduced a fix for ir.ui.view unlinks during uninstall but forgot to return the result of the super() call to unlink which broke behaviour downstream. This commit restores the proper behavior of returning the result of the call to super. Closes #52364 Forward-Port-Of: odoo/odoo#52401 Forward-Port-Of: odoo/odoo#52390
Description of the issue/feature this PR addresses: Set the check in / check out menu first instead of kiosk. Current behavior before PR: Kiosk is first and default. Desired behavior after PR is merged: Check in / Check out is first and default TASK ID 2266096 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52095
Original PR description
Description of the issue/feature this PR addresses: Set the check in / check out menu first instead of kiosk. Current behavior before PR: Kiosk is first and default. Desired behavior after PR is merged: Check in / Check out is first and default TASK ID 2266096 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52095
These views are part of the new snippet compatibility system and should be deactivated. They only remain for compatibility. active is a noupdate field so all deactivated views will remain active when updating to this version. Only new install will have the views deactivated. task-2250388 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#50988
Original PR description
These views are part of the new snippet compatibility system and should be deactivated. They only remain for compatibility. active is a noupdate field so all deactivated views will remain active when updating to this version. Only new install will have the views deactivated. task-2250388 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#50988
- The checkout to switch to the branch of the connected DB was not processed correctly because the command used to clear the drivers failed, raising an exception: `rm: cannot remove '/home/pi/odoo/addons/hw_drivers/drivers/__pycache__': Is a directory` - The location of the drivers has been changed in master. So, even if we perform a checkout, the `addons/hw_drivers/drivers` directory doesn't exist. The `get_resource_path('hw_drivers', 'drivers')` then returned False instead of the co
Original PR description
- The checkout to switch to the branch of the connected DB was not
processed correctly because the command used to clear the drivers
failed, raising an exception:
`rm: cannot remove '/home/pi/odoo/addons/hw_drivers/drivers/__pycache__': Is a directory`
- The location of the drivers has been changed in master. So, even if we
perform a checkout, the `addons/hw_drivers/drivers` directory doesn't
exist. The `get_resource_path('hw_drivers', 'drivers')` then returned
False instead of the correct path and the extraction of the zip file
failed.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#52432- Create a new company in Settings - Check the created company in systray but keep the default one as selected - Activate Leads in CRM - Create a Lead and select an user (User A) who belongs to the default company but not the new one as Salesperson - Save the Lead - In the chatter, schedule an activity with: * Activity Type: Make Quote * Assigned to: User A (the user assigned as Salesperson) The following error will prompt: "Assigned user User A has no access to the document and
Original PR description
- Create a new company in Settings - Check the created company in systray but keep the default one as selected - Activate Leads in CRM - Create a Lead and select an user (User A) who belongs to the…
- Create a new company in Settings - Check the created company in systray but keep the default one as selected - Activate Leads in CRM - Create a Lead and select an user (User A) who belongs to the default company but not the new one as Salesperson - Save the Lead - In the chatter, schedule an activity with: * Activity Type: Make Quote * Assigned to: User A (the user assigned as Salesperson) The following error will prompt: "Assigned user User A has no access to the document and is not able to handle this activity." During the rule check, the context is evaluated (see commit: a5b6f31#diff-15c3e76db5d676523f482df45cf00446R54) which raises an AccessError for "allowed_company_ids" (see commit: 7bfcb53#diff-2c418cb78b7c562a79e7032645a537d2R599) as the context that is used is the context of the current user and not the context of User A. opw-2264224 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#52411
Issue - Open console in debugger of the browser. - Install "Employees" app - Go to "Employees" and edit or create any employee - In 'Department' field, quick create one Error is raised in console and the modal department form view is opened. Cause 'name' field is required but empty since 'complete_name' is the one set as _rec_name in 'Department' python model. Solution Cherry-pick of 7c0fed4 opw-2267356 Forward-
Original PR description
Issue
- Open console in debugger of the browser.
- Install "Employees" app
- Go to "Employees" and edit or create any employee
- In 'Department' field, quick create one
Error is raised in console and the modal department form view is opened.
Cause
'name' field is required but empty since 'complete_name'
is the one set as _rec_name in 'Department' python model.
Solution
Cherry-pick of 7c0fed4
opw-2267356
Forward-Port-Of: odoo/odoo#52468
Forward-Port-Of: odoo/odoo#52422If a mousedown event was fired over the left panel in edit mode while the mouse up was fired over the current page in edit, the focus would suddenly go at the top of the page due to pointer events. task-2210712 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#51058
Original PR description
If a mousedown event was fired over the left panel in edit mode while the mouse up was fired over the current page in edit, the focus would suddenly go at the top of the page due to pointer events. task-2210712 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#51058
Part/Fix of commit https://github.com/odoo/odoo/pull/51673 Issue The condition `default_type not in self._fields['type'].selection` always evaluate to True as the selection is list of (key, value) tuples. Solution Replace the tuples by a list of possible values. opw-2256905 Forward-Port-Of: odoo/odoo#52316
Original PR description
Part/Fix of commit https://github.com/odoo/odoo/pull/51673 Issue The condition `default_type not in self._fields['type'].selection` always evaluate to True as the selection is list of (key, value) tuples. Solution Replace the tuples by a list of possible values. opw-2256905 Forward-Port-Of: odoo/odoo#52316
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#52474
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#52474
When the route '/hw_drivers/box/connect' is called to connect an IoT Box to a DB, the checkout on the branch of the DB is not performed and incompatibility can occur. With this fix we relaunch Odoo via a parallel thread in order to be able to respond to the request... 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 Fo
Original PR description
When the route '/hw_drivers/box/connect' is called to connect an IoT Box to a DB, the checkout on the branch of the DB is not performed and incompatibility can occur. With this fix we relaunch Odoo via a parallel thread in order to be able to respond to the request... 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#52491
The view had no priority set and could be used as the default view on ir.attachment (same priority as base). The view has less information than the generic base.view_attachment_tree that are not relevant ouside of the context of google_spreadsheet Same reasons for the form view Forward-Port-Of: odoo/odoo#52487
Original PR description
The view had no priority set and could be used as the default view on ir.attachment (same priority as base). The view has less information than the generic base.view_attachment_tree that are not relevant ouside of the context of google_spreadsheet Same reasons for the form view Forward-Port-Of: odoo/odoo#52487
Issue When using the website editor in Safari browser, an error occurs when dropping the form builder thumbnail into the editor. Step to Reproduce - Install website and web_editor applications - Use Safari browser - Got to Website - Click on Edit - Drag and drop the From Builder thumbnail from the left panel into the editor Cause The javascript function Node.insertBefore(newNode, referenceNode) needs to be called on referenceNode's immediate parent. Using Docu
Original PR description
Issue When using the website editor in Safari browser, an error occurs when dropping the form builder thumbnail into the editor. Step to Reproduce - Install website and web_editor applications - Use…
Issue
When using the website editor in Safari browser, an error occurs
when dropping the form builder thumbnail into the editor.
Step to Reproduce
- Install website and web_editor applications
- Use Safari browser
- Got to Website
- Click on Edit
- Drag and drop the From Builder thumbnail from the left panel
into the editor
Cause
The javascript function Node.insertBefore(newNode, referenceNode) needs to
be called on referenceNode's immediate parent.
Using DocumentFragment.querySelector(':first-child')
returns the first child of the first element in the fragment which triggers
this issue. The reason why Chrome accepts and handles this correctly
remains a mistery to me ;o)
Solution
Call Node.insertBefore() method on the immediate parent of the
node the insertion has to be performed before.
So use .childNodes[0] instead of .querySelector(':first-child').
task-2271745
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#52464Description of the issue/feature this PR addresses: As _toggle_reconcile_to_true updates the amount_residual on unreconciled move lines linked to the account, _toggle_reconcile_to_false must set the amount_residual to 0. However as the SQL query is broken the update fails and move lines supposed to have 0 as amount_residual still have the value. Current behavior before PR: Related move lines are not updated due `= NULL` in `WHERE` clause. Desired behavior after PR is merged: Related
Original PR description
Description of the issue/feature this PR addresses: As _toggle_reconcile_to_true updates the amount_residual on unreconciled move lines linked to the account, _toggle_reconcile_to_false must set the amount_residual to 0. However as the SQL query is broken the update fails and move lines supposed to have 0 as amount_residual still have the value. Current behavior before PR: Related move lines are not updated due `= NULL` in `WHERE` clause. Desired behavior after PR is merged: Related move lines are updated using `IS NULL` in `WHERE` clause. Thanks @yvaucher for the help in finding this OPW-2257566 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52406 Forward-Port-Of: odoo/odoo#51223
When attempting to update its UI in reaction to events, summernote tries to make layout info for the event target, this relies on finding this information on one of the target's ancestors. In some cases, elements can be removed from the DOM between the moment the event was triggered, and the moment summernote attempts to create the layoutInfo, resulting in layoutInfo being null. This commit prevents tracebacks from happening in such cases by checking that a layoutInfo was actually retur
Original PR description
When attempting to update its UI in reaction to events, summernote tries to make layout info for the event target, this relies on finding this information on one of the target's ancestors. In some cases, elements can be removed from the DOM between the moment the event was triggered, and the moment summernote attempts to create the layoutInfo, resulting in layoutInfo being null. This commit prevents tracebacks from happening in such cases by checking that a layoutInfo was actually returned, and if not, aborting the UI update that relies on it. X-original-commit: c238f35171a81eba7e8b44501bd48859ead7f0cf Forward-Port-Of: odoo/odoo#52526
Create an invoice, assign a customer and create a single invoice line with product and 0% tax. Go to Accounting>General Ledger and click on "Export Datev (ZIP)". The file EXTF_accounting_entries.csv into the zip package is will report the acccounting lines. The line related to the 0% invoice is marked as "s" instead of "h". opw-2230699 Forward-Port-Of: odoo/enterprise#10950
Original PR description
Create an invoice, assign a customer and create a single invoice line with product and 0% tax. Go to Accounting>General Ledger and click on "Export Datev (ZIP)". The file EXTF_accounting_entries.csv into the zip package is will report the acccounting lines. The line related to the 0% invoice is marked as "s" instead of "h". opw-2230699 Forward-Port-Of: odoo/enterprise#10950
Adding Luxembourg intrastat report. Task : 2223158 Forward-Port-Of: odoo/enterprise#10694
Original PR description
Adding Luxembourg intrastat report. Task : 2223158 Forward-Port-Of: odoo/enterprise#10694