Tuesday, May 14, 2024
28 changes · saas-17.2
Enhancements to existing features
New users created during web application tests now automatically receive an associated contact record. This makes test behavior more realistic and helps prevent issues caused by missing customer or contact information.
Original PR description
Before this PR, new users created in hoot tests didn't have any partner associated. This PR automatically creates a new partner.
Resolved issues and error corrections
Creating lot numbers through import no longer triggers an error when expected receipt data is missing. The system now uses the product quantity as a fallback, helping warehouse users complete imports without interruption.
Original PR description
Fixing a traceback JS error happening when attempting to create lot numbers with import. Odoo will try to read the value of totalReceived even though it doesn't exist. With this PR, if totalReceived is not defined, it will correctly use `props.move.data.product_qty`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
The website learning module's internal automated tests were updated to a newer testing framework. This helps maintain reliability of the module while reducing future maintenance effort, with no direct change expected for end users.
Original PR description
part of task-3818666
Miscellaneous changes
Steps to reproduce: 1. Configure Sendcloud shipping with pick-up locations 2. Go to website and use the shipping method and select a pick-up location 3. Try step 2 again, using the same pick-up point but with a different name 4. Checking the delivery address of the second customer, we see the name of the first customer is used The problem is that if a pick-up location is already saved, we re-use the same contact for the delivery address. This commit ensures separate contacts are created f
Original PR description
Steps to reproduce: 1. Configure Sendcloud shipping with pick-up locations 2. Go to website and use the shipping method and select a pick-up location 3. Try step 2 again, using the same pick-up point but with a different name 4. Checking the delivery address of the second customer, we see the name of the first customer is used The problem is that if a pick-up location is already saved, we re-use the same contact for the delivery address. This commit ensures separate contacts are created for different customers. opw-3853716 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#162950
This update moves enterprise mail tests to a newer internal testing framework. It helps keep the mail app's test coverage easier to maintain without changing day-to-day user functionality.
Original PR description
part of task-3818666 enterprise: https://github.com/odoo/enterprise/pull/62419
The email enterprise test suite was migrated to a newer testing framework. This internal cleanup helps maintain test reliability and makes future changes easier to validate without affecting end users.
Original PR description
part of task-3818666 community: https://github.com/odoo/odoo/pull/165340
*: website, survey Since commit [1] the calendar icon in input group date is not clickable anymore and does not open the date picker anymore. This commit simply restore that by auto discovering the calendar icon, should the input group follow this common pattern: ```xml <div class="input-group date"> <input type="text" class="form-control datetimepicker-input" /> <div class="input-group-text"><i class="fa fa-calendar"></i></div> </div> ``` This see
Original PR description
*: website, survey Since commit [1] the calendar icon in input group date is not clickable anymore and does not open the date picker anymore. This commit simply restore that by auto discovering the…
*: website, survey
Since commit [1] the calendar icon in input group date is not clickable
anymore and does not open the date picker anymore.
This commit simply restore that by auto discovering the calendar icon,
should the input group follow this common pattern:
```xml
<div class="input-group date">
<input
type="text"
class="form-control datetimepicker-input"
/>
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
```
This seems enough to cover all cases detected in the website apps:
- <details><summary>The two datepicker in /my/opportunity when editing the lead to adapt
the "Expected Closing" and "Next Activity Date" fields</summary>

</details>
- <details><summary>The website form date(time) input</summary>

</details>
- <details><summary>The ecommerce renting product rental period inputs ("from" and "to"
dates) </summary>

</details>
- <details><summary>The `o_website_sale_daterange_picker` snippet</summary>

</details>
- <details><summary>The survey date fields</summary>

</details>
- ..maybe other places..
Should there be cases needing this feature for calendar icons which are
not following the suggested input group layout, they can do it this way:
```diff
- this.call("datetime_picker", "create", {
+ const picker = this.call("datetime_picker", "create", {
// ...
}).enable();
+ this.el.parentNode.querySelector(".input-group-text").addEventListener("click", picker.openPicker(0));
```
[1]: https://github.com/odoo/odoo/commit/910897fc97d87b08f01627094ec8c159f5267628
Forward-Port-Of: odoo/odoo#161466There is an issue with some of the images having `loading="lazy"` attribute. Those are incorrectly marked as edited (dirty). This is because those images do receive a `min-height` style attribute change when the widget is started thanks to [1]: - On page load, the images receive `style.minHeight = '1px';` - Once the images have been load a few moment later, this `min-height` is removed / restored to its initial value. If there were no initial value and if there is no other style att
Original PR description
There is an issue with some of the images having `loading="lazy"` attribute. Those are incorrectly marked as edited (dirty). This is because those images do receive a `min-height` style attribute…
There is an issue with some of the images having `loading="lazy"` attribute. Those are incorrectly marked as edited (dirty). This is because those images do receive a `min-height` style attribute change when the widget is started thanks to [1]: - On page load, the images receive `style.minHeight = '1px';` - Once the images have been load a few moment later, this `min-height` is removed / restored to its initial value. If there were no initial value and if there is no other style attribute on the image, it will leave the image with an empty `style` attribute. But commit [2] made it so those empty attribute (class/style) are removed from the DOM as part of the sanitizing process. This commit does 2 things: - It disable the wysiwyg observer while commit [1] `min-height` operations are being one. - It prevent commit [1] to leave images with an empty `style` attribute. Note: - it was detected on our Odoo.com/app/expenses where a single word change in a section flags 27 unrelated images as o_dirty and ultimately triggers 27 save rpc call instead of only one. - commit [2] was merged in Odoo 16 but only seems to lead to this bug in Odoo 16.4. Something else is probably involved in the o_dirty addition process. It doesn't seems worth it investigating deeper to find exactly what as this commit changes are things that probably should have been done initially anyway. [1]: https://github.com/odoo/odoo/commit/e9ef21b6cd5ae58322fa9102f9f34f06835f0485 [2]: https://github.com/odoo/odoo/commit/5962b9ee2e90cc04ede1c1f9bbb519869db77f71 Forward-Port-Of: odoo/odoo#164742 Forward-Port-Of: odoo/odoo#150535
`test_invoice_is_final` enforces that `_create_invoices` is called with the final argument. The issue is that when overriding the method in l10n_ec_website_sale, we call super() without respecifying the arguments, which makes the test fail. runbot-56914 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164975
Original PR description
`test_invoice_is_final` enforces that `_create_invoices` is called with the final argument. The issue is that when overriding the method in l10n_ec_website_sale, we call super() without respecifying the arguments, which makes the test fail. runbot-56914 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164975
The issue: When many bills that already exist in the system and are in a pending state in the proxy server, Odoo infinitely tries to pull them at each call of the cron, which leads to not fetching the new bill and being stuck only with the existing ones Expected behavior: To fetch new bills and avoid the existing ones in the upcoming calls of the cron opw-3851896 Forward-Port-Of: odoo/odoo#164592
Original PR description
The issue: When many bills that already exist in the system and are in a pending state in the proxy server, Odoo infinitely tries to pull them at each call of the cron, which leads to not fetching the new bill and being stuck only with the existing ones Expected behavior: To fetch new bills and avoid the existing ones in the upcoming calls of the cron opw-3851896 Forward-Port-Of: odoo/odoo#164592
Have a numeric field in a form view. The displayed value is formatted, according to the thousands and decimal separators. Say the value is 1,240.00. If the user edits the input and types the same value, i.e. 1240, and then press "Enter", "Tab" or "Shift- Tab", the value won't be formatted as it should be, because we detect no change of value (which is true, but the value should be formatted anyway). With this commit, the value is always formatted on "Enter", "Tab" and "Shift-Tab". Issue sp
Original PR description
Have a numeric field in a form view. The displayed value is formatted, according to the thousands and decimal separators. Say the value is 1,240.00. If the user edits the input and types the same value, i.e. 1240, and then press "Enter", "Tab" or "Shift- Tab", the value won't be formatted as it should be, because we detect no change of value (which is true, but the value should be formatted anyway). With this commit, the value is always formatted on "Enter", "Tab" and "Shift-Tab". Issue spotted by fp 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#165212 Forward-Port-Of: odoo/odoo#164953
Current behavior: When adding a product with variant in a self order. The extra price was not saved correctly, and so when modifying the quantity from the normal PoS the price was not taking the extra price into account. Steps to reproduce: - Setup PoS to use QR Menu ordering - Create a product with a variant (never create option) - Make sure the variants adds an extra price - Open the self ordering screen an add this product - Add the product to the order and validate it - Go on the n
Original PR description
Current behavior: When adding a product with variant in a self order. The extra price was not saved correctly, and so when modifying the quantity from the normal PoS the price was not taking the extra price into account. Steps to reproduce: - Setup PoS to use QR Menu ordering - Create a product with a variant (never create option) - Make sure the variants adds an extra price - Open the self ordering screen an add this product - Add the product to the order and validate it - Go on the normal PoS and open the order - Change the quantity of the product - The unit price is back to the normal (not considering the extra price) opw-3769465 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163401
Currently, when a portal user creates a task in a project, the stage is set to none, which create a new stage in the pipe. Steps to reproduce: ------------------- * Connect to the db as a portal user * Navigate to **Projects** * Select any * Create a new task * Refresh the page > Observation: The task is created in the None stage Why the fix: ------------ The `stage_id` of the task created by the portal user is set to false here: https://github.com/odoo/odoo/blob/e38f711864bd380f
Original PR description
Currently, when a portal user creates a task in a project, the stage is set to none, which create a new stage in the pipe. Steps to reproduce: ------------------- * Connect to the db as a portal user…
Currently, when a portal user creates a task in a project, the stage is set to none, which create a new stage in the pipe.
Steps to reproduce:
-------------------
* Connect to the db as a portal user
* Navigate to **Projects**
* Select any
* Create a new task
* Refresh the page
> Observation: The task is created in the None stage
Why the fix:
------------
The `stage_id` of the task created by the portal user is set to false here:
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L928-L929
Prior to https://github.com/odoo/odoo/commit/fb88a7448c75fdcbe1d9c3664402a1dea2733326, the `project_id` was computed as `project_id = vals.get('project_id') or self.env.context.get('default_project_id')`. Now it is defined as follows:
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L894
If `vals.get('project_id')` is false/none, the task is still created using `self.env.context.get('default_project_id')` for portal users.
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L955-L958
https://github.com/odoo/odoo/blob/e38f711864bd380f793c1efa16c86c6ba2229646/addons/project/models/project_task.py#L813-L820
We recompute `project_id` using the context value. We do that after the following piece of code so that, in the case of subtasks, they are not displayed in the project.
https://github.com/odoo/odoo/blob/8780f8d9799eed7188d6577c6bb2690df598196e/addons/project/models/project_task.py#L916-L929
This aloows to keep the writing cascade on the field `project_id`
https://github.com/odoo/odoo/blob/8780f8d9799eed7188d6577c6bb2690df598196e/addons/project/models/project_task.py#L1007-L1009
opw-3873983
Forward-Port-Of: odoo/odoo#164201Description of the issue/feature this PR addresses: Before this PR the field is_kits is not searchable. It is useful in large database to find all product kit easely. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164766 Forward-Port-Of: odoo/odoo#156019
Original PR description
Description of the issue/feature this PR addresses: Before this PR the field is_kits is not searchable. It is useful in large database to find all product kit easely. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164766 Forward-Port-Of: odoo/odoo#156019
Forward-Port-Of: odoo/odoo#165235
Original PR description
Forward-Port-Of: odoo/odoo#165235
[IMP] Accounting: Set send by Peppol default instead of Send by email & Send by Peppol Set send by Peppol default instead of Send by email & Send by Peppol in sending the invoice Reason: To avoid sending the email twice unless the client wants that, He will still have the option to do so Task-3829627 Forward-Port-Of: odoo/odoo#160183
Original PR description
[IMP] Accounting: Set send by Peppol default instead of Send by email & Send by Peppol Set send by Peppol default instead of Send by email & Send by Peppol in sending the invoice Reason: To avoid sending the email twice unless the client wants that, He will still have the option to do so Task-3829627 Forward-Port-Of: odoo/odoo#160183
This traceback occurs when the user clicks on the `employee` smart button. To reproduce this issue:- 1) Install `Employees`, `contacts` without demo data 2) Enter into `multi-company` environment by creating a new company 3) Now create a new `employee` with company as new company and related `user` in the `Hr settings` as `Administrator` 4) Now switch to `single company` environment by disabling new company 5) click on the `employee` smart button from `contact` module for the
Original PR description
This traceback occurs when the user clicks on the `employee` smart button. To reproduce this issue:- 1) Install `Employees`, `contacts` without demo data 2) Enter into `multi-company` environment by…
This traceback occurs when the user clicks on the `employee` smart button.
To reproduce this issue:-
1) Install `Employees`, `contacts` without demo data
2) Enter into `multi-company` environment by creating a new company
3) Now create a new `employee` with company as new company and
related `user` in the `Hr settings` as `Administrator`
4) Now switch to `single company` environment by disabling new company
5) click on the `employee` smart button from `contact` module for the
`Administrator` record
6) A traceback occurs
Error:-
```
ValueError: Expected singleton: hr.employee(1, 3)
```
Because after the commit `{1 }` from `saas-17.1`
when we have multiple records for a record in `multi-companies`
and shift to `single company`, the other company records are also `accessible`.
Because of that it leads to the above traceback when trying to access `id` from `self.employee_ids`
https://github.com/odoo/odoo/blob/4f9b67938032a8b253d930a70acd2283b30ecda6/addons/hr/models/res_partner.py#L30-L36
[1] https://github.com/odoo/odoo/pull/159210/commits/3c8e4496702a07d1f6e989882f69c3b93b82f663
After applying this commit will resolve this issue by filtering
the `employee_ids` based on the current company record `id`
sentry-5289238474
Forward-Port-Of: odoo/odoo#164294Description of the issue/feature this PR addresses: After removing the text from a tag with data-oe-type 'text' or 'char', and then saving, you can no longer edit it. It is because when the text is removed and and field is saved it becomes empty and its not possible to put the cursor inside an empty tag. This PR fills such empty tags when loading the document. task-3858711 Forward-Port-Of: odoo/odoo#165207 Forward-Port-Of: odoo/odoo#162426
Original PR description
Description of the issue/feature this PR addresses: After removing the text from a tag with data-oe-type 'text' or 'char', and then saving, you can no longer edit it. It is because when the text is removed and and field is saved it becomes empty and its not possible to put the cursor inside an empty tag. This PR fills such empty tags when loading the document. task-3858711 Forward-Port-Of: odoo/odoo#165207 Forward-Port-Of: odoo/odoo#162426
Steps to reproduce: ------------------- - create a new time off type (with approval and allocation) - create an accrual plan with 1 day (monthly on the 1 day of the month) - create two allocations with the type, one regular (X days) and one accrual (Y days) - take a time off of Z days with the condition: Z < X + Y - run `Time Off: Cancel invalid leaves` scheduled action Issue: ------ The time off is canceled with the following message: ``` The time off has been canceled: the accruat
Original PR description
Steps to reproduce: ------------------- - create a new time off type (with approval and allocation) - create an accrual plan with 1 day (monthly on the 1 day of the month) - create two allocations…
Steps to reproduce: ------------------- - create a new time off type (with approval and allocation) - create an accrual plan with 1 day (monthly on the 1 day of the month) - create two allocations with the type, one regular (X days) and one accrual (Y days) - take a time off of Z days with the condition: Z < X + Y - run `Time Off: Cancel invalid leaves` scheduled action Issue: ------ The time off is canceled with the following message: ``` The time off has been canceled: the accruated amount is insufficient for that duration. ``` Cause: ------ To delete the leave with the cron `_cancel_invalid_leaves`: [A] The leave must be: - between today and today + 31 days - have at least an allocation of type `accrual`. [B] We need an `exceeding_duration`: `additional_leaves_duration > latest_remaining` <=> `additional_leaves_duration > latest_remaining` <=> `additional_leaves_duration > virtual_remaining - date_accrual_bonus + latest_accrual_bonus` <=> `leave.number_of_days > virtual_remaining - date_accrual_bonus + latest_accrual_bonus` <=> `leave.number_of_days > SUM_ALLOC(virtual_remaining_leaves) - SUM_ALLOC(accrual_bonus) + SUM_ALLOC(_get_future_leaves_on(leave.date_from))` <=> `leave.number_of_days > SUM_ALLOC(virtual_remaining_leaves)` (simplify the use case) As we have a regular allocation, the following logic will be used: ```py leave_type_data[allocation]['virtual_remaining_leaves'] -= allocated_time ``` The result is that the condition cancelling the leave will be respected when it should not. Solution: --------- Move the logical block which adds the leave to `to_recheck_leaves` if an `accrual` type allocation is detected, so as not to make changes with regular allocations. opw-3869889 Forward-Port-Of: odoo/odoo#164979 Forward-Port-Of: odoo/odoo#164556
## Description The `onchange` triggered when changing the `allow_billable` setting of a large long living project with a high number of associated timesheets can take a quite a while. After profiling, a significant portion of the bottleneck was coming from *frequent* calls to the `__hash__` function, called when initializing a new `set` in https://github.com/odoo/odoo/blob/cf9aa2a14761a417c641243fc0b2be121c387b46/odoo/models.py#L6838 Left Heavy profile:  ## Improvements - Invariant hoisting: the `set(self._ids)` can be lifted out of the lambda scope capture, passing only a reference to a local variable for all callsite of the lambda. This prevents the re-computation of `set(self._ids)` for each record in `cache_records` due to the linear iteration done by `filtered`. - `not isdisjoint` vs `intersection`: the lambda is checking for the existence of an intersection between 2 sets. But in python the `&` or `intersection` method *construct* a new instance of a `set`. In our case we don't care about the resulting intersection, only about the existence of it. We can improve the situation by inverting the logic using `not isdisjoint`, as `isdisjoint` is simpler internal implementation and doesn't construct any new set, it just checks for disjunction. - CPython `intersection`: https://github.com/python/cpython/blob/333c7dccd87c637d0b15cf81f9bbec28e39664fd/Objects/setobject.c#L1179-L1256 - CPython `isdisjoint`: https://github.com/python/cpython/blob/333c7dccd87c637d0b15cf81f9bbec28e39664fd/Objects/setobject.c#L1338-L1373 A local small `timeit` benchmark showed +- 25% faster performance in favor of `not isdisjoint`. ## Benchmark On a staging database (saas-17.1, blindly backported), the `onchange` triggered by setting a project `allow_billable` from `True` -> `False`, with 70k tasks, and 25k associated timesheets. | | Before | After | Speed Up | |---------|----------------------|---------------------|-------------| | Timings | 246.66 sec (4.1 min) | 66.83 sec (1.1 min) | 3.6x faster | ## Reference task-3872314 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#165138
The aim of this commit is to fix the view returned from the expense split wizard Context: When splitting an expense, the wizard view returns the expense list view with "my expenses" a "to report" filters activated. This makes splitting an expense attributed to someone else return an empty view. After this commit: The view now uses a domain that selects the expenses the wizard modified and/or created task-id: 3911134 --- I confirm I have signed the CLA and read the PR guidelines at
Original PR description
The aim of this commit is to fix the view returned from the expense split wizard Context: When splitting an expense, the wizard view returns the expense list view with "my expenses" a "to report" filters activated. This makes splitting an expense attributed to someone else return an empty view. After this commit: The view now uses a domain that selects the expenses the wizard modified and/or created task-id: 3911134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164499
Check Report Summary line columns were not aligned correctly, fixing it to have partner_name at the beginning, date at the middle, and check sequence number at the end of the line. task id: 3708433 Forward-Port-Of: odoo/enterprise#61149
Original PR description
Check Report Summary line columns were not aligned correctly, fixing it to have partner_name at the beginning, date at the middle, and check sequence number at the end of the line. task id: 3708433 Forward-Port-Of: odoo/enterprise#61149
Backport of: https://github.com/odoo/enterprise/pull/53580 This commit will add the balance sheet and profit and loss of the malta. task: 3627705 Forward-Port-Of: odoo/enterprise#60595
Original PR description
Backport of: https://github.com/odoo/enterprise/pull/53580 This commit will add the balance sheet and profit and loss of the malta. task: 3627705 Forward-Port-Of: odoo/enterprise#60595
This will add the previous year occupation to the double holiday computation. Task: 3893810 Forward-Port-Of: odoo/enterprise#61862
Original PR description
This will add the previous year occupation to the double holiday computation. Task: 3893810 Forward-Port-Of: odoo/enterprise#61862
As packages amount on customer locations side could be huge, don't retrieve those packages as they are not needed. @svs-odoo @Aurelienvd Forward-Port-Of: odoo/enterprise#59473
Original PR description
As packages amount on customer locations side could be huge, don't retrieve those packages as they are not needed. @svs-odoo @Aurelienvd Forward-Port-Of: odoo/enterprise#59473
In this commit [1], we changed the way we display intrastat report lines by grouping them. We did it for all the intrastat report, it was wrong. Actually, we should only do it for the belgian report. The aim of this commit is adding a key in options to know if lines should be grouped or not. By default the option is set to False except for the Belgian report. Since version 16.4, users can change the value by using the filter. task-3892823 [1]: https://github.com/odoo/enterprise/commit/217
Original PR description
In this commit [1], we changed the way we display intrastat report lines by grouping them. We did it for all the intrastat report, it was wrong. Actually, we should only do it for the belgian report. The aim of this commit is adding a key in options to know if lines should be grouped or not. By default the option is set to False except for the Belgian report. Since version 16.4, users can change the value by using the filter. task-3892823 [1]: https://github.com/odoo/enterprise/commit/217594fe8ba00329b3eb5c68e3eca3b556127cde Forward-Port-Of: odoo/enterprise#61538 Forward-Port-Of: odoo/enterprise#61455
Issue: --------- When a user lacks access to employee and setting permissions, the resource image does not appear. Fix: -------- We used the `hr.employee.public` model instead of `hr.employee` because everyone can access this one. Steps: --------- - Install the planning app - Create a user with planning user access, without employee and setting access - Create a Test employee(Test) - Create a shift and assign it to Test - Log in as the planning user
Original PR description
Issue: --------- When a user lacks access to employee and setting permissions, the resource image does not appear. Fix: -------- We used the `hr.employee.public` model instead of `hr.employee` because everyone can access this one. Steps: --------- - Install the planning app - Create a user with planning user access, without employee and setting access - Create a Test employee(Test) - Create a shift and assign it to Test - Log in as the planning user - Open planning and group by department Forward-Port-Of: odoo/enterprise#62251
Allow pos users to have the "internal note" button available even in non-restaurant shops. Task-ID: 3878947 **Before:** Internal note button is only for restaurant. <img width="1800" alt="Screenshot 2024-04-22 at 15 56 44" src="https://github.com/odoo/odoo/assets/3245568/b923a1f5-e7fe-4a8a-b624-c0c31135c4fb"> **After:** <img width="1800" alt="Screenshot 2024-04-22 at 15 55 28" src="https://github.com/odoo/odoo/assets/3245568/fc82f296-7598-46b7-bbe0-0eb199872515"> Forward-Port-Of:
Original PR description
Allow pos users to have the "internal note" button available even in non-restaurant shops. Task-ID: 3878947 **Before:** Internal note button is only for restaurant. <img width="1800" alt="Screenshot 2024-04-22 at 15 56 44" src="https://github.com/odoo/odoo/assets/3245568/b923a1f5-e7fe-4a8a-b624-c0c31135c4fb"> **After:** <img width="1800" alt="Screenshot 2024-04-22 at 15 55 28" src="https://github.com/odoo/odoo/assets/3245568/fc82f296-7598-46b7-bbe0-0eb199872515"> Forward-Port-Of: odoo/odoo#163355 Forward-Port-Of: odoo/odoo#162863