Friday, June 5, 2020
27 changes · master
Enhancements to existing features
Digest emails are redesigned to be more engaging, with clearer sections, better tips, daily delivery options, and mobile guidance. The update also adds and refreshes tips across apps to encourage feature adoption, while making digest delivery more reliable if scheduled emails are missed.
Original PR description
PURPOSE Make digest email and tips more appealing. The goals of these tips are * to encourage the adoption of other apps (Did you know ?); * to make Odoo look more fun (Fun tips and tricks, young and…
PURPOSE
Make digest email and tips more appealing. The goals of these tips are
* to encourage the adoption of other apps (Did you know ?);
* to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
* to show social proof and increase trust (emphasis on already existing
projects / customers to);
SPECIFICATIONS: DIGEST TEMPLATE
Improve template according to FP specifications, aka
Header
Up to 2 tips
KPIs
Want to customize?
Mobile Tip
Footer
SPECIFICATIONS: QWEB TEMPLATE
Digest now uses qweb views instead of a standard mail.template record for
rendering as
* template is very custom;
* probability of breaking it while edition the mail template is high;
it is easier to maintain and extend in qweb;
* only body was really used, other mail-related fields were not used;
We therefore remove the mail template data and the field used for it on
the digest model. Template is now forced to a Qweb view.
We can also remove the template_id field. Indeed we think that having
different templates for digests is a really advanced use case we do not
want to support.
SPECIFICATIONS: DELAY BEFORE SENDING
In this commit we introduce a way to set a delay before sending a tip.
Using a new field, a tip can be send a few days after its module installation.
This require to store the source module on the tip itself. When installed
from data it will be automatically filled using its xml_id if not set
SPECIFICATIONS: TIPS
Improve tips content and display according to FP specifications.
LINKS
Task ID 2197417
Community PR odoo/odoo#51619
Enterprise PR odoo/enterprise#10697
Upgrade PR odoo/upgrade#1256The Point of Sale IoT Box image is updated to work with Raspberry Pi 4 hardware using Raspbian Buster. This helps businesses run POS-connected devices on newer Raspberry Pi equipment, with display handling adjusted for the newer environment.
Original PR description
With this PR we can use the IoT Box with the new Raspberry Pi 4 B 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
This update makes it clearer how to add content snippets in the web editor by changing the visual behavior when a snippet is selected. The snippet now rotates on click and better follows the mouse position, helping users understand and complete drag-and-drop actions more easily.
Original PR description
Ease the understanding of the drag'n drop of a snippet. Users test have demonstrated that one doesn't understand how to add a snippet on the page. * Rotate the snippet once clicked, as it is for tasks in project application. * Keep the position of the mouse. task-2261817 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website forms and newsletter signups can now use reCAPTCHA v3 to reduce automated spam submissions. Administrators get configuration options, and visitors receive clearer error messages when a form cannot be submitted.
Original PR description
add recaptchaV3 support on website_form and newsletter subscribtion task-2217980 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Belgian accounting setup has been refreshed using National Bank of Belgium references to fill missing accounts and make income and expense categories more consistent. Account names are now available in Belgium's three official languages plus English, improving usability for Belgian businesses and advisors.
Original PR description
Task [2213348](https://www.odoo.com/web#id=2213348&action=333&active_id=967&model=project.task&view_type=form&cids=1&menu_id=4720) There where missing accounts and the CoA was not consistent (like some income accounts but not the expense counterpart). We chose to take the accounts from the National Bank of Belgium, and took the opportunity to translate all the accounts in the 3 official languages of Belgium + english. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website pagination now supports links that must be opened through a form submission instead of a normal page link. This helps visitors continue navigating portal and blog pages smoothly after route behavior changes.
Original PR description
As we introduced postlinks, some routes are no longer compatible with GET requests anymore. Some of those routes were using the pager which only send GET request. In order to make the pager comptabile, we're addding a way to use postlinks in the pager. task-2250385 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website editors can now crop images directly on the page and adjust image quality and width from the left panel, instead of opening separate pop-up windows. This makes editing faster, less disruptive, and gives users a clearer preview of the final image and file size.
Original PR description
Previously, cropping an image was done inside of a modal window, turning it into an inline widget makes the editor feel more integrated and allows you to better see the result of cropping directly in the page, it's also less intrusive to the user's edition workflow. At the same time, the way cropped images are saved was refactored to use the new original_id field on ir_attachment, as the old system was creating problems. task-2248182 In continuity with the inline crop, in an effort to make the image workflow as seamless as possible in the website editor, the image optimization feature has been moved out of the modal which could be opened through the media-dialog and into the left panel. This commit adds a quality slider and a width selector, as well as a preview of the image's weight to the left panel, and removes the image_optimize dialog. task-2192755
Digest emails and in-app tips were refreshed to be more appealing, clearer, and better aligned with the updated email design. The change helps promote app adoption, make Odoo feel more lively, and improve trust by highlighting useful examples and business value.
Original PR description
PURPOSE
Make digest email and tips more appealing. The goals of these tips are
* to encourage the adoption of other apps (Did you know ?);
* to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
* to show social proof and increase trust (emphasis on already existing
projects / customers to);
SPECIFICATIONS
Rewrite tips to make them more inline with new digest template. Rewrite
KPIs computation while converting digest template to QWeb.
See community odoo/odoo#51619 PR for more details.
LINKS
Task ID 2197417
Community PR odoo/odoo#51619
Enterprise PR odoo/enterprise#10697
Upgrade PR odoo/upgrade#1256Website helpdesk contact forms have been adjusted to work with the latest CAPTCHA validation changes. This helps keep form submissions protected from automated spam while preserving the customer support request flow.
Original PR description
Adapt website_form related controllers to recaptcha changes Related to: https://github.com/odoo/odoo/pull/48466 task-2217980
Resolved issues and error corrections
This fix prevents the website editor from getting stuck when an error happens during saving. Users can continue working instead of being locked out by a crash caused by incorrect error handling.
Original PR description
An error has been introduced by [1]. Indeed `response.data` does not exist, but `response.message.data` does. However, the whole `if` clause there seems now useless so this commit removes it. The whole file is being refactored anyway with the new editor. [1]: https://github.com/odoo/odoo/commit/ab4000fb3cf8fa54ba714ceceec391b78d73755e#diff-b1b550326b2d36a24e94e52c3901d1fbL513
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
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.
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