Thursday, July 22, 2021
18 changes · master
Enhancements to existing features
The system now reads only the action information needed to show Action and Print menus, instead of loading extra data that is not used. This slightly improves page response time and reduces data transferred when views are loaded.
Original PR description
`load_views` calls `get_bindings` to render Action and Print menu. Before this update, it read all action fields, including heavy computed fields like `search_view` (which calls fields_view_get). But in fact just few fields are used. This slighly improves response time and data size.
Resolved issues and error corrections
This fixes internal developer documentation for web notifications and popovers by restoring that certain callbacks do not return a value. It helps prevent confusion for future maintenance without changing how users experience the system.
Original PR description
odoo/odoo#74003 updated a few docstrings, half of them being the typing of callbacks to not use the TypeScript syntax / extension. However in doing so it dropped critical parts of the signature (namely the specific type of the return value -- or the lack thereof). Update this error to restore the information that the callbacks have no return value.
Miscellaneous changes
Fixes taking a half day outside of working hours counting as half a day instead of nothing. Since hr_work_entry_holidays has been moved to community in 14.3 also apply it here See odoo/odoo#68977 See odoo/enterprise#18454 Forward-Port-Of: odoo/odoo#71136
Original PR description
Fixes taking a half day outside of working hours counting as half a day instead of nothing. Since hr_work_entry_holidays has been moved to community in 14.3 also apply it here See odoo/odoo#68977 See odoo/enterprise#18454 Forward-Port-Of: odoo/odoo#71136
This update rewrites a web interface color definition into a more widely supported format. It helps avoid styling issues in environments where some stylesheet tools could not process the previous color format.
Original PR description
Some scss compilers are not supporting the colors written in hexadecimal with 8 digits. So to keep the the color and transparency, we have re-written the color in rgba. Issue introduced in: https://github.com/odoo/odoo/commit/a1c983250e9547c383ef677fb411b0bc589efa89 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
Helpdesk analysis reports now keep the user's chosen measurement when filters are applied. This prevents reports from unexpectedly switching back to Count, making analysis more consistent and reducing rework.
Original PR description
Current behaviour:
* In the analysis report, after having set a measure other than Count,
the measure is reset to Count after having applied a filter.
Expected behaviour:
* In the analysis report, after having set a measure other than Count,
the measure remains selected after having applied a filter.Financial reports now correctly stop listening for window resize events after users navigate away. This prevents crashes when another action is opened on top of a report, improving stability without changing report functionality.
Original PR description
When on the "account_report" client action, do an action on top of it with the actionService You should have the "account_report" as a breadcrumb Trigger the resize event on window Before this commit, the handler defined by the "account_report" client action was executed eventhough the client action was not here anymore, resulting in a crash because the DOM was not as expected After this commit, there is no crash anymore, since we disable the resize handler at the right time This follows the refactoring at: 0573acae2306bf5da2005852da9323ddc59e5431
Suppose a recurrent event synced with both calendars. Suppose that the current user is not the organizer. If one occurrence of the event is cancelled, the user won't be able to sync the calendars. To reproduce the event: (Need two Microsoft accounts A01 and A02) 1. [On Microsoft, with A01] Create an event: - Recurrent (next 3 days for instance) - With A02 2. Set the address mail of current partner with A02's address 3. Sync with Microsoft - Note that the 3 occurrences are
Original PR description
Suppose a recurrent event synced with both calendars. Suppose that the current user is not the organizer. If one occurrence of the event is cancelled, the user won't be able to sync the calendars. To…
Suppose a recurrent event synced with both calendars. Suppose that the
current user is not the organizer. If one occurrence of the event is
cancelled, the user won't be able to sync the calendars.
To reproduce the event:
(Need two Microsoft accounts A01 and A02)
1. [On Microsoft, with A01] Create an event:
- Recurrent (next 3 days for instance)
- With A02
2. Set the address mail of current partner with A02's address
3. Sync with Microsoft
- Note that the 3 occurrences are displayed
4. [On Microsoft, with A01] Cancel one occurrence
5. Sync calendars
Error: A Validation Error is raised: "The operation cannot be completed:
- Create/update: a mandatory field is not set [...]"
At some point, the module updates each occurrence of the event and
stores the occurrence's values:
https://github.com/odoo/odoo/blob/4ae90dd6f9e28e6fdff45c7612a3a756665e1489/addons/microsoft_calendar/models/microsoft_sync.py#L213-L220
However, the cancelled occurrence will be incorrectly stored. Because it
is cancelled, `_microsoft_to_odoo_values` will return {'active': False}:
https://github.com/odoo/odoo/blob/4ae90dd6f9e28e6fdff45c7612a3a756665e1489/addons/microsoft_calendar/models/calendar.py#L63-L65
Therefore, in the previous code, `values` will contain `(<Recurrence
ID>, None, None)`
Later, when applying the recurrence, the module detects all
already-existing occurrences and the others (i.e., those that need to be
created):
https://github.com/odoo/odoo/blob/02886f65e9026e1f7617c8b23c3d87edd358b168/addons/calendar/models/calendar_recurrence.py#L190-L192
where the ranges are tuples like `(<start of the occurrence>, <end>)`.
As a result, `ranges_to_create` will contain such a tuple `(None, None)`
which makes no sense
OPW-2571398
Forward-Port-Of: odoo/odoo#73719The test needs the option "Lock Confirmed Sales" enabled The current code doesn't really activate the option Forward-Port-Of: odoo/odoo#74046 Forward-Port-Of: odoo/odoo#73502
Original PR description
The test needs the option "Lock Confirmed Sales" enabled The current code doesn't really activate the option Forward-Port-Of: odoo/odoo#74046 Forward-Port-Of: odoo/odoo#73502
Take into account the case where vat of a customer is not set, otherwise with l10n_it_edi installed (after 3741e141e5) it's not possible to create them. opw-2608759 opw-2607887 opw-2608008 opw-2608759 opw-2608031 opw-2608697 opw-2608698 opw-2608814 Forward-Port-Of: odoo/odoo#74056
Original PR description
Take into account the case where vat of a customer is not set, otherwise with l10n_it_edi installed (after 3741e141e5) it's not possible to create them. opw-2608759 opw-2607887 opw-2608008 opw-2608759 opw-2608031 opw-2608697 opw-2608698 opw-2608814 Forward-Port-Of: odoo/odoo#74056
Followup of odoo/odoo@edf729c09e0ee7d77ea2763e797cd45857144923 where reveal_id was changed to a reveal_ids on industry model (comma separated list of IDs). This was changed in IAP Mining but not here. Forward-Port-Of: odoo/odoo#74036
Original PR description
Followup of odoo/odoo@edf729c09e0ee7d77ea2763e797cd45857144923 where reveal_id was changed to a reveal_ids on industry model (comma separated list of IDs). This was changed in IAP Mining but not here. Forward-Port-Of: odoo/odoo#74036
On windows when you copy paste text in and into Odoo (for example in the description when creating a ticket) a traceback occurs. There is an isWhitelist function which verifies that a node is indeed in the authorized items via the following instruction `item.matches (CLIPBOARD_WHITELISTS.nodes.join (','))` But on windows there is a comment node containing `<--StartFragment-->` Here is the clipboard data on linux and on windows for the same copied text (Hello): - Linux ``` <met
Original PR description
On windows when you copy paste text in and into Odoo (for example in the description when creating a ticket) a traceback occurs. There is an isWhitelist function which verifies that a node is indeed…
On windows when you copy paste text in and into Odoo (for example in the description when creating a ticket) a traceback occurs.
There is an isWhitelist function which verifies that a node is indeed in the authorized items via the following instruction
`item.matches (CLIPBOARD_WHITELISTS.nodes.join (','))`
But on windows there is a comment node containing `<--StartFragment-->`
Here is the clipboard data on linux and on windows for the same copied text (Hello):
- Linux
```
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
<span style=\"color: rgb(102, 102, 102); font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Hello</span>
```
- Windows
```
<html>
<body>
<!--StartFragment--><span style="color: rgb(102, 102, 102); font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Hello</span><!--EndFragment-->
</body>
</html>
```
Except for this additional comment on Windows, the `.matches()` method does not exist.
This PR uses the `Array.includes` function on the item's `nodeName`, which should work in all cases while keeping the same behavior.
opw-2591597
Forward-Port-Of: odoo/odoo#73961Issue: Payouts reference on Stripe are display as: `SUB123 - ODOO_PARTNER_456789`. Cause: When making a Stripe request to create new customer, the description is formated as : `ODOO_PARTNER_456789` . Solution: Replace customer description format as : `Partner: Mitchel Admin (id:456789)` . Inspired by: https://github.com/odoo/odoo/commit/3bc1e0175d85a70806999109e928c234e8cc2ca4 opw-2593621 Forward-Port-Of: odoo/odoo#73966
Original PR description
Issue: Payouts reference on Stripe are display as: `SUB123 - ODOO_PARTNER_456789`. Cause: When making a Stripe request to create new customer, the description is formated as : `ODOO_PARTNER_456789` . Solution: Replace customer description format as : `Partner: Mitchel Admin (id:456789)` . Inspired by: https://github.com/odoo/odoo/commit/3bc1e0175d85a70806999109e928c234e8cc2ca4 opw-2593621 Forward-Port-Of: odoo/odoo#73966
When you are using non deductible taxes, the tax amount is handled as an expense increase, using the same expense account than the invoice line. But not having the analytic option, this expense increase is not classified in the same analytic account. Thus, a sane default for the initial chart of accounts is to set it to True. @Tecnativa TT31062 Forward-Port-Of: odoo/odoo#74077
Original PR description
When you are using non deductible taxes, the tax amount is handled as an expense increase, using the same expense account than the invoice line. But not having the analytic option, this expense increase is not classified in the same analytic account. Thus, a sane default for the initial chart of accounts is to set it to True. @Tecnativa TT31062 Forward-Port-Of: odoo/odoo#74077
This PR reverts this one https://github.com/odoo/odoo/pull/54364 because it introduces the following problem: It is no longer possible to close the dialog when it is opened from a gantt view, because the buttons are overridden and they no longer close the window after the action. In addition to the fact that this fix no longer makes sense at the moment opw-2591597 Forward-Port-Of: odoo/odoo#73951 Forward-Port-Of: odoo/odoo#73872
Original PR description
This PR reverts this one https://github.com/odoo/odoo/pull/54364 because it introduces the following problem: It is no longer possible to close the dialog when it is opened from a gantt view, because the buttons are overridden and they no longer close the window after the action. In addition to the fact that this fix no longer makes sense at the moment opw-2591597 Forward-Port-Of: odoo/odoo#73951 Forward-Port-Of: odoo/odoo#73872
PURPOSE Before this, if user have not enough creadit to generate leads and user generate the leads than it threw the error and change the record state to the error, But it does not affact to the form. in saas-14.4 we are re-open the same record for form view is updated and correct error message is appears. SPECIFICATION in this PR, we change the read-only attrs and now contact_number field is not readonly if it is in draft and error state. Task-ID: 2605708 -- I confirm I
Original PR description
PURPOSE Before this, if user have not enough creadit to generate leads and user generate the leads than it threw the error and change the record state to the error, But it does not affact to the form. in saas-14.4 we are re-open the same record for form view is updated and correct error message is appears. SPECIFICATION in this PR, we change the read-only attrs and now contact_number field is not readonly if it is in draft and error state. Task-ID: 2605708 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#74044
Forward-Port-Of: odoo/odoo#74098
Original PR description
Forward-Port-Of: odoo/odoo#74098
This is a small fixup of previous commit https://github.com/odoo/enterprise/commit/9bbd7b55935c01518ab818886f145053c0d45af3. The regex was replacing only exact matches, but we should still exclude the string 'res_partner' if it comes for another join on table res_partner due to a customized ir_rule. opw-2526848 Forward-Port-Of: odoo/enterprise#18385
Original PR description
This is a small fixup of previous commit https://github.com/odoo/enterprise/commit/9bbd7b55935c01518ab818886f145053c0d45af3. The regex was replacing only exact matches, but we should still exclude the string 'res_partner' if it comes for another join on table res_partner due to a customized ir_rule. opw-2526848 Forward-Port-Of: odoo/enterprise#18385
Before this commit, the background colour of the Cohort view cells is always white. Now, the background colour of the cell will be related to the percentage. Note that this is already the behaviour in 13. Forward-Port-Of: odoo/enterprise#19778
Original PR description
Before this commit, the background colour of the Cohort view cells is always white. Now, the background colour of the cell will be related to the percentage. Note that this is already the behaviour in 13. Forward-Port-Of: odoo/enterprise#19778