Wednesday, July 22, 2020
26 changes · master
Resolved issues and error corrections
Project settings can now be saved after turning off Planning and Timesheets without triggering an error. This prevents disruption for users changing configuration options and keeps related stock settings working normally.
Original PR description
Steps to reproduce: - go to Project > Configuration > Settings - unselect planning + timesheets and save Observed behavior: the following traceback is generated TypeError: Composed elements must be Composable, got 'project_worksheet_template_res_company_rel' instead LINKS: PR: #54728 Task-id: 2297047
This fixes an issue where the helper message for an empty Kanban view could reappear after creating a record in a grouped view. Business users will see a cleaner, less confusing interface because the message is now shown only when there are no records at all.
Original PR description
before this commit, In a grouped kanban view, when the record is created, the no content helper reappears, whereas it shouldn't. this commit fixes the issue and now no content helper only appears when there is no record in kanban view. task - 2294300 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
- Create a product with routes MTO + Buy. - Create a vendor pricelist with a minimum quantity: Min. Qty 1000 for 10 USD - Create a SO, sell 1000 quantity => A PO is created automatically in draft. - Go back to SO and update quantity to 1200. The following message pops up: "There is no matching vendor price to generate the purchase order for product..." We select the supplier based on the procurement quantity, which is lower than the minimum quantity of the supplier. To avoid
Original PR description
- Create a product with routes MTO + Buy. - Create a vendor pricelist with a minimum quantity: Min. Qty 1000 for 10 USD - Create a SO, sell 1000 quantity => A PO is created automatically in draft. - Go back to SO and update quantity to 1200. The following message pops up: "There is no matching vendor price to generate the purchase order for product..." We select the supplier based on the procurement quantity, which is lower than the minimum quantity of the supplier. To avoid this situation, we fall back on any supplier like it was the case in v12. opw-2297001 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#54513
The tax mapping is only readable by internal users. As the calling method can be used by portal routes, we should browse the fiscal position in sudo mode. Forward-Port-Of: odoo/odoo#54461
Original PR description
The tax mapping is only readable by internal users. As the calling method can be used by portal routes, we should browse the fiscal position in sudo mode. Forward-Port-Of: odoo/odoo#54461
- Since the wizards now requires ACLs, the access rights set on the lead forward partner and the lead assignation are incorrect. Only the Sales/Administrator are able to use them. With this commit we introduce the intended behavior where the sales are able to perform those tasks. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54484
Original PR description
- Since the wizards now requires ACLs, the access rights set on the lead forward partner and the lead assignation are incorrect. Only the Sales/Administrator are able to use them. With this commit we introduce the intended behavior where the sales are able to perform those tasks. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54484
In #45174, the original_id field was added on ir.attachment, so that derived images in the web-editor (cropped, resized, optimized, ...) could keep a trace of the original, such that if the user wanted to revert it or change the crop/size/optimization parameter, we could do it from the original again so that for example the quality can be increased or the crop region made bigger. The addition of this self-referencing many2one from ir.attachment to itself however will cause DELETE querie
Original PR description
In #45174, the original_id field was added on ir.attachment, so that derived images in the web-editor (cropped, resized, optimized, ...) could keep a trace of the original, such that if the user…
In #45174, the original_id field was added on ir.attachment, so that derived images in the web-editor (cropped, resized, optimized, ...) could keep a trace of the original, such that if the user wanted to revert it or change the crop/size/optimization parameter, we could do it from the original again so that for example the quality can be increased or the crop region made bigger. The addition of this self-referencing many2one from ir.attachment to itself however will cause DELETE queries on ir.attachment to do a sequential scan on the table to update potential records referencing the deleted record in their original_id field. As the ir.attachment table tends to be one of the biggest tables in production databases (millions of records), this scan can take multiple seconds per DELETE operation, and since attachments are used everywhere in odoo to represent files, DELETE operations on them are frequent. Adding an index on the original_id field should make these DELETE operations substantially faster (scaling with the log of the number of filled original_id fields, which will be very small, instead of scaling linearly with number of records) Forward-Port-Of: odoo/odoo#54659
RATIONALE Event will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff and have a smooth integration in a stable version (13.3). PURPOSE Purpose of this merge is to clean visitor synchronization and tests. It prepares further improvements to visitor model linked to Event Online. SPECIFICATIONS Clean existing visitor tests. Use HttpCaseWithUserDemo. Make
Original PR description
RATIONALE Event will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff…
RATIONALE Event will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff and have a smooth integration in a stable version (13.3). PURPOSE Purpose of this merge is to clean visitor synchronization and tests. It prepares further improvements to visitor model linked to Event Online. SPECIFICATIONS Clean existing visitor tests. Use HttpCaseWithUserDemo. Make tests independent from existing database data, notably existing visitors. Currently if any visitor is present in db tests crash as they are badly designed. Introduce a mock for visitor from request allowing to shortcut some visitor / user synchronization and test directly expected results without too much boilerplate in tests. Add anchor methods to somehow merge visitors and update partner linked to visitors and their sub records. In this stable we cannot remove current unlink of duplicate visitors due to constraint of partner_id / visitor_id. However those methods allow to tweak behavior by override. This will be done in future tasks. Introduce a new configuration parameter in website allowing to set number of days before de-activating visitors: ``website.visitor.live.days`` . It is set to 30 days instead of 7 as before. See sub commits for more details LINKS Task ID 2290016 (improve visitor synchronization and tests) Prepares Task ID 2252655 (main Online Event task) Prepares Task ID 2284043 (Visitor-based track wishlist) PR odoo/odoo#54036 Forward-Port-Of: odoo/odoo#54036
The customer display was not refreshed when changing the amount of a payment line. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54739
Original PR description
The customer display was not refreshed when changing the amount of a payment line. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54739
You can see on example below the updated line that it's module_name and not model_name ``` <!-- security --> <record id="module_name_group_user" model="res.groups"> ... </record> ```  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
Original PR description
You can see on example below the updated line that it's module_name and not model_name
```
<!-- security -->
<record id="module_name_group_user" model="res.groups">
...
</record>
```

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#54705Improve empty screen in stock, mrp, and pruchase. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54415
Original PR description
Improve empty screen in stock, mrp, and pruchase. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54415
**PURPOSE** Some components(ActivityCell, ColumnProgressBar, etc.) of the activity view should be updated based on activity changes **SPECIFICATION** Update legacy widget from owl component, one needs to override 'renderWidget' and 'updateWidget' instead of render and update method as this has been changed from commit https://github.com/odoo/odoo/commit/f2de55322e4d417815e6757517163dd0cff544cc **LINKS** PR https://github.com/odoo/odoo/pull/54734 Task-2238551 -- I con
Original PR description
**PURPOSE** Some components(ActivityCell, ColumnProgressBar, etc.) of the activity view should be updated based on activity changes **SPECIFICATION** Update legacy widget from owl component, one needs to override 'renderWidget' and 'updateWidget' instead of render and update method as this has been changed from commit https://github.com/odoo/odoo/commit/f2de55322e4d417815e6757517163dd0cff544cc **LINKS** PR https://github.com/odoo/odoo/pull/54734 Task-2238551 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54734
Before this commit, a correct answer could have no score (=0). This was leading to a mismatch between final score (0%) but still having all the answer flaged as correctly answered. After this commit, when (un)setting the is_correct flag on question answers, the answer score is (un)set. 1 if is correct, 0 if is not correct. User can still set another score > 1. Also, a contraint has been added to avoid saving correct answers without score. Task ID: 2176630 Forward-Port-Of: odoo/odoo#
Original PR description
Before this commit, a correct answer could have no score (=0). This was leading to a mismatch between final score (0%) but still having all the answer flaged as correctly answered. After this commit, when (un)setting the is_correct flag on question answers, the answer score is (un)set. 1 if is correct, 0 if is not correct. User can still set another score > 1. Also, a contraint has been added to avoid saving correct answers without score. Task ID: 2176630 Forward-Port-Of: odoo/odoo#51387 Forward-Port-Of: odoo/odoo#49703
task-2282370 Forward-Port-Of: odoo/odoo#54220
Original PR description
task-2282370 Forward-Port-Of: odoo/odoo#54220
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes and preparatory cleaning commits. SPECIFICATIONS event_sale: do not copy SO information when duplicating a registration. Indeed it makes no sense and leads to incoherent billing information. website_event: fix ACL issue when
Original PR description
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes and preparatory cleaning commits. SPECIFICATIONS event_sale: do not copy SO information when duplicating a registration. Indeed it makes no sense and leads to incoherent billing information. website_event: fix ACL issue when updating menus through event fields while not being website editor. website_sale: fix visitor tests, make them independent from demo data. LINKS Task ID-2300907 (Event Bugprovements 2) Prepares Task ID-2283796 (Event B2Basics) Prepares Task ID-2252655 (master Online Event task) Forward-Port-Of: odoo/odoo#54627 Forward-Port-Of: odoo/odoo#54621
Clicking on the delete button of custom snippets was not working anymore since [1]. Indeed, that button is placed inside the snippet thumbnail which is the drag handle for the drag and drop feature. Since we now start the drag as soon as the mouse is mousedown-ed, then the click on the delete button cannot be intercepted. This commit solves the problem by placing the delete button out of the thumbnail element. [1]: https://github.com/odoo/odoo/commit/ab72fe6c4681f62dc670f1cf1ac6fa47ab
Original PR description
Clicking on the delete button of custom snippets was not working anymore since [1]. Indeed, that button is placed inside the snippet thumbnail which is the drag handle for the drag and drop feature. Since we now start the drag as soon as the mouse is mousedown-ed, then the click on the delete button cannot be intercepted. This commit solves the problem by placing the delete button out of the thumbnail element. [1]: https://github.com/odoo/odoo/commit/ab72fe6c4681f62dc670f1cf1ac6fa47abd301f6 Forward-Port-Of: odoo/odoo#54743
Commit 987951a8d44276d76856 moved the CSS file from `point_of_sale` to `pos_hr`. A file was forgotten. opw-2293465 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#54749
Original PR description
Commit 987951a8d44276d76856 moved the CSS file from `point_of_sale` to `pos_hr`. A file was forgotten. opw-2293465 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#54749
On a chatter portal, when the user is using access token to display record and is not connected, the message will be posted as the record partner_id. But then the preview of avatar in the composer is wrong: you see a broken image (because you don't have access to "public user" partner avatar) and when you post it anyway you see the avatar of the record partner and not public user. In this commit, if we are seeing the record with token and are logged out as public user, we will not show the ava
Original PR description
On a chatter portal, when the user is using access token to display record and is not connected, the message will be posted as the record partner_id. But then the preview of avatar in the composer is wrong: you see a broken image (because you don't have access to "public user" partner avatar) and when you post it anyway you see the avatar of the record partner and not public user. In this commit, if we are seeing the record with token and are logged out as public user, we will not show the avatar in composer. (note: before 13.0, the "public user" partner avatar was working) opw-2276498 Forward-Port-Of: odoo/odoo#54720
Create a product category with no accounts defined Create a product [DEMO] in such category with no account defined Create an invoice with the default journal which will have the default account Create an invoice line with [DEMO] Upon selecting the product the default account taken from the journal get cleared and there will be no replacement. Since the account field is mandatory the account should be preserved opw-2299228 -- I confirm I have signed the CLA and read the PR guidel
Original PR description
Create a product category with no accounts defined Create a product [DEMO] in such category with no account defined Create an invoice with the default journal which will have the default account Create an invoice line with [DEMO] Upon selecting the product the default account taken from the journal get cleared and there will be no replacement. Since the account field is mandatory the account should be preserved opw-2299228 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54660
- type has been renamed to move_type - l10n_latam_use_documents is not writeable 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#54678 Forward-Port-Of: odoo/odoo#54669
Original PR description
- type has been renamed to move_type - l10n_latam_use_documents is not writeable 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#54678 Forward-Port-Of: odoo/odoo#54669
- The upsell wizard access rights allow only `Sales/Administrator` to perform a create. Meaning Sales that are not administrator aren't able to create upsells. This is not an intended change, with this commit we reintroduce the correct behavior where sales are able to create upsells. Forward-Port-Of: odoo/enterprise#11845
Original PR description
- The upsell wizard access rights allow only `Sales/Administrator` to perform a create. Meaning Sales that are not administrator aren't able to create upsells. This is not an intended change, with this commit we reintroduce the correct behavior where sales are able to create upsells. Forward-Port-Of: odoo/enterprise#11845
action_assign was sometime called before confirming the MO meaning it had no effect since the moves were still in draft state. Forward-Port-Of: odoo/enterprise#11901 Forward-Port-Of: odoo/enterprise#11807
Original PR description
action_assign was sometime called before confirming the MO meaning it had no effect since the moves were still in draft state. Forward-Port-Of: odoo/enterprise#11901 Forward-Port-Of: odoo/enterprise#11807
…after working hours - Install Helpdesk - Confugure working hours with values that are earlier than current time for every working days (For example, if the current time is 11:00, sets 03:00 - 10:00 for working hours) - Go to Helpdesk > Configuration > SLA Policies and create a SLA Policy: * Team: "Customer Care" * Reach Stage: Solved * Reach In: 1 day 0 hour - Go to Helpdesk > Configuration > Helpdesk Teams and configure "Customer Care" team: * Activate SLA Policies * Sele
Original PR description
…after working hours - Install Helpdesk - Confugure working hours with values that are earlier than current time for every working days (For example, if the current time is 11:00, sets 03:00 - 10:00…
…after working hours
- Install Helpdesk
- Confugure working hours with values that are earlier than current time for every working days
(For example, if the current time is 11:00, sets 03:00 - 10:00 for working hours)
- Go to Helpdesk > Configuration > SLA Policies and create a SLA Policy:
* Team: "Customer Care"
* Reach Stage: Solved
* Reach In: 1 day 0 hour
- Go to Helpdesk > Configuration > Helpdesk Teams and configure "Customer Care" team:
* Activate SLA Policies
* Select the previously configured calendar with our working hours
- Go to Helpdesk > Overview and create a new ticket for "Customer Care"
The deadline is computed with 1 extra day.
The deadline is computed in the following way:
- If SLA Policy contains days,
1) plan_days is executed with the SLA Policy days, returning the correct day for the deadline with the end time of the working day
2) the time of the deadline is set to the time of the ticket creation
- In all cases,
3) plan_hours is executed with the SLA Policy hours, returning the final deadline
(adding SLA Policy hours and making sure that deadline is within working hours)
In our case, at the end of step 2, the correct time should be the start time of the working day.
Instead, we have the time of the ticket creation which is later than the end time of the working day.
And to finish, step 3 returns the first valid datetime, which is the start date of the following working day;
resulting on 1 extra day for the deadline.
To prevent this, the time is set to 0:00 in step 2 if the time of the ticket creation is later
than the end time of the working day.
And then, the deadline is set to the start time of the current working day in step 3.
opw-2287201
Forward-Port-Of: odoo/enterprise#11821
Forward-Port-Of: odoo/enterprise#11704Add no-content helper to Master Production Schedule. Forward-Port-Of: odoo/enterprise#11850
Original PR description
Add no-content helper to Master Production Schedule. Forward-Port-Of: odoo/enterprise#11850
The range for receivable/payable accounts was wrong. This lead to having the tax_id not correctly set on some lines, and the total amount on invoices to be badly computed, making it impossible to post it (negative amounts when positive were wanted). Forward-Port-Of: odoo/enterprise#11839 Forward-Port-Of: odoo/enterprise#11424
Original PR description
The range for receivable/payable accounts was wrong. This lead to having the tax_id not correctly set on some lines, and the total amount on invoices to be badly computed, making it impossible to post it (negative amounts when positive were wanted). Forward-Port-Of: odoo/enterprise#11839 Forward-Port-Of: odoo/enterprise#11424
Recent versions of libsass now crash on improper CSS that would have silently failed in the past. eg: :last-child() :first-child() => should not be followed by parenthesis They throw an unclear error message like this one: ``` Error: Custom property values may not be empty. on line 4092:23 of /stdin >> &:last-child() { ``` This commit fixes our CSS to prevent the error message from popping and breaking the SCSS compilation. Tested with the follow
Original PR description
Recent versions of libsass now crash on improper CSS that would have silently failed in the past. eg: :last-child() :first-child() => should not be followed by parenthesis They throw an unclear error…
Recent versions of libsass now crash on improper CSS that would
have silently failed in the past.
eg: :last-child() :first-child()
=> should not be followed by parenthesis
They throw an unclear error message like this one:
```
Error: Custom property values may not be empty.
on line 4092:23 of /stdin
>> &:last-child() {
```
This commit fixes our CSS to prevent the error message from popping and
breaking the SCSS compilation.
Tested with the following versions of python-libsass (installed with
pip): 0.12, 0.17.0, 0.18.0, 0.19.0, 0.20.0, this fix is meant to be
retrocompatible.
Side note:
It also appears that Ubuntu packages do not ship the exact same version
of the underlying "libsass", it begins to fail with the ones available in
Ubuntu 20.04
opw-[2299465](https://www.odoo.com/web?debug=1#action=333&active_id=49&id=2299465&menu_id=4720&model=project.task&view_type=form)
Forward-Port-Of: odoo/enterprise#11902
Forward-Port-Of: odoo/enterprise#11881- Install account_accountant, l10n_lu and l10n_lu_reports - Go to Accounting > Configuration > Financial Reports - Open "Balance Sheet" with "Accounting/Reporting/Luxembourg" as Parent Menu - Open the following sections from Report Lines: CAPITAL, RESERVES AND LIABILITIES > C. Creditors - Open the following sections: * 1. Debenture loans * 2. Amounts owed to credit institutions * 3. Payments received on account of orders in so far as they are shown separately as deductions from s
Original PR description
- Install account_accountant, l10n_lu and l10n_lu_reports - Go to Accounting > Configuration > Financial Reports - Open "Balance Sheet" with "Accounting/Reporting/Luxembourg" as Parent Menu - Open the following sections from Report Lines: CAPITAL, RESERVES AND LIABILITIES > C. Creditors - Open the following sections: * 1. Debenture loans * 2. Amounts owed to credit institutions * 3. Payments received on account of orders in so far as they are shown separately as deductions from stocks The formulas to compute these sections are wrong. Instead of summing all sub-sections, it sums 2 times the first one. opw-2272359 Forward-Port-Of: odoo/enterprise#11928 Forward-Port-Of: odoo/enterprise#11871