Friday, April 14, 2023
44 changes · master
Enhancements to existing features
Kanban views now delay loading images until they are close to being visible on screen, reducing unnecessary network usage. This should make image-heavy pages such as contacts, employees, vehicles, lunches, and eLearning slides feel lighter and more efficient for users.
Original PR description
This commit adds the loading="lazy" attribute to every img tags compiled by the kanban compiler and modifies some kanban archs in order to use img tags instead of divs with background-image style to load images (this allows again the loading="lazy" atribute to work). The purpose is to avoid loading images that are outside the user viewport at all time in order to reduce the load on the network when new images are loaded. Steps to test: find all views that are using the o_kanban_image or o_kanban_image_fill_left class and ensure all the images in these views appear in the network tab of devtools when they enter the user viewport. Example: res.partners, hr.employee, ... task-3102207
Portal users now see simpler, more meaningful browser window titles when opening sales orders, purchase orders, invoices or bills, and shared projects. This makes pages easier to recognize and improves the customer-facing portal experience without changing business workflows.
Original PR description
* account, project, purchase, sale before this commit, opening a record from portal(sale, purchase, invoice, project) shows the window title as Invoice Portal Template, Project Sharing View in Portal, Purchase Order Portal Template and Sale Order Portal Template etc * navigate to portal * click sales order * click and open any sales order * see the window title  after this commit, better title will be displayed to the portal users. Invoice Portal Template --> Invoice/Bill Project Sharing View in Portal --> Project Sharing Purchase Order Portal Template --> Purchase Order Sale Order Portal Template --> Sale Order --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Inventory reservations now take product expiration dates into account when selecting lots or serial numbers. This helps prevent expired or soon-to-expire goods from being assigned to deliveries, reducing fulfillment errors and customer risk.
Original PR description
Currently, when a product with an expiration date is reserved, the expiration date isn't checked when seeking which lot/serial to use. This can lead to the shipping and delivery of already expired products, since their expiration date came before their scheduled delivery. Task-3203121 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The work entry list now shows additional fields to make records easier to review at a glance. This helps HR users understand and compare work entries faster without opening each record individually.
Original PR description
For more clarity, we added some fields on the list view of work entry. task - 3264920
Selection menus can now include a customizable area at the bottom for extra information or actions. This makes the component more flexible for future Knowledge features, such as adding related options or showing context-specific controls.
Original PR description
This commit allows the customization of the bottom area of the SelectMenu component. The slot can show additional information, of handle any feature related to the state of the component, such as adding elements, etc. A test has been added using this custom slot, asserting its presence and testing an interaction with its content. This changes is required to use the SelectMenu component in Knowledge, in task-3134491
Portal pages for invoices, purchase orders, and sales orders now show clear, customer-friendly browser titles instead of internal template names. This makes it easier for users to understand which document they are viewing and improves the overall portal experience.
Original PR description
account, purchase, sale before this commit, opening a record from portal(sale, purchase, invoice, project) shows the window title as Invoice Portal Template, Purchase Order Portal Template and Sales Order Portal Template etc * navigate to portal * click sales order * click and open any sales order * see the window title after this commit, better title will be displayed to the portal users. Invoice Portal Template --> Invoice/Bill Purchase Order Portal Template --> Purchase Order Sales Order Portal Template --> Sales Order --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Calendar users can now enter more event details directly when quickly creating an event, instead of only adding a title. This makes scheduling faster and reduces the need to reopen events for additional edits.
Original PR description
This commit consists of a full rework of the quick create form in the calendar view, so that it shows more options to the user rather than only the name of the event. To accomplish this, we added a new attribute on the calendar view with the id of the quick create form view to be used. This allows us to have a custom view to be shown on quick create. task-3129030 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 adjusts core web view handling in Odoo's interface. It is likely intended to improve how relational data is managed in views, but the available PR details are limited, so the business impact appears minor.
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
Notification buttons now line up more neatly with the surrounding message content. This small visual improvement makes notifications look cleaner and easier to scan for users.
Original PR description
Before this commit button in notification are not aligned with other content of notification reason it is not aligned because all buttons have padding in their surrounding and because of starting padding on button it is not align with others. This commit add ps-0 to remove starting padding and align notification button with other content. task-3117332
Planning users now see project details before sales line details in shift emails, making the most relevant information easier to find. The update also prevents incomplete role creation from product forms and adds an undo option when shifts are copied from the previous week by mistake.
Original PR description
1) Before this commit sale line field added before project field in mail template of new shift. Normally project field is more common and useful in shift then sale line field. So this commit move…
1) Before this commit sale line field added before project field in mail template of new shift. Normally project field is more common and useful in shift then sale line field. So this commit move project field before sale line field. 2) Before this commit user can able to quick create a role from product form view but creating a role without resource would not be that useful and make not much sense. So this commit disable quick creation of new roles from project and make resources field required on create/edit form dialog so SOL have at least a resource for role that was created from product. 3) Before this commit user does not have any option to rollback or delete all the shift that were created by copy previous week button action and because of that if user misclick on that button it'll hard for user to find and delete all the shift that are created from misclick. So this add a `fa-undo` button in notification of copy previous week button so user can easily rollback shifts that are created from copy previous week button. task-3117332
Document kanban cards now use standard image elements so images can load only when needed. This improves page performance and responsiveness when users browse many documents or spreadsheets.
Original PR description
This commit changes how images are defined in the kanban view to be img tags instead of background-image styled divs. This allows for the kanban compiler to add the lazy loading attribute automatically due to the changes in community: https://github.com/odoo/odoo/pull/117049 task-3102207
Helpdesk SLA analysis screens were simplified to focus on clearer status-based reporting and more understandable labels. Default dashboard and report measures were adjusted so business users can more easily review failed, in-progress, and successful SLA outcomes.
Original PR description
In this commit change following UI changes in helpdesk SLA Status analysis: - remove following measures from reporting of SLA status analysis - % of failed SLA, % of SLA in progress, % of successful SLA - change default measures in pivot view and set group by 'sla status' - demo data change 'VIP support' team stage from 'done' to 'solved' - remove following favorite filter from reporting . - 'failed sla stage per month' and 'status for deadline' - change default measures in graph view ''number of sla failed'' - change following labels - 'Number SLA In Progress' to 'Number of SLA in Progress' - 'sla ongoing' to 'SLA in Progress' - 'sla reached' to 'SLA Success' - change demo data of 'success rate' and 'average rating' default daily targets to 85% task-3186580
The Helpdesk app experience was refined across forms, SLA setup, repair handling, task creation, coupons, and website support. These changes make common support workflows clearer, reduce accidental setup errors, and carry customer details more smoothly between related processes.
Original PR description
_* = helpdesk_sale_loyalty, website_helpdesk, helpdesk_repair, helpdesk_sale_timesheet, helpdesk_fsm Purpose of this commit is to improve generic UX of the helpdesk app. So, in this commit did the below changes: - add space before the hyphen. - switch the 'automatic closing' and 'closure by customers' features from place. - rename generate button into generate coupon. - remove the description field placeholder. - remove create and edit option from type ids field in SLA. - remove create and edit option from tag ids field in SLA. - make the email alias clickable in the kanban view of the helpdesk team. - make the color of customer care data false. - modify the default values of the repair form. - improve the UX of the SLA form. - set partner on create task wizard. - add email in helper if email alias enabled. task-3102422
Resolved issues and error corrections
This fixes an issue where live chat unread message counts could be calculated incorrectly after a recent internal change. It helps agents see accurate unread message indicators, reducing the risk of missed customer conversations.
Original PR description
Since [1], the way the message unread counter is computed has changed. The patch of the `im_livechat` module is not adapted properly. This commit fixes this issue. [1]: 6ebe033b00774ed8824d05f0adf9dae5f3654261
Features or functions removed from Odoo
An unused file was removed from the Resource module. This cleanup has no expected impact on day-to-day use, but helps keep the system codebase simpler and easier to maintain.
Original PR description
In this commit we have removed resource_views.xml from the resource module. ref-https://github.com/odoo/odoo/commit/7bce5f3f95429a4d4ba034a66c350ee2a5868567
Miscellaneous changes
When a project is shared with portal users, only timesheets that are linked to tasks will be displayed. Solution: Change the domain that selects the timesheets to be displayed to take into account timesheets that are not linked to a task, but are in a project to which the portal user has access. opw-3253632 Forward-Port-Of: odoo/odoo#118356 Forward-Port-Of: odoo/odoo#118329
Original PR description
When a project is shared with portal users, only timesheets that are linked to tasks will be displayed. Solution: Change the domain that selects the timesheets to be displayed to take into account timesheets that are not linked to a task, but are in a project to which the portal user has access. opw-3253632 Forward-Port-Of: odoo/odoo#118356 Forward-Port-Of: odoo/odoo#118329
Odoo now safely ignores link preview notifications for messages that have not been loaded yet. This prevents a crash in Discuss or mail flows and lets the preview data arrive normally when the message is fetched later.
Original PR description
This notification makes sense when we know this message. If we don't know it yet, then we should just ignore and receive data of link preview when fetching the message.
Opening dynamic placeholder popovers no longer causes an error. This improves reliability for users working with text fields that use dynamic placeholders.
Original PR description
[FIX] web: fix traceback in useDynamicPlaceholder **Before this commit** Since https://github.com/odoo/odoo/commit/394f85c954fabc4d5cf7c715c75298bb89bb165f anytime this hook opens a popover, a traceback occurs. It is due to the fact this hook passes a callback as a getter-only property to the usePopover hook options. The traceback occur because the usePopover hook has to reassign this option (onClose callback). **After this commit** Fixed and tested.
Steps to reproduce: - enable "Skills Management" in Employee app; - create a new employee; - add skill by creating a skill level ("Create and edit"). Issue: A traceback appears. Solution: Add the default skill type in the context so that it can be used during creation. opw-3269030 Forward-Port-Of: odoo/odoo#118414
Original PR description
Steps to reproduce:
- enable "Skills Management" in Employee app;
- create a new employee;
- add skill by creating a skill level ("Create and edit").
Issue:
A traceback appears.
Solution:
Add the default skill type in the context
so that it can be used during creation.
opw-3269030
Forward-Port-Of: odoo/odoo#118414Version 16 has new description for field. This commit adapts the field definition to that new API. OPW - 3258716 Forward-Port-Of: odoo/odoo#118410
Original PR description
Version 16 has new description for field. This commit adapts the field definition to that new API. OPW - 3258716 Forward-Port-Of: odoo/odoo#118410
Currently, the `Many2XAutocomplete` component is not reactive: The component gets the model to load from its props and the component uses a hook to initialize and open a `SelectCreateDialog` dialog for that model. The issue is that the name of the model is copied and set in the setup function of the `Many2XAutocomplete` component. When the model changes, the function opening the `SelectCreateDialog` dialog is not updated and will hence still use the name set initially. Steps to reproduce the
Original PR description
Currently, the `Many2XAutocomplete` component is not reactive: The component gets the model to load from its props and the component uses a hook to initialize and open a `SelectCreateDialog` dialog…
Currently, the `Many2XAutocomplete` component is not reactive: The component gets the model to load from its props and the component uses a hook to initialize and open a `SelectCreateDialog` dialog for that model. The issue is that the name of the model is copied and set in the setup function of the `Many2XAutocomplete` component. When the model changes, the function opening the `SelectCreateDialog` dialog is not updated and will hence still use the name set initially. Steps to reproduce the issue: 1. Create a new property field of type Many2one or Many2many 2. Choose a model 3. Click on the "Default Value" field 4. Click on the "Search More..." link from the dropdown 5. Choose another model 6. Click on the "Default Value" field 7. Click on the "Search More..." link from the dropdown => The modal displays records from the first model picked. To fix the issue, we will simply put a `t-key` attribute on the component. The component will then be reloaded whenever the given key changes. The model loaded by the `SelectCreateDialog` dialog will then be updated properly whenever the given model changes. task-3192917 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#115637
Currently, if a problem occurs during the loading of iot handlers (drivers or interfaces), all loading of iot handlers is compromised. With this FIX we display the Exception and the file concerned without blocking the operation of the iot 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#11850
Original PR description
Currently, if a problem occurs during the loading of iot handlers (drivers or interfaces), all loading of iot handlers is compromised. With this FIX we display the Exception and the file concerned without blocking the operation of the iot 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#118504
This commit makes the image options initialization more robust, by - checking at the beginning if the specified `src` and `data-original- src` attributes match with existing files. - checking if there is a `data-original-src` attribute before applying the ImageTools options (shape, filter,...). This is needed because in the case of wrongly hardcoded templates (e.g. in customizations), it is sometimes not possible to drop any snippet after dropping an incorrect one. This happens becaus
Original PR description
This commit makes the image options initialization more robust, by - checking at the beginning if the specified `src` and `data-original- src` attributes match with existing files. - checking if there is a `data-original-src` attribute before applying the ImageTools options (shape, filter,...). This is needed because in the case of wrongly hardcoded templates (e.g. in customizations), it is sometimes not possible to drop any snippet after dropping an incorrect one. This happens because the image `SnippetEditor` is not correctly created. Indeed, the start of the image options is never completed because the promise rejections when a file does not exist are not properly caught, interrupting the initialization. Therefore, ensuring that the files exist beforehand prevents these issues from happening. opw-3137732 Forward-Port-Of: odoo/odoo#112262
[FIX] web_editor: scroll to the "load more" button after a search [1] refactored the Media Dialog using owl and the backend Dialog component. Doing so, the width of the dialog was reduced (using the standard .modal-xl class). With that change, the "load more" button was not always visible for the user. It is acknowledged that the current Media Dialog needs a deeper UI review. In the meantime, it was decided to scroll to the bottom after a search/click on the load more button. This
Original PR description
[FIX] web_editor: scroll to the "load more" button after a search [1] refactored the Media Dialog using owl and the backend Dialog component. Doing so, the width of the dialog was reduced (using the…
[FIX] web_editor: scroll to the "load more" button after a search [1] refactored the Media Dialog using owl and the backend Dialog component. Doing so, the width of the dialog was reduced (using the standard .modal-xl class). With that change, the "load more" button was not always visible for the user. It is acknowledged that the current Media Dialog needs a deeper UI review. In the meantime, it was decided to scroll to the bottom after a search/click on the load more button. This commit implements that solution with a ref on the "load more" div. It is used in a scrollToLoadMoreButton, that is called each time after loading a new attachment/illustration/unsplash record. As we do not want a jump in the UI each time an image is loaded, the function is debounced. It is simpler to use a debounced function that we call each time an element is loaded, than keeping track of each loaded element to call the function only once, when they are loaded. [1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b task-3060679 ----- [IMP] web_editor: load more illustrations only when filter is set Before this commit, clicking on the 'load more' button of the media dialog after a search (with no filter set) would load more attachments/illustrations/unsplash records. As illustrations are considered less relevant than attachments/unsplash records, it was decided to load more of them only when the filter is set to "illustrations". When the filter is not set, the 'load more' button will be visible only if there are more attachments or more unsplash images to load (and not visible otherwise, even if there are more illustrations to load). Also, the loadMore override will only perform the query to load more illustrations if the filter is set. A deeper review of the Media Dialog UI will be conducted later. For now, this commit avoids loading too many illustrations, for users that are most of the time more interested in the unsplash results. task-3060679 ----- [FIX] web_editor, web_unsplash: do not display too many undraw images Before this commit, typing a query in the search input of the media dialog would output a lot of undraw images (15), making some noise and making the unsplash results (that are fetched 10 by 10) less visible. First, the number of fetched attachments was reduced from 30 to 10 when converted to owl in [3], for no valid reason. This commit adds a new NUMBER_OF_RECORDS_TO_DISPLAY value for better control over the loaded images, and reverts it to 30. Then, the /web_editor/media_library_search endpoint does not take any limit param. Therefore, it was loaded all the results as they were returned. Now, a new NUMBER_OF_MEDIA_TO_DISPLAY variable is introduced to load the 10 first results instead of all of them. This way, the search results are organised as following: - NUMBER_OF_ATTACHMENTS_TO_DISPLAY (30 for now) attachments, - NUMBER_OF_MEDIA_TO_DISPLAY (10 for now) media (undraw, ...), - NUMBER_OF_RECORDS_TO_DISPLAY (30 for now) unsplash images. These values can be changed to adjust the search (it may be better to have more unsplash images than undraw images). [3]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b task-3060679 ----- [FIX] web_editor, web_unsplash: use preset colors on illustrations Since [4] when the media dialog was rewritten, the illustrations thumbnails were not using the preset colors. [5] did partially implement the solution: the updated images with the right colors were not replaced in the DOM. This commit continues what [5] started and displays the illustration thumbnails with the preset colors. It also assigns a media type to all fetched images. [4]: https://github.com/odoo/odoo/commit/7fd0698cf765a79959566b51e33cb76bff83d344 [5]: https://github.com/odoo/odoo/commit/f2111cb37a572fe1ffd9b303c4abcbb7fe1d67cd task-3060679 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#104590
The content of the override of `can_be_merged_with` should only be executed when we're in France. The previous implementation resulted in breaking the `test_05_tip_screen` when this module was installed with pos_restaurant. Forward-Port-Of: odoo/odoo#118238 Forward-Port-Of: odoo/odoo#117942
Original PR description
The content of the override of `can_be_merged_with` should only be executed when we're in France. The previous implementation resulted in breaking the `test_05_tip_screen` when this module was installed with pos_restaurant. Forward-Port-Of: odoo/odoo#118238 Forward-Port-Of: odoo/odoo#117942
This PR patches the font awesome library to add an icon for the TikTok social network. Users are now able to add these icons with the media dialog. Now, the TikTok icon works like all other font awesome icons, with the new class introduced by this commit: `fa-tiktok`. Moreover, the social media block in the website application can detect a tiktok link and automatically integrate its icon with its color. Technical note: In order to add this new icon, a new font that contains only the Tik
Original PR description
This PR patches the font awesome library to add an icon for the TikTok social network. Users are now able to add these icons with the media dialog. Now, the TikTok icon works like all other font awesome icons, with the new class introduced by this commit: `fa-tiktok`. Moreover, the social media block in the website application can detect a tiktok link and automatically integrate its icon with its color. Technical note: In order to add this new icon, a new font that contains only the TikTok logo has been created. task-3235451 Forward-Port-Of: odoo/odoo#118415 Forward-Port-Of: odoo/odoo#116383
### Bug Currently, creating an intra-community bill and reconciling it with an early payment can break the tax report. ### Steps to reproduce 1. install the Austrian localization (l10n_at) 2. set `Cash Discount Tax Reduction` to `On early payment` 3. create a €1000 intra-community bill (you can just use the tax called `IGE 20%`) 4. set the payment term to`2/7 Net 30` and confirm 5. reconcile the bill with a payment within the discount period (2% discount: €980). 6. check the Tax Report
Original PR description
### Bug Currently, creating an intra-community bill and reconciling it with an early payment can break the tax report. ### Steps to reproduce 1. install the Austrian localization (l10n_at) 2. set…
### Bug Currently, creating an intra-community bill and reconciling it with an early payment can break the tax report. ### Steps to reproduce 1. install the Austrian localization (l10n_at) 2. set `Cash Discount Tax Reduction` to `On early payment` 3. create a €1000 intra-community bill (you can just use the tax called `IGE 20%`) 4. set the payment term to`2/7 Net 30` and confirm 5. reconcile the bill with a payment within the discount period (2% discount: €980). 6. check the Tax Report: line 5.4 of the report should be €196. If you reconciled the bill with a back statement directly, sections `Innergemeinschaftliche Erwerb` and `Bemessungsgrundlage` will be wrong as well.  ### Cause Since the intra-community applies here, the bill will produce two tax lines. And because `Cash Discount Tax Reduction` is set to `On early payment`, those two tax lines will be reduced when an early payment is made. However, because of the way the `is_refund` property of `account.move.line` field is computed on moves of type `entry`, one of those *tax reduction line* will be considered a refund and the other will not. This is because of the following lines in `_compute_is_refund`: https://github.com/odoo/odoo/blob/cfd71892aabf1510273b28032ff8f2d4cfd4d1f7/addons/account/models/account_move_line.py#L1064-L1065 And because `_compute_tax_tag_invert` relies on the `is_refund` property, those two lines will have different values for `tax_tag_invert` when they should have the same value.  opw-3112197 Enterprise PR: odoo/enterprise#39181 Forward-Port-Of: odoo/odoo#117533 Forward-Port-Of: odoo/odoo#114801
Commit [1], [2] and [3] added `Properties` type fields on (respectively) project.task, helpdesk.ticket and crm.lead. Unfortunately, those fields are not currently supported by the Website Form snippet. Selecting the "Properties" field while editing a form related to one of these model will lead to a crash as no definition for how the field is supposed to render is present in the current code base. (Note that no logic for how options should behave if such field is selected is present either.)
Original PR description
Commit [1], [2] and [3] added `Properties` type fields on (respectively) project.task, helpdesk.ticket and crm.lead. Unfortunately, those fields are not currently supported by the Website Form…
Commit [1], [2] and [3] added `Properties` type fields on (respectively) project.task, helpdesk.ticket and crm.lead. Unfortunately, those fields are not currently supported by the Website Form snippet. Selecting the "Properties" field while editing a form related to one of these model will lead to a crash as no definition for how the field is supposed to render is present in the current code base. (Note that no logic for how options should behave if such field is selected is present either.) Therefore, this commit removes this specific type of field from being present in the "Existing Fields" section of the Website Form Field editor. Steps to reproduce: - Install website and project - Go to Website and start edit mode - Drop a form snippet - Click on the form snippet and select "Create a task" as an Action - Click on an existing field or add one - Select "Properties" as the field type => Traceback (QWeb render error) [1]: https://github.com/odoo/odoo/commit/2f244769cbb1512875ae197aa8adc3efd34fd54b [2]: https://github.com/odoo/odoo/commit/8de9f4c4777481142063f75d4cd3cef47948714b [3]: https://github.com/odoo/odoo/commit/4722cc4b1fb027b7b9d731c3b206656588071360 opw-3240395 Forward-Port-Of: odoo/odoo#118549 Forward-Port-Of: odoo/odoo#117116
In this PR, fixes following - fix percentage field input is too wide in product form view. task-3128541 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#118378 Forward-Port-Of: odoo/odoo#112176
Original PR description
In this PR, fixes following - fix percentage field input is too wide in product form view. task-3128541 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#118378 Forward-Port-Of: odoo/odoo#112176
Remove performance tests from both tef and tcf. Too many PR are blocked due to broken assertQueryCount, either there are too many queries, either there are too few. It is too much work to run all tests three times only to update a comment with the final count (module alone + community + enterprise). It is too hard to keep track of the hundreds queries to determine those that moved, those that are missing and those that are new between two branches. We have to apply tons of string-replac
Original PR description
Remove performance tests from both tef and tcf. Too many PR are blocked due to broken assertQueryCount, either there are too many queries, either there are too few. It is too much work to run all…
Remove performance tests from both tef and tcf. Too many PR are blocked due to broken assertQueryCount, either there are too many queries, either there are too few. It is too much work to run all tests three times only to update a comment with the final count (module alone + community + enterprise). It is too hard to keep track of the hundreds queries to determine those that moved, those that are missing and those that are new between two branches. We have to apply tons of string-replace and sorts just to help some diff tools (e.g. meld) into showing what changed. Basically, except a few people, nobody care to do the investigation work and just increase the query count (without changing the comments). We tried for one year, now it is time to let those test go. 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#118340
Create a Field Service Task Assing a customer, in Timesheet tab add a line with Hours Spent 00:20 Mark as Done Sale Order will be created with a sale order line Total of the line and Total of the order will not match This occurs because the sale order line has been created with an unrounded quantity of 0.333333 opw-3184468 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed th
Original PR description
Create a Field Service Task Assing a customer, in Timesheet tab add a line with Hours Spent 00:20 Mark as Done Sale Order will be created with a sale order line Total of the line and Total of the order will not match This occurs because the sale order line has been created with an unrounded quantity of 0.333333 opw-3184468 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#117888
Before this commit, some behaviors of the forms after being submitted were problematic: - with the `On Success` option set on `Redirect`, when going back to a form after submitting it (with the browser arrows), the fields were still filled. - with the `Show Message` option selected, when going in edit mode when the message was displayed, the submit button was still "loading", even after saving. This commit solves this issues by properly resetting the form at each start and restoring the s
Original PR description
Before this commit, some behaviors of the forms after being submitted were problematic: - with the `On Success` option set on `Redirect`, when going back to a form after submitting it (with the browser arrows), the fields were still filled. - with the `Show Message` option selected, when going in edit mode when the message was displayed, the submit button was still "loading", even after saving. This commit solves this issues by properly resetting the form at each start and restoring the submit button loading effect when the message is displayed. task-2798576 Forward-Port-Of: odoo/odoo#118482 Forward-Port-Of: odoo/odoo#115540
Behaviour before PR: In kanban view, the cards UI is broken when there are too long words without spaces or breaks in the bottom half of the cards. Desired behaviour after PR: The words are broken so it fits in the cards without breaking the UI. Task: 3083665 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117579
Original PR description
Behaviour before PR: In kanban view, the cards UI is broken when there are too long words without spaces or breaks in the bottom half of the cards. Desired behaviour after PR: The words are broken so it fits in the cards without breaking the UI. Task: 3083665 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117579
To reproduce the issue (on a clean db with only the demo data): 1) Create a company A and B, each with a CoA installed 2) Create a journal group for company A, excluding any of its journals 3) Open the trial balance (or any other report with filter_journals set to true) with only company A active => your journal group is selected by default 4) Switch company to go to B while staying on the report 5) Switch again to A => the journal group is not selected by default this time => This hap
Original PR description
To reproduce the issue (on a clean db with only the demo data): 1) Create a company A and B, each with a CoA installed 2) Create a journal group for company A, excluding any of its journals 3) Open…
To reproduce the issue (on a clean db with only the demo data): 1) Create a company A and B, each with a CoA installed 2) Create a journal group for company A, excluding any of its journals 3) Open the trial balance (or any other report with filter_journals set to true) with only company A active => your journal group is selected by default 4) Switch company to go to B while staying on the report 5) Switch again to A => the journal group is not selected by default this time => This happens because of the way the previous options are loaded. Switching the company still gives the options dictionary used by the report for the previous company as previous_options. So, in our case, when loading A for the second time, it will receive B's options as parameter. The fix here is to apply additional conditions on the content of the previous options. If the journal information they contain don't overlap the journals available for the currently selected companies, it means the previous options were generated for another company, and we ignore them. This way, we'll reload A's first journal group in our example. In the meantime, this commit fixes the way the active companies were treated by this report filter: self.env.companies won't match what we're computing the report for in case account.report's filter_multi_company field is set to 'disabled'. Only the multi_company option key should be used for that. Forward-Port-Of: odoo/enterprise#39782
Since [1] snippet names can be translated. This commit adapts the enterprise snippets to benefit from this improvement. [1]: https://github.com/odoo/odoo/commit/a3b8f373bb73df9a98a7a218cf3ce00d00783853 Forward-Port-Of: odoo/enterprise#39736 Forward-Port-Of: odoo/enterprise#39695
Original PR description
Since [1] snippet names can be translated. This commit adapts the enterprise snippets to benefit from this improvement. [1]: https://github.com/odoo/odoo/commit/a3b8f373bb73df9a98a7a218cf3ce00d00783853 Forward-Port-Of: odoo/enterprise#39736 Forward-Port-Of: odoo/enterprise#39695
Create a Field Service Task Assing a customer, in Timesheet tab add a line with Hours Spent 00:20 Mark as Done Sale Order will be created with a sale order line Total of the line and Total of the order will not match This occurs because the sale order line has been created with an unrounded quantity of 0.333333 opw-3184468 Forward-Port-Of: odoo/enterprise#39350
Original PR description
Create a Field Service Task Assing a customer, in Timesheet tab add a line with Hours Spent 00:20 Mark as Done Sale Order will be created with a sale order line Total of the line and Total of the order will not match This occurs because the sale order line has been created with an unrounded quantity of 0.333333 opw-3184468 Forward-Port-Of: odoo/enterprise#39350
Infinite employment hack: - step 1, fix `uninstall_hook` with the wrong signature, which breaks the uninstall tests (odoo/odoo#118197) - step 2: add a new `uninstall_hook` with the wrong signature, so the uninstall tests remain not working (odoo/enterprise#39710) - step 3: profit Forward-Port-Of: odoo/enterprise#39779
Original PR description
Infinite employment hack: - step 1, fix `uninstall_hook` with the wrong signature, which breaks the uninstall tests (odoo/odoo#118197) - step 2: add a new `uninstall_hook` with the wrong signature, so the uninstall tests remain not working (odoo/enterprise#39710) - step 3: profit Forward-Port-Of: odoo/enterprise#39779
Before this commit, when the user uses `To Resend` and/or `Shifts in Conflict` filters, the search becomes really slow because of the query executed in `_search_overlap_slot_count`. This commits improves the performance by updating the query to fetch the slot for which at least one other slot is in conflict (overlap) task-3269773 Forward-Port-Of: odoo/enterprise#39553
Original PR description
Before this commit, when the user uses `To Resend` and/or `Shifts in Conflict` filters, the search becomes really slow because of the query executed in `_search_overlap_slot_count`. This commits improves the performance by updating the query to fetch the slot for which at least one other slot is in conflict (overlap) task-3269773 Forward-Port-Of: odoo/enterprise#39553
### Bug Currently, creating an intra-community bill and reconciling it with an early payment can break the tax report. ### Steps to reproduce 1. install the Austrian localization (l10n_at) 2. set `Cash Discount Tax Reduction` to `On early payment` 3. create a €1000 intra-community bill (you can just use the tax called `IGE 20%`) 4. set the payment term to`2/7 Net 30` and confirm 5. reconcile the bill with a payment within the discount period (2% discount: €980). 6. check the Tax Report
Original PR description
### Bug Currently, creating an intra-community bill and reconciling it with an early payment can break the tax report. ### Steps to reproduce 1. install the Austrian localization (l10n_at) 2. set…
### Bug Currently, creating an intra-community bill and reconciling it with an early payment can break the tax report. ### Steps to reproduce 1. install the Austrian localization (l10n_at) 2. set `Cash Discount Tax Reduction` to `On early payment` 3. create a €1000 intra-community bill (you can just use the tax called `IGE 20%`) 4. set the payment term to`2/7 Net 30` and confirm 5. reconcile the bill with a payment within the discount period (2% discount: €980). 6. check the Tax Report: line 5.4 of the report should be €196. If you reconciled the bill with a back statement directly, sections `Innergemeinschaftliche Erwerb` and `Bemessungsgrundlage` will be wrong as well. ### Cause Since the intra-community applies here, the bill will produce two tax lines. And because `Cash Discount Tax Reduction` is set to `On early payment`, those two tax lines will be reduced when an early payment is made. However, because of the way the `is_refund` property of `account.move.line` field is computed on moves of type `entry`, one of those *tax reduction line* will be considered a refund and the other will not. Furthermore, the computed tags are correct only because the taxes are recomputed again when creating the payment. After removing this extra taxes computation, both tax_tag_ids/tax_tag_invert are invalid. So the solution is to fix the method computing the taxes for cash discount lines. opw-3112197 Community PR: odoo/odoo#114801 Forward-Port-Of: odoo/enterprise#39244 Forward-Port-Of: odoo/enterprise#39181
…ances Forward-Port-Of: odoo/enterprise#39704 Forward-Port-Of: odoo/enterprise#39519
Original PR description
…ances Forward-Port-Of: odoo/enterprise#39704 Forward-Port-Of: odoo/enterprise#39519
In this PR, fixes scrolling issue for team kanban by removing overflow-y on kanban class 'o_helpdesk_wrap_kanban_view'. task-3128541 Forward-Port-Of: odoo/enterprise#39674 Forward-Port-Of: odoo/enterprise#36847
Original PR description
In this PR, fixes scrolling issue for team kanban by removing overflow-y on kanban class 'o_helpdesk_wrap_kanban_view'. task-3128541 Forward-Port-Of: odoo/enterprise#39674 Forward-Port-Of: odoo/enterprise#36847
`action_merge_contextual_enable` has issues. Primarily the addition of xids in odoo/enterprise#22664: because the xids are linked to `data_merge` and this utility function is used by submodules, so when e.g. `data_merge_crm` is uninstalled, the actions it has installed remain, which is an issue. However there is a more insidious issue: when the linked module (`crm` above) is uninstalled, the model it defines are removed, which removes the *server actions* via a cascade (on `model_id`). How
Original PR description
`action_merge_contextual_enable` has issues. Primarily the addition of xids in odoo/enterprise#22664: because the xids are linked to `data_merge` and this utility function is used by submodules, so…
`action_merge_contextual_enable` has issues. Primarily the addition of xids in odoo/enterprise#22664: because the xids are linked to `data_merge` and this utility function is used by submodules, so when e.g. `data_merge_crm` is uninstalled, the actions it has installed remain, which is an issue. However there is a more insidious issue: when the linked module (`crm` above) is uninstalled, the model it defines are removed, which removes the *server actions* via a cascade (on `model_id`). However because the ir.model.data records are linked to `data_merge`, they still are not removed when the *action* is deleted. This, then, causes a major issue on reinstall: the model gets reinstalled, the action has to follow, but when trying to re-create the IMD that blows up because the same (module, name) already exists. The hacky solution is to look for the existing IMD, and if it's found update it to link to the action we just created. The better solution would be to either create a record directly so it can be linked to a XID hard-coded in the data file, or for the caller to pass in their module name, so the action can be linked to the correct module and garbage-collected when the module is uninstalled. Sadly that would require data file changes at least and `-u`pdates for it to work correctly, as well as an upgrade script to migrate the existing xids over. Forward-Port-Of: odoo/enterprise#39732
[FIX] knowledge: correctly destroy/unmount apps Versions: 16.0+ How to reproduce: - open an article in Knowledge - create a / item list (list view) - remove it (i.e. with `backspace` key) - resize the browser window Current Behavior: - traceback Expected Behavior: - no traceback Fix: Removing a "mounted" component from the dom without destroying it implies that all its listeners are still active in the document, and it can cause crashes like the one with list redimensionni
Original PR description
[FIX] knowledge: correctly destroy/unmount apps Versions: 16.0+ How to reproduce: - open an article in Knowledge - create a / item list (list view) - remove it (i.e. with `backspace` key) - resize…
[FIX] knowledge: correctly destroy/unmount apps Versions: 16.0+ How to reproduce: - open an article in Knowledge - create a / item list (list view) - remove it (i.e. with `backspace` key) - resize the browser window Current Behavior: - traceback Expected Behavior: - no traceback Fix: Removing a "mounted" component from the dom without destroying it implies that all its listeners are still active in the document, and it can cause crashes like the one with list redimensionning. As such, we have to destroy any component when it leaves the DOM, and reconstruct it when it comes back (i.e. remove the list with backspace, and re-insert it with CTRL+Z (undo)). Instead of using Editor events, the proposed strategy in this commit is to use a Mutation Observer on the editable of the html field, because this way we are independent from editor implementation changes, and we don't have to maintain an ever growing list of editor event listeners in the Knowledge patch of the html field. As the MutationObserver handle mutations after they already occured (i.e. a removed element is already out of the DOM), it is sometimes necessary to put the anchor of a Behavior back in the DOM to destroy the App and its Components. It is done by introducing a `d-none` element next to the editable. A mutex is also introduced for the method "updateBehaviors", in order not to have it run multiple times at once (if the first one is still "awaiting", a mutation could cause another call to it in the meantime). A second fix on the Articles Structure Behavior and one of its tests was also necessary because it could crash any time since there was a missing await: [FIX] knowledge: properly await articles structure in test Fixes 2 problems related to the articles structure command: 1) A Component should never modify its own props (only the parent can do it). Using a state property for the content instead ensure that the component is re-rendered when the value changes. 2) Calling a `record.save` may trigger a full reload of the view, it should be done with `noReload: true` and `stayInEdition: true` to prevent that. This commit is motivated by the fact that the test: `Check Articles Index is correctly built - and updated` could fail (probably because of the reload caused by the `record.save`). Task-3236156 Forward-Port-Of: odoo/enterprise#39750 Forward-Port-Of: odoo/enterprise#38345
Steps to reproduce: - Install 'Contacts' and 'Data Merge' modules - Create two contact with same name - Go to Data Cleaning -> Configuration -> Deduplication - Select 'Contact' rule - Click on 'Deduplicate' - Select one of the record (to open res.partner record) - Delete record (`res.partner` record, not the `data_merge.record`) - Go back (the merge record related to the original deleted record should have `*Record Deleted*` as name) - Go to 'Scheduled Actions' -
Original PR description
Steps to reproduce: - Install 'Contacts' and 'Data Merge' modules - Create two contact with same name - Go to Data Cleaning -> Configuration -> Deduplication - Select 'Contact' rule - Click on 'Deduplicate' - Select one of the record (to open res.partner record) - Delete record (`res.partner` record, not the `data_merge.record`) - Go back (the merge record related to the original deleted record should have `*Record Deleted*` as name) - Go to 'Scheduled Actions' - Search for `Data Merge: Cleanup Records` - Click on 'Run Manually' Issue: Traceback is raised. Cause: The cron is trying to access to original record who is deleted. Solution: If original record is deleted, delete merge record. opw-3196145 Forward-Port-Of: odoo/enterprise#39693 Forward-Port-Of: odoo/enterprise#39001