Friday, December 23, 2022
28 changes · master
Enhancements to existing features
The mail app now shows the word "Space" when the spacebar is set as the push-to-talk key. This removes a confusing blank display and helps users understand their voice chat shortcut setting.
Original PR description
**Current behavior before PR:** When the `Push-to-talk` key is the "space" we show an "empty string", which is confusing and unclear. **Desired behavior after PR is merged:** We display `Space` string instead of empty space. Task-2794733 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update renames several internal interface components so their names consistently end with “View.” The change helps keep the codebase easier to maintain and reduces confusion for future development, with no expected direct impact on daily users.
Original PR description
\* calender, mrp, test_mail, website_slides **Description of the issue/feature this PR addresses:** All components should be suffixed with 'View'. All models corresponding to components should be suffixed with View and have the exact same name as the component. **This PR Renames:** Activity, ActivityBox, ActivityMenuContainer, ActivityMarkDonePopoverContent, AttachmentBox, AttachmentCard, AttachmentDeleteConfirm, AttachmentImage, AttachmentList, CallActionList, CallInviteRequestPopup, CallInviteRequestPopupList, CallOptionMenu, CallParticipantCard, CallParticipantVideo, CallSettingsMenu, CallSettingsMenuDevice, CallSystrayMenu, CallSystrayMenuContainer, ChannelInvitationFormSelectablePartner Task-2900038 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Test filtering by Odoo module now includes tests marked to run exclusively, not just regular or debug tests. This helps development teams get more complete and reliable test lists when focusing on a specific module.
Original PR description
Before this commit, when filtering tests by odoo module, tests registered with `QUnit.test` and `QUnit.debug` were listed, but not `QUnit.only`.
The website forum sample content was updated to use more general Odoo wording instead of referring specifically to Odoo v8. This keeps demo data current and avoids outdated version references in example forum content.
Original PR description
it is specified as v8, generalized the demo data content to use odoo, instead of odoo v8 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Studio now recognizes the Activity view as using Odoo's newer interface framework. This keeps Studio aligned with the main Odoo platform update and helps ensure a more consistent editing experience.
Original PR description
The `activity` view is converted to Owl in https://github.com/odoo/odoo/pull/107916. This commit register the activity view in Studio as converted in Owl.
This update renames internal interface components and their related models so they follow a consistent “View” naming pattern. It mainly improves maintainability and consistency for future development, with little to no direct impact on day-to-day users.
Original PR description
\* approvals, documents, knowledge, mail_enterprise, sign, voip **Description of the issue/feature this PR addresses:** All components should be suffixed with 'View'. All models corresponding to components should be suffixed with View and have the exact same name as the component. **This PR Renames:** Activity, ActivityBox, ActivityMenuContainer, ActivityMarkDonePopoverContent, AttachmentBox, AttachmentCard, AttachmentDeleteConfirm, AttachmentImage, AttachmentList, CallActionList, CallInviteRequestPopup, CallInviteRequestPopupList, CallOptionMenu, CallParticipantCard, CallParticipantVideo, CallSettingsMenu, CallSettingsMenuDevice, CallSystrayMenu, CallSystrayMenuContainer, ChannelInvitationFormSelectablePartner Task-2900038 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo Studio styling was adjusted so list headers stay visually consistent when they remain visible during scrolling. This removes small display glitches and makes editing list views smoother for users.
Original PR description
This commit is the counter-part of odoo/odoo#107631 which makes the list view headers remain visible when the user scrolls. This created some small glitches in Studio which required some adapations. Task 1917230
Resolved issues and error corrections
The web interface now uses Noto Sans instead of Liberation Sans as the fallback font on Fedora Linux. This fixes cases where medium-weight text appeared too light, improving visual consistency for Fedora users.
Original PR description
This commit replaces Liberation Sans for Noto Sans in the default system font stack as Liberation doesn't support font-weight: 500 and had a fallback at 400. Liberation Sans was the fallback font on Fedora Linux, this commit fixes it by setting Noto Sans (variable font) as the fallback font for Fedora. task-3076171 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
…mance When installing the website_livechat module, the `_compute_livechat_operator_id` method is run on every record to update the value for `livechat_operator_id`. On a large `website_visitor` table this leads to timeouts and livechat installation stops with a traceback. We can safely assume that at the moment of installing livechat, no livechat operator was attributed to any visitor. initializing the value to a default FALSE seems acceptable. That way PostgreSQL will not need to touch
Original PR description
…mance When installing the website_livechat module, the `_compute_livechat_operator_id` method is run on every record to update the value for `livechat_operator_id`. On a large `website_visitor`…
…mance When installing the website_livechat module, the `_compute_livechat_operator_id` method is run on every record to update the value for `livechat_operator_id`. On a large `website_visitor` table this leads to timeouts and livechat installation stops with a traceback. We can safely assume that at the moment of installing livechat, no livechat operator was attributed to any visitor. initializing the value to a default FALSE seems acceptable. That way PostgreSQL will not need to touch the rows at all, the operation will be instantaneous, and the actual values will be lazily initialized when the rows are modified later. Example, client database with +7 million `website_visitor` records to run `_compute_livechat_operator_id` on installation: - before commit: more than 3 hours (timeout) - after commit: less than 3 mins Previous implementation: cc9f59b , c426a45 opw-3095632 rebase + squash : Switched to using the `create_column` method instead of a raw SQL query. Added some comments in the `_auto_init` definition. Forward-Port-Of: odoo/odoo#108564
Steps to reproduce: - for a user, define Timesheets access rights to "User: own timesheets only"; - go to Reporting tab in Timesheets application with this user; - go to pivot view "By Project" or "By Task". Issue: It is possible to see timesheets that do not belong to the user. Solution: Add a rule which forces de domain for the `group_hr_timesheet_user` group. opw-3088745 Forward-Port-Of: odoo/odoo#108253
Original PR description
Steps to reproduce: - for a user, define Timesheets access rights to "User: own timesheets only"; - go to Reporting tab in Timesheets application with this user; - go to pivot view "By Project" or "By Task". Issue: It is possible to see timesheets that do not belong to the user. Solution: Add a rule which forces de domain for the `group_hr_timesheet_user` group. opw-3088745 Forward-Port-Of: odoo/odoo#108253
Before this commit the dropdown items in the channel kanban view were not centered. This fix the issue Task-3086160 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#106885
Original PR description
Before this commit the dropdown items in the channel kanban view were not centered. This fix the issue Task-3086160 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#106885
JSON content can be rendered nicely by browsers when using the appropriate mimetype opw-3097856 Forward-Port-Of: #107610 Forward-Port-Of: odoo/odoo#107699
Original PR description
JSON content can be rendered nicely by browsers when using the appropriate mimetype opw-3097856 Forward-Port-Of: #107610 Forward-Port-Of: odoo/odoo#107699
Previously, we added some handling so that errors that were not defaultPrevented would have their traceback logged by the error service instead of the default behaviour of the browser, because not all browsers correctly log error chains (errors with causes). This did not actually work because the errorEvent was written on the object at the top of the error chain and checked on the error at the bottom of it. This commit fixes that by just looking at the event on the uncaught error. I confirm
Original PR description
Previously, we added some handling so that errors that were not defaultPrevented would have their traceback logged by the error service instead of the default behaviour of the browser, because not all browsers correctly log error chains (errors with causes). This did not actually work because the errorEvent was written on the object at the top of the error chain and checked on the error at the bottom of it. This commit fixes that by just looking at the event on the uncaught error. I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#108276
Prior to this commit, adding an anchor using auto-complete would not properly prefix the url with the URL of the current page. Steps to reproduce: - Create a page (e.g. /test), add blocks and create an anchor (e.g. #anchor) - Save the page - Click on "Edit Menu" in "Pages" - Add a new menu entry - Type '#' in the URL field and select the anchor - Save => The menu entry is wrongly set as it does not contain the original page's URL inside the `href` attribute. This means that clicki
Original PR description
Prior to this commit, adding an anchor using auto-complete would not properly prefix the url with the URL of the current page. Steps to reproduce: - Create a page (e.g. /test), add blocks and create…
Prior to this commit, adding an anchor using auto-complete would not properly prefix the url with the URL of the current page. Steps to reproduce: - Create a page (e.g. /test), add blocks and create an anchor (e.g. #anchor) - Save the page - Click on "Edit Menu" in "Pages" - Add a new menu entry - Type '#' in the URL field and select the anchor - Save => The menu entry is wrongly set as it does not contain the original page's URL inside the `href` attribute. This means that clicking on the menu from any other place will not properly redirect to the anchor on the /test page On top of that, editing a menu entry that was previously linked to a page would change the URL of the page with an anchor, making it impossible to access the page anymore until you change the URL back in the page manager. Steps to reproduce: - Create a new page (e.g. test) - Add a new menu entry that has this page as its URL - Save the new menu entry (close the dialogs) - Re-open the Menu dialog and edit the newly created menu entry - In the URL field, replace it with the page + an anchor (e.g. /test#anchor) - Save => The page's URL is now /test#anchor and is no longer accessible The is due to the `save` method of the `website.menu` model not containing code to properly manage adding an anchor to the menu. This commit fixes that. opw-3067750 Forward-Port-Of: odoo/odoo#108217 Forward-Port-Of: odoo/odoo#106882
CLA for Mehjabin Farsana Forward-Port-Of: odoo/odoo#108399
Original PR description
CLA for Mehjabin Farsana Forward-Port-Of: odoo/odoo#108399
Before this commit, edit an ace field and press alt+s remove the change. How: - edit an ace field - press alt+s Before: The change is removed. After: The change is saved. 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#108532
Original PR description
Before this commit, edit an ace field and press alt+s remove the change. How: - edit an ace field - press alt+s Before: The change is removed. After: The change is saved. 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#108532
Before this commit, when the parameters given to the `_search_part_of_department` is: - `operator='!='` - `value=False` Then the domain returned by the method does not take into account the False value. This commit fixes the issue by changing the `=` into `!=` when the value is False instead of changing `!=` into `=` when the value is False. x-original-commit: 2b78d430b869f6a0a327bf7e02e2398f1a103a25 Forward-Port-Of: odoo/odoo#108271 Forward-Port-Of: odoo/odoo#108257
Original PR description
Before this commit, when the parameters given to the `_search_part_of_department` is: - `operator='!='` - `value=False` Then the domain returned by the method does not take into account the False value. This commit fixes the issue by changing the `=` into `!=` when the value is False instead of changing `!=` into `=` when the value is False. x-original-commit: 2b78d430b869f6a0a327bf7e02e2398f1a103a25 Forward-Port-Of: odoo/odoo#108271 Forward-Port-Of: odoo/odoo#108257
The field `notified_partner_ids` has type Many2many with relation table `mail_message_res_partner_needaction_rel` [1] which is a regular Odoo model `mail.notification` with some extra fields. One of those fields is required: `notification_type`. On copying `mail.message` record, ORM copies Many2many fields directly without using `default_get` method for `mail.notification` model. Particularly, `notification_type` get null value and we get an error. STEPS 1. Create Server
Original PR description
The field `notified_partner_ids` has type Many2many with relation table `mail_message_res_partner_needaction_rel` [1] which is a regular Odoo model `mail.notification` with some extra fields. One of…
The field `notified_partner_ids` has type Many2many with relation table
`mail_message_res_partner_needaction_rel` [1] which is a regular Odoo model
`mail.notification` with some extra fields. One of those fields is required:
`notification_type`.
On copying `mail.message` record, ORM copies Many2many fields directly without using `default_get` method for `mail.notification` model. Particularly, `notification_type` get null value and we get an error.
STEPS
1. Create Server Action for `mail.message` model:
```py
for message in (records or record):
message.copy({
"subject": message.subject + "(SA copied)",
})
```
2. Add contextual action
3. Open `mail.message` which has non-empty value on `notified_partner_ids` (*Partners with Need Action*)
4. Run the Server action via Action menu.
PROBLEM
```
ValueError: <class 'psycopg2.errors.NotNullViolation'>: "null value in column
"notification_type" of relation "mail_notification" violates not-null constraint
DETAIL: Failing row contains (11, 210, null, 3, null, null, null, null, null,
null, null, null, null).
```
SOLUTION
Fix it by adding `copy=False`, because we don't want to copy those values anyway (confirmed by TDE).
[1]: The relation table is renamed to `mail_notificaiton` in v15+
opw-3069556
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#108381
Forward-Port-Of: odoo/odoo#108295This commit allows to download a spreadsheet with active filters without any crash. Commit https://github.com/odoo/odoo/commit/509bda2202df9f0f582fd020d96e8e1310b9abc7 was a first attempt to fix the issue. But the commit was wrong because an empty sheet for excel is not the same as an empty regular sheet. The `charts` property is missing and the excel would crash when trying to read it. Task 3102330 Description of the issue/feature this PR addresses: Current behavior before PR:
Original PR description
This commit allows to download a spreadsheet with active filters without any crash. Commit https://github.com/odoo/odoo/commit/509bda2202df9f0f582fd020d96e8e1310b9abc7 was a first attempt to fix the issue. But the commit was wrong because an empty sheet for excel is not the same as an empty regular sheet. The `charts` property is missing and the excel would crash when trying to read it. Task 3102330 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#108583
To Reproduce ============ - enable QR code on Accounting settings - with a vendor who has a bank account create an invoice from him/her - print or preview the credit note The Problem =========== the qr code method field will not be filled with SEPA, and a QR code will not be added to the PDF or preview. This qr reflects the vendor's bank account, so the user could scan it and send the money. This feature was removed by PR #104496 because it was also printed in the refunds to the cus
Original PR description
To Reproduce ============ - enable QR code on Accounting settings - with a vendor who has a bank account create an invoice from him/her - print or preview the credit note The Problem =========== the…
To Reproduce ============ - enable QR code on Accounting settings - with a vendor who has a bank account create an invoice from him/her - print or preview the credit note The Problem =========== the qr code method field will not be filled with SEPA, and a QR code will not be added to the PDF or preview. This qr reflects the vendor's bank account, so the user could scan it and send the money. This feature was removed by PR #104496 because it was also printed in the refunds to the customers, which was odd, but as a side effect it is also removed from vendor bills. Solution ======== The QR should not be hidden in vendor bills and purchase receipts, ( also in vendor refund it can be helpful for the vendor, but there isn't any complain about it now ) A better solution would be displaying the QR code in the form view if it is not the company's bank account (it is the partner's bank account), but it should be done in master, it is too much of change for stable versions. Ticket No: 3071310 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#108484 Forward-Port-Of: odoo/odoo#108098
Forward-Port-Of: odoo/odoo#108590
Original PR description
Forward-Port-Of: odoo/odoo#108590
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#107943
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#107943
Commit [1] added a snippet template cache so that if a user changes pages on their website, they do not need to fetch the SnippetMenu from the server again. Unfortunately that commit added a few side effects that commit [2] tried to fix since commit [3] made them apparent. However, there is still one broken flow: - Create a website with 2 languages, e.g. English (primary) and French. - Visit the website in French and enable translate mode - Save and click on the "Edit in Master" button
Original PR description
Commit [1] added a snippet template cache so that if a user changes pages on their website, they do not need to fetch the SnippetMenu from the server again. Unfortunately that commit added a few side…
Commit [1] added a snippet template cache so that if a user changes pages on their website, they do not need to fetch the SnippetMenu from the server again. Unfortunately that commit added a few side effects that commit [2] tried to fix since commit [3] made them apparent. However, there is still one broken flow: - Create a website with 2 languages, e.g. English (primary) and French. - Visit the website in French and enable translate mode - Save and click on the "Edit in Master" button - Drag and drop a Snippet - The Snippet is in the translated language This commit fixes this broken flow by clearing the snippet cache when changing the language of the website. [1]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af#diff-52a4f9d2c217548e69e6b7fd097f286f1754a6389734eea254b87255e501cbefR18 [2]: https://github.com/odoo/odoo/commit/bb503962a36f3798c50049f2844e7b288b632955 [3]: https://github.com/odoo/odoo/commit/55a978aa86967581956f855a1c5db33b7425bd15 task-2687506 Forward-Port-Of: odoo/odoo#104140
A fix has been introduced in community to use the same layout as standard fields with groups to fix some alignements. This commit adapts the css for Knowledge. Forward-Port-Of: odoo/enterprise#35174
Original PR description
A fix has been introduced in community to use the same layout as standard fields with groups to fix some alignements. This commit adapts the css for Knowledge. Forward-Port-Of: odoo/enterprise#35174
Each time the studio service is started (i.e. for each studio qunit test), the `web_studio.bus` bus is patched to override its `trigger` function. Before this commit, this created a memory leak because those patches were never removed, and they retained widget/class instances in their closure. This commit restores the original `trigger` function of the studio bus after each test. Co-authored-by: Samuel Degueldre <sad@odoo.com> Forward-Port-Of: odoo/enterprise#35206
Original PR description
Each time the studio service is started (i.e. for each studio qunit test), the `web_studio.bus` bus is patched to override its `trigger` function. Before this commit, this created a memory leak because those patches were never removed, and they retained widget/class instances in their closure. This commit restores the original `trigger` function of the studio bus after each test. Co-authored-by: Samuel Degueldre <sad@odoo.com> Forward-Port-Of: odoo/enterprise#35206
## Steps to reproduce * create an Asset with a yearly linear depreciation * set an acquisition date that's different from the last day of the year * confirm the asset * go to `Reporting > Depreciation Schedule` If you look at your asset in the report, you should see that the first depreciation date is not correct. The acquisition date is displayed instead of the actual first depreciation date. opw-3092988 Forward-Port-Of: odoo/enterprise#35130
Original PR description
## Steps to reproduce * create an Asset with a yearly linear depreciation * set an acquisition date that's different from the last day of the year * confirm the asset * go to `Reporting > Depreciation Schedule` If you look at your asset in the report, you should see that the first depreciation date is not correct. The acquisition date is displayed instead of the actual first depreciation date. opw-3092988 Forward-Port-Of: odoo/enterprise#35130
Since the Owl conversion of the boxes interface, it wasn't possible to select text in the PDF anymore. This was due to the box layer still being rendered even when no field was active. Note that there is still a limitation, the text won't be selectable when boxes are rendered. This fix is actually the same than what was done in commit 68e6a90c403df563f8e5862cfe4a7131a68f9cd3, but the reasons behind them are different. Forward-Port-Of: odoo/enterprise#35137
Original PR description
Since the Owl conversion of the boxes interface, it wasn't possible to select text in the PDF anymore. This was due to the box layer still being rendered even when no field was active. Note that there is still a limitation, the text won't be selectable when boxes are rendered. This fix is actually the same than what was done in commit 68e6a90c403df563f8e5862cfe4a7131a68f9cd3, but the reasons behind them are different. Forward-Port-Of: odoo/enterprise#35137
changed boolean logic to set QC title based on whether QCP exists or not Problem: The title of the quality checks is not the same as the title from the quality control point. It should use the title of the QCP if a title is set. Otherwise, it will create a title based on the QCP type and component v13: https://github.com/odoo/enterprise/blob/060b07d69e57e983311ec50bc17aeeee70eaa601/mrp_workorder/models/quality.py#L137 The logic is to use the title of the QCP if there is a QCP; otherwise,
Original PR description
changed boolean logic to set QC title based on whether QCP exists or not Problem: The title of the quality checks is not the same as the title from the quality control point. It should use the title…
changed boolean logic to set QC title based on whether QCP exists or not Problem: The title of the quality checks is not the same as the title from the quality control point. It should use the title of the QCP if a title is set. Otherwise, it will create a title based on the QCP type and component v13: https://github.com/odoo/enterprise/blob/060b07d69e57e983311ec50bc17aeeee70eaa601/mrp_workorder/models/quality.py#L137 The logic is to use the title of the QCP if there is a QCP; otherwise, create a title based on the QC type and component v15: https://github.com/odoo/enterprise/blob/69be8a8261c9b253459262d15b236881712bef7d/mrp_workorder/models/quality.py#L208 The code from v13 was refactored but used the wrong boolean condition: **Currently**: If there is no QCP or if there is a component, create a title based on the QC type and component **Error**: regardless of whether there is a QCP or not, it will always create a new title if there is a component **Expected**: it should only create a title if there is no QCP **Proposed Change:** Change the condition to use AND instead of OR --> it will short circuit by checking first whether there is a QCP or not. It will only create a new title if there is no QCP AND there exists a component Steps to Reproduce on Runbot 15: 1. Install Manufacturing, quality > enable Work Orders 2. Create C1, storable, buy 3. Create P1, storable, manufacture 4. Create a BOM for P1 > set type to Manufacture and use C1 as a component 5. Create a work order operation for P1 using the BOM from Step 4 6. Create a Quality Check Point for P1 - Set the title - set Operations to Manufacturing - Set Work Order operation to the one from Step 5 - Set Type to Register Consumed Materials - Set Product to Register to C1 7. Create an MO for P1 , Confirm, Finish the Work order 8. View Finished Steps from the finished WO and the Title is not the same as the QCP title opw-3032479 Forward-Port-Of: odoo/enterprise#35189 Forward-Port-Of: odoo/enterprise#34777