Tuesday, December 26, 2023
23 changes · master
Enhancements to existing features
Manufacturing orders now raise an exception when required component lines are removed or their consumption quantities are reduced. This helps prevent downstream transfer issues and also covers related child manufacturing orders in make-to-order flows.
Original PR description
Before commit: ================== In MO if a line is deleted or line has its to consume quantity reduced so in transfers user does not get any kind of warning or exception, same case in the child MO (MTO use case) when it exists if line is deleted or line has its to consume quantity reduced. After commit: ================ Exception is created when a line is deleted or line has its to consume quantity reduced and when child MO (MTO use case) when it exists. task: 3283010
The website table of contents snippet now uses editable text blocks for its default content. This lets users adjust the number of columns more easily when designing website pages, improving layout flexibility without technical work.
Original PR description
This commit replaces the simple blocks used in the "table of content" snippet with "s_text_block" snippets. This change allows users to modify the number of columns in the default content of the "table of content" snippet. task-2991349
The partner tax identification field now shows the country-specific label, such as GST number for India, instead of a generic Tax ID label. This makes customer and vendor forms clearer for businesses operating in India and helps users enter the right tax information.
Original PR description
In this commit ========================== The string for vat field must be according to the string for vat_label in country but it was not working due to vat replaced in other module, so made changes to set label for vat according to country. task-3627700
Code cleanup and technical improvements
The mail app's chatter-related files were reorganized into a dedicated area. This internal cleanup prepares Odoo to reuse backend chatter features in the portal, without changing current business workflows.
Original PR description
This commit moves the files related to chatter from `@mail/core/web` to `@mail/chatter`. It's needed as a preparation for using the backend chatter in portal. Part of task #2828744 [Related enterprise PR](https://github.com/odoo/enterprise/pull/53284)
Miscellaneous changes
Since [1] when the `Colorpicker` template cache was moved from `ColorPalette` to `getColorPickerTemplateService`, the custom buttons fill color cannot be set as a gradient anymore. This happens because the needed `getTemplate` props is injected for the font and background colors, for the `we-colorpicker` but not for the link tools color palettes. This commit restores the gradient color selection for custom buttons by linking the `getColorPickerTemplateService` to the link tools color palette
Original PR description
Since [1] when the `Colorpicker` template cache was moved from `ColorPalette` to `getColorPickerTemplateService`, the custom buttons fill color cannot be set as a gradient anymore. This happens because the needed `getTemplate` props is injected for the font and background colors, for the `we-colorpicker` but not for the link tools color palettes. This commit restores the gradient color selection for custom buttons by linking the `getColorPickerTemplateService` to the link tools color palettes. Steps to reproduce: - Edit Home page. - Click on "Contact Us" link in header. - Select link style "Custom" in link tools. - Open "Fill Color" palette. => Gradient tab was not shown in palette. [1]: https://github.com/odoo/odoo/commit/1d2e54088b0f0e28464ab6aa884fb2e1110e8e04 task-3641914 Forward-Port-Of: odoo/odoo#146485
The organization of chatter-related files was updated so they sit in a dedicated area. This prepares Odoo to reuse backend chatter features in the portal while keeping current business behavior unchanged.
Original PR description
This commit moves the files related to chatter from `@mail/core/web` to `@mail/chatter`. It's needed as a preparation for using the backend chatter in portal. Part of task #2828744 [Related Odoo PR](https://github.com/odoo/odoo/pull/147245)
Please take a look at README for technical details. we removed the hosted checkout flow. task-3495914 Forward-Port-Of: odoo/odoo#143525
Original PR description
Please take a look at README for technical details. we removed the hosted checkout flow. task-3495914 Forward-Port-Of: odoo/odoo#143525
Befoer this commit, duplicating a POS payment method led to automatic assignment to the source payment method's POS configs. This behavior caused issues, particularly when the POS session was open. opw-3635647 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146192
Original PR description
Befoer this commit, duplicating a POS payment method led to automatic assignment to the source payment method's POS configs. This behavior caused issues, particularly when the POS session was open. opw-3635647 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146192
Before this commit, the "animation" option would be shown for image of type url-attachment-redirect. From there, selection the option would result in a crash if the image was CORS protected (which is often the case). Step to reproduce: - Drag & drop "Text - Image" snippet - Double click on an image to replace it - Select in the media dialog "Add URL" and insert a CORS protected image URL - The image is correctly added, and its url is something like `/web/image/123-redirect/xxx.jp
Original PR description
Before this commit, the "animation" option would be shown for image of type url-attachment-redirect. From there, selection the option would result in a crash if the image was CORS protected (which is often the case). Step to reproduce: - Drag & drop "Text - Image" snippet - Double click on an image to replace it - Select in the media dialog "Add URL" and insert a CORS protected image URL - The image is correctly added, and its url is something like `/web/image/123-redirect/xxx.jpg` - Click on the image and then click on its "Animation" option -> It crashes Same flow is possible with absolute URL of a CORS protected image. Technical note: JS `fetch()` takes advantage of the browser cache, no need to create a `Map` cache for it, despite the `_computeVisibility()` method being called multiple times. Forward-Port-Of: odoo/odoo#146732
The margin between the `Log note`/`Activities` is more than `Send message`/`Log note` buttons. Which looks weird after the `WhatsApp` button is added. So, we update the margin between `Log note`/`Activities` to be the same as `Send message`/`Log note` buttons. task-[3497496](https://www.odoo.com/web#id=3497496&cids=2&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146811
Original PR description
The margin between the `Log note`/`Activities` is more than `Send message`/`Log note` buttons. Which looks weird after the `WhatsApp` button is added. So, we update the margin between `Log note`/`Activities` to be the same as `Send message`/`Log note` buttons. task-[3497496](https://www.odoo.com/web#id=3497496&cids=2&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146811
updated list 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#147295
Original PR description
updated list 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#147295
A anchor menu in the mobile offcanvas related to an element in the current page doesn't work in offcanvas. This is because the menu anchor navigation is hooked to use our own scrolling behavior instead of the browser one. Doing so, we preventDefault, which prevent the offcanvas menu to close itself when clicking on a anchor menu. This commit simply manually close the offcanvas and once the closing animation is complete, starts our own smooth scrolling. Another possibility would h
Original PR description
A anchor menu in the mobile offcanvas related to an element in the current page doesn't work in offcanvas. This is because the menu anchor navigation is hooked to use our own scrolling behavior instead of the browser one. Doing so, we preventDefault, which prevent the offcanvas menu to close itself when clicking on a anchor menu. This commit simply manually close the offcanvas and once the closing animation is complete, starts our own smooth scrolling. Another possibility would have been to just close manually the offcanvas without a preventDefault and without a call to our custom scrolling method. Doing so, the browser would naturally scroll to the element while we close the offcanvas but it would be less elegant as you wouldn't see the scrolling animation. Note that the offcanvas was introduced with commit [1]. [1]: https://github.com/odoo/odoo/commit/bc13176de8d66bbdc1c536017b1f046c5fd31a86 opw-3604963 Forward-Port-Of: odoo/odoo#146132
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#147047
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#147047
The "Channel subscription is renewed when channel is left" test ensures the bus subscription is renewed when the user leaves the channel. In order to do so, the test relies on a patch of the bus service and awaits the `waitUntilSubscribe` helper. This is not correct: the subscription will never be triggered since the bus service method is patched to only call `assert.step`. This test passes most of the time by luck: `waitUntilSubscribe` detects the first subscription (the one that is tr
Original PR description
The "Channel subscription is renewed when channel is left" test ensures the bus subscription is renewed when the user leaves the channel. In order to do so, the test relies on a patch of the bus service and awaits the `waitUntilSubscribe` helper. This is not correct: the subscription will never be triggered since the bus service method is patched to only call `assert.step`. This test passes most of the time by luck: `waitUntilSubscribe` detects the first subscription (the one that is triggered when starting the bus service) and the delay is most of the time enough for the step to be ready. This PR fixes the issue by: - waiting the first subscription to ensure it does not interfere with the test. - removing the bus service patch: waiting for the subscription is enough. fixes runbot-46941 Forward-Port-Of: odoo/odoo#147255
Current behavior: When a quotation is modified and the order is settled in the same time, you get an error when trying to pay for the order. Steps to reproduce: - Create a quotation with 3 lines - Settle the order in the PoS - Modify the quotation (remove one line) - Go back to PoS, and try to pay for the order opw-3614770 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147286
Original PR description
Current behavior: When a quotation is modified and the order is settled in the same time, you get an error when trying to pay for the order. Steps to reproduce: - Create a quotation with 3 lines - Settle the order in the PoS - Modify the quotation (remove one line) - Go back to PoS, and try to pay for the order opw-3614770 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147286
Steps to reproduce: - Create a product with AVCO that you invoice on Ordered quantities in the Vendor tab. - Create a PO with a value of 200 - Create an invoice and change the price to 100. Then cancel the Invoice. - Create a new invoice and confirm it without changing anything (so price is 200) - Receive the product - The valuation will be 150, the average of the 2 invoices. Bug: all linked invoices are taken into account Fix: only consider posted ones opw-3633051 Forward-Port
Original PR description
Steps to reproduce: - Create a product with AVCO that you invoice on Ordered quantities in the Vendor tab. - Create a PO with a value of 200 - Create an invoice and change the price to 100. Then cancel the Invoice. - Create a new invoice and confirm it without changing anything (so price is 200) - Receive the product - The valuation will be 150, the average of the 2 invoices. Bug: all linked invoices are taken into account Fix: only consider posted ones opw-3633051 Forward-Port-Of: odoo/odoo#147485 Forward-Port-Of: odoo/odoo#146644
[FIX] website_sale_stock_renting : Security time warning Steps to reproduce: 1- Install Website, Rentals, Sales and Inventory modules 2- Set a security time in one of the rentals 3- Go to Rental settings and set 'Minimum Rental Days' to 1 Day or Delete the Hourly rental option from the product 4- Go to Website and try to rent the product and set the start date to be before the security time 5- The 'Your rental product cannot be prepared as fast, please rent later.' will not appear
Original PR description
[FIX] website_sale_stock_renting : Security time warning Steps to reproduce: 1- Install Website, Rentals, Sales and Inventory modules 2- Set a security time in one of the rentals 3- Go to Rental…
[FIX] website_sale_stock_renting : Security time warning Steps to reproduce: 1- Install Website, Rentals, Sales and Inventory modules 2- Set a security time in one of the rentals 3- Go to Rental settings and set 'Minimum Rental Days' to 1 Day or Delete the Hourly rental option from the product 4- Go to Website and try to rent the product and set the start date to be before the security time 5- The 'Your rental product cannot be prepared as fast, please rent later.' will not appear Current behavior before PR: When trying to rent a product through Website and the product has a security time if the 'Minimum Rental Days' is set with any duration that is not hours or if there is no Hourly rental option the security time warning will not appear. This happens because the condition that need to be passed to print this warning check if the duration is in hour or not which I think is not necessary because the security time has nothing to do with the UoM of the duration. This condition is only important to check if we will display hours option in the calendar widget or not. Desired behavior after PR is merged: This has been solved by removing the condition that checks if the duration's UoM is hours or not. Now we are just comparing the rental start date and the security time. opw-3553870 Forward-Port-Of: odoo/enterprise#53143
After the sign conversion to OWL, changing the placeholder of a sign item while editing a template, would not save the placeholder changes to the sign template. This commit fixes this issue. task-3576993 Forward-Port-Of: odoo/enterprise#53149 Forward-Port-Of: odoo/enterprise#49928
Original PR description
After the sign conversion to OWL, changing the placeholder of a sign item while editing a template, would not save the placeholder changes to the sign template. This commit fixes this issue. task-3576993 Forward-Port-Of: odoo/enterprise#53149 Forward-Port-Of: odoo/enterprise#49928
**Before this PR:** `WhatsApp` is always displayed even if there are no approved templates for the model which returns a `ValidationError`. Which is just noise. **After this PR:** - Do not display the button if no approved templates for the model - Button should be always visible to admin users as they can create templates. - After clicking on `Configure Templates` button in the warning popup the `Whatsapp Templates` should be opened with a filter for the current model. task-[34974
Original PR description
**Before this PR:** `WhatsApp` is always displayed even if there are no approved templates for the model which returns a `ValidationError`. Which is just noise. **After this PR:** - Do not display the button if no approved templates for the model - Button should be always visible to admin users as they can create templates. - After clicking on `Configure Templates` button in the warning popup the `Whatsapp Templates` should be opened with a filter for the current model. task-[3497496](https://www.odoo.com/web#id=3497496&cids=2&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#53066
Since [1], the "Check that individual and total overtime is properly displayed" test patches the `setTimeout` function. This sometimes leads to infinite recursion when the `multi_tab` service has enough time to initialize: this service make use of `setTimeout` to call the `heartbeat` method repeatedly. Moreover, patching the `setTimeout` method is not a good idea since it makes this method synchronous which totally changes the flow that is tested. This PR fixes this issue by using the `
Original PR description
Since [1], the "Check that individual and total overtime is properly displayed" test patches the `setTimeout` function. This sometimes leads to infinite recursion when the `multi_tab` service has enough time to initialize: this service make use of `setTimeout` to call the `heartbeat` method repeatedly. Moreover, patching the `setTimeout` method is not a good idea since it makes this method synchronous which totally changes the flow that is tested. This PR fixes this issue by using the `contains` helper instead: this method will wait for the element to be inserted in the DOM and perform the assertion afterwards. fixes runbot-24889 [1]: https://github.com/odoo/enterprise/pull/46991 Forward-Port-Of: odoo/enterprise#53205
Before this commit: When we try to open the activity view in debug mode we get a traceback. Technical Reason: - After the following [COMMIT](https://github.com/odoo-dev/enterprise/commit/127f512b1a72957eb23c41103ecab44e1fdce0e7#diff-78d9f8faf609f35072d4b2617a9e13b3f137a679efb2c46c84acf29da4edfe46R67), the static prop 'fields' was added to the `DocumentsInspector`. Hence when we turn on the debug mode (i.e. when validating the props), the `fields` prop is not found, resulting in a trac
Original PR description
Before this commit: When we try to open the activity view in debug mode we get a traceback. Technical Reason: - After the following [COMMIT](https://github.com/odoo-dev/enterprise/commit/127f512b1a72957eb23c41103ecab44e1fdce0e7#diff-78d9f8faf609f35072d4b2617a9e13b3f137a679efb2c46c84acf29da4edfe46R67), the static prop 'fields' was added to the `DocumentsInspector`. Hence when we turn on the debug mode (i.e. when validating the props), the `fields` prop is not found, resulting in a traceback. - The reason is that its value is not passed when called from the `DocumentsActivityRenderer`. - We do not get the traceback when debug mode is turned off, because in the activity view, the template rendered by the `DocumentsInspector` does not read the value inside the `fields` prop. After this commit: The activity view will be open without any issues. Task-3491723 Forward-Port-Of: odoo/enterprise#52201
Using the group id to add a user instead of the one added in implied_ids. This causes consistency problems in access and rendering of views. Forward-Port-Of: odoo/enterprise#53182
Original PR description
Using the group id to add a user instead of the one added in implied_ids. This causes consistency problems in access and rendering of views. Forward-Port-Of: odoo/enterprise#53182
In order to be compliant with WCAG AA norms, some buttons weren't accessible with the keyboard for the submission of the VAT return report. task-3631625 Forward-Port-Of: odoo/enterprise#53218
Original PR description
In order to be compliant with WCAG AA norms, some buttons weren't accessible with the keyboard for the submission of the VAT return report. task-3631625 Forward-Port-Of: odoo/enterprise#53218