Friday, June 7, 2024
47 changes · saas-17.3
Enhancements to existing features
Demo analytic accounts are now available across companies, so optional plans like Departments and Internal show usable sample data in multi-company setups. Additional sample analytic accounts were also added to make demo scenarios clearer for users evaluating analytic, project, and timesheet flows.
Original PR description
In a multi-company environment, the Analytic Plans "Departments" and "Internal" are optional but have no analytic account. Because analytic account had a default on the env company. We want the analytic account to be available for every company. Also adding some analytic account. task-3970078 enterprise: https://github.com/odoo/enterprise/pull/63898 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The manufacturing accounting demo data now makes analytic accounts available for every company in multi-company setups. This improves the demo experience by ensuring optional analytic plans like Departments and Internal are properly usable regardless of the active company.
Original PR description
In a multi-company environment, the Analytic Plans "Departments" and "Internal" are optional but have no analytic account. Because analytic account had a default on the env company. We want the analytic account to be available for every company. task-3970078 communtiy: https://github.com/odoo/odoo/pull/167995
Resolved issues and error corrections
The receipt screen layout was adjusted so the send receipt button no longer extends beyond the visible area. This improves usability for point-of-sale staff when sending receipts by SMS or other methods.
Original PR description
When the send receipt button is displayed in the receipt screen, it overflows the screen. This commit fixes the issue.
Miscellaneous changes
Since 5c0bb29e8f30, we filter the payments from the miscellaneous operations to display the right value, but we don't do the same for the lines displayed when cliking on the misc operations button, this commit fixes that. opw-3925808 Forward-Port-Of: odoo/odoo#168451
Original PR description
Since 5c0bb29e8f30, we filter the payments from the miscellaneous operations to display the right value, but we don't do the same for the lines displayed when cliking on the misc operations button, this commit fixes that. opw-3925808 Forward-Port-Of: odoo/odoo#168451
The WhatsApp point-of-sale receipt screen has been adjusted so the send receipt button no longer spills outside the visible area. This improves usability for staff by keeping the receipt sharing action accessible and visually tidy.
Original PR description
When the send receipt button is displayed in the receipt screen, it overflows the screen. This commit fixes the issue.
This fixes an error that could cause the Planning calendar view to fail when opening or using it. Users should now be able to access the planning schedule reliably without encountering this crash.
Original PR description
In PlanningView, a traceback happens because a variable is called when it has never been declared before. This PR will add the declaration of the variable and fix the traceback.
With tens of millions of messages, it would take 2.5 seconds to return before this commit, and only 10ms after this commit. Other benchmarks: lateral order: https://explain.dalibo.com/plan/f85dfd1h8b16c8h1 lateral max: https://explain.dalibo.com/plan/c55cd13106ce5dde Before PR for reference: https://explain.dalibo.com/plan/29e460261b6g17d7 Forward-Port-Of: odoo/odoo#167583 Forward-Port-Of: odoo/odoo#167207
Original PR description
With tens of millions of messages, it would take 2.5 seconds to return before this commit, and only 10ms after this commit. Other benchmarks: lateral order: https://explain.dalibo.com/plan/f85dfd1h8b16c8h1 lateral max: https://explain.dalibo.com/plan/c55cd13106ce5dde Before PR for reference: https://explain.dalibo.com/plan/29e460261b6g17d7 Forward-Port-Of: odoo/odoo#167583 Forward-Port-Of: odoo/odoo#167207
- Have `account_peppol` installed - Log in as a user who has read-only accounting rights - Open a customer that is located in Peppol-supported countries and has UBL format, peppol eas and endpoint filled in - An error is displayed saying the user cannot see this partner record `account_edi_proxy_client_ids` is restricted to full accounting rights, so we have to access it with sudo when checking the edi mode for computing the validity of the peppol participant on the network. opw-3950933
Original PR description
- Have `account_peppol` installed - Log in as a user who has read-only accounting rights - Open a customer that is located in Peppol-supported countries and has UBL format, peppol eas and endpoint filled in - An error is displayed saying the user cannot see this partner record `account_edi_proxy_client_ids` is restricted to full accounting rights, so we have to access it with sudo when checking the edi mode for computing the validity of the peppol participant on the network. opw-3950933 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168276
Steps to reproduce: ------------------- - create a regular allocation - save it - refuse it - change the type to accrual and set a plan - save it - take a time off Issue: ------ A traceback occurs. Cause: ------ The commit 7d874be72b0ca95251a47db54d87e34538ec26e3 remove the default value for the `lastcall` field. A value is added to `lastcall` only during create. Therefore during `_process_accrual_plan`, we will have `max(allocation.lastcall, first_level_start_date)`. with `
Original PR description
Steps to reproduce: ------------------- - create a regular allocation - save it - refuse it - change the type to accrual and set a plan - save it - take a time off Issue: ------ A traceback occurs. Cause: ------ The commit 7d874be72b0ca95251a47db54d87e34538ec26e3 remove the default value for the `lastcall` field. A value is added to `lastcall` only during create. Therefore during `_process_accrual_plan`, we will have `max(allocation.lastcall, first_level_start_date)`. with `allocation.lastcall = False`. Solution: --------- Call `_add_lastcalls` during the write to make sure we have a value if the allocation is accrual. opw-3946060 Forward-Port-Of: odoo/odoo#168062 Forward-Port-Of: odoo/odoo#167945
### Steps to reproduce: - In the inventory, create a delivery order for 1 unit of any product - Validate the picking and click on detailed operations - Click on the field of the move named "Pick From", type and create new #### > Traceback error ### Cause of the issue: You should not be able to edit the moves of a done locked picking. However the `quant_id` field is not set to `read_only` in this case: https://github.com/odoo/odoo/blob/c016a5306dd90b90c88e083cc0f0d2ae9c0b649f/addons
Original PR description
### Steps to reproduce: - In the inventory, create a delivery order for 1 unit of any product - Validate the picking and click on detailed operations - Click on the field of the move named "Pick From", type and create new #### > Traceback error ### Cause of the issue: You should not be able to edit the moves of a done locked picking. However the `quant_id` field is not set to `read_only` in this case: https://github.com/odoo/odoo/blob/c016a5306dd90b90c88e083cc0f0d2ae9c0b649f/addons/stock/views/stock_move_views.xml#L263-L267 ### Fix: We add the same `read_only` condition as for the other fields visible on the move. opw-3935214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166017
Before Odoo 16.0, it is possible to have database column whose value is ``NULL`` but still has translation in the ir_translation table. And translations can be displayed correctly in the UI. How to reproduce before Odoo 16.0: 1. Open the form view of a record with non-required translated field. E.g. product.template.sale_description 2. Create a new record and don't touch the translated field for test 3. Directly click the translation button and fill all translations 4. click save The colu
Original PR description
Before Odoo 16.0, it is possible to have database column whose value is ``NULL`` but still has translation in the ir_translation table. And translations can be displayed correctly in the UI. How to…
Before Odoo 16.0, it is possible to have database column whose value is ``NULL`` but still has translation in the ir_translation table. And translations can be displayed correctly in the UI.
How to reproduce before Odoo 16.0:
1. Open the form view of a record with non-required translated field. E.g. product.template.sale_description
2. Create a new record and don't touch the translated field for test
3. Directly click the translation button and fill all translations
4. click save The column for the record's translated field has ``NULL`` value, and the ir_translation table has new translation records with ``NULL`` in the src column
During upgrade, when the column value is converted to jsonb for the translated field by the ORM, it will still be ``NULL``. And in the upgrade script when update the value with all translations, the result will still be ``NULL``. E.g. ``NULL || '{"fr_FR": "french"}'::jsonb``
``NULL || '{"en_US": "english", "fr_FR": "french"}'::jsonb``
In this commit, for the above corner case, we assume the src was empty string instead of NULL. In the above example, the result would be ``'{"en_US": ""}'::jsonb || '{"fr_FR": "french"}'::jsonb`` ``'{"en_US": ""}'::jsonb || '{"en_US": "english", "fr_FR": "french"}'::jsonb``
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#168038This error occurs when a user with ``Billing/Bookkeeper`` rights attempts to delete a payment associated with invoices from different companies. Steps to reproduce: - Install the ``account_accountant`` module - Create a new company (eg: Company A) and switch to it - Open Accounting > Configuration > Settings > Fiscal Localization > Generic Chart Template > Save - Enable all companies > Settings > General Settings > Companies > Inter-Company Transactions > Save > Again search for In
Original PR description
This error occurs when a user with ``Billing/Bookkeeper`` rights attempts to delete a payment associated with invoices from different companies. Steps to reproduce: - Install the…
This error occurs when a user with ``Billing/Bookkeeper`` rights attempts to delete a payment associated with invoices from different companies. Steps to reproduce: - Install the ``account_accountant`` module - Create a new company (eg: Company A) and switch to it - Open Accounting > Configuration > Settings > Fiscal Localization > Generic Chart Template > Save - Enable all companies > Settings > General Settings > Companies > Inter-Company Transactions > Save > Again search for Inter-Company Transactions > Synchronize invoices/bills > Create as: ``Mitchell Admin`` > Save - Accounting > Customers > Invoices > Select the one invoice with ``YourCompany`` as a company and ``Register Payment`` > Journal Entry > Reconciled Items > Select all and unreconciled them and the same for another invoice with ``Company A`` as a company - Go to ``Marc Demo`` in Users > Allowed Companies > add ``Company A`` > Save - Logout and login with ``Marc Demo`` - Accounting > Customers > Payments > Select both and delete it ``Traceback : ValueError : Expected singleton: res.company(2, 4)`` When we try to delete a payment involving different companies, at line [1] in ``self.company_id``, we are getting the IDs of two companies, which causes an error. This commit will fix the above error by adding a for loop that checks each record individually. [1]: https://github.com/odoo/odoo/blob/4fb50c6079dd59f3f82d335dbdf6c65f001c5855/addons/account/models/account_move.py#L2811 sentry-5408865989 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168352 Forward-Port-Of: odoo/odoo#167195
Versions -------- - saas-17.2+ Steps ----- 1. Change browser time zone to America/Los_Angeles; 2. go to Calendar; 3. switch to Month view. Issue ----- The day names displayed are one day off, e.g. showing 2024-05-01 as TUE instead of WED. Cause ----- Commit 90f85a19deae updated FullCalendar to V6.1.10. One of the changes it introduced is that month view renders no longer look at a specified date, but one in the distant past, see: https://github.com/fullcalendar/fullcalendar
Original PR description
Versions -------- - saas-17.2+ Steps ----- 1. Change browser time zone to America/Los_Angeles; 2. go to Calendar; 3. switch to Month view. Issue ----- The day names displayed are one day off, e.g. showing 2024-05-01 as TUE instead of WED. Cause ----- Commit 90f85a19deae updated FullCalendar to V6.1.10. One of the changes it introduced is that month view renders no longer look at a specified date, but one in the distant past, see: https://github.com/fullcalendar/fullcalendar/issues/5854#issuecomment-702495211 The time zone of this "distant past" should get interpreted as UTC instead of defaulting to the local time zone. Solution -------- In the custom render function passed to FullCalendar, interpret the Date object as UTC time instead of local time when scale is set to month. opw-3934014 Forward-Port-Of: odoo/odoo#166390
The `channels.fetch()` was put inside `incrementUnreadCounter()` because it was assumed to be the only flow where the counter could change when all channels are not yet fetched, but it is also possible that the counter changes by just calling `getOrFetch()` in `_handleNotificationNewMessage()` and receiving a new counter directly from the RPC, therefore not doing the increment. In that case `initChannelsUnreadCounter` also becomes unreliable, so the force fetch is moved there instead. run
Original PR description
The `channels.fetch()` was put inside `incrementUnreadCounter()` because it was assumed to be the only flow where the counter could change when all channels are not yet fetched, but it is also possible that the counter changes by just calling `getOrFetch()` in `_handleNotificationNewMessage()` and receiving a new counter directly from the RPC, therefore not doing the increment. In that case `initChannelsUnreadCounter` also becomes unreliable, so the force fetch is moved there instead. runbot-61556 runbot-62976 Forward-Port-Of: odoo/odoo#167009
Steps to reproduce: - Create a kit with components Uom set as Kg - Create an SO for the kit using packaging - Validate the delivery and try printing the delivery slip ERROR Bug: when generating the delivery slip we convert movelines qty to the packaging Uom but in the case of a kit the movelines are those of the components (in this we're converting Kg to units) Fix: Ignore kit lines (will be removed any way in _get_aggregated_product_quantities) opw-3758203 Forward-Port-Of: odoo/o
Original PR description
Steps to reproduce: - Create a kit with components Uom set as Kg - Create an SO for the kit using packaging - Validate the delivery and try printing the delivery slip ERROR Bug: when generating the delivery slip we convert movelines qty to the packaging Uom but in the case of a kit the movelines are those of the components (in this we're converting Kg to units) Fix: Ignore kit lines (will be removed any way in _get_aggregated_product_quantities) opw-3758203 Forward-Port-Of: odoo/odoo#166717 Forward-Port-Of: odoo/odoo#161920
This PR is created in order to sing the odoo CLA and contribute to Odoo. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168303 Forward-Port-Of: odoo/odoo#167808
Original PR description
This PR is created in order to sing the odoo CLA and contribute to Odoo. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168303 Forward-Port-Of: odoo/odoo#167808
To compute the lang of a template, we call `_render_lang` but it relies on the `_render_template` method. This means that whenever it's called as is, it will prevent any rendering if the user does not have the group `group_mail_template_editor`, thus making the computation of the lang not possible for the average user using the compose mixin. To avoid this, the call to `_render_template` will be done as super user if the lang of the current record of the composer mixin is the same as the on
Original PR description
To compute the lang of a template, we call `_render_lang` but it relies on the `_render_template` method. This means that whenever it's called as is, it will prevent any rendering if the user does not have the group `group_mail_template_editor`, thus making the computation of the lang not possible for the average user using the compose mixin. To avoid this, the call to `_render_template` will be done as super user if the lang of the current record of the composer mixin is the same as the one of its template, otherwise the flow is unchanged. This therefore use the template as the source of truth and ensure that we don't evaluate something that shouldn't be evaluated. Forward-Port-Of: odoo/odoo#166573
Steps to reproduce: - Install Time Off app - Go to working schedule 'Standard 40 hours/week' - Change the afternoon slots for Monday end time to 18 - Change the afternoon slots for Tuesday end time to 18 Issue: With the current depends, step 4, we will have an issue in the compute. This is due to the fact that `attendance.calendar_id.hours_per_day` depends on its siblings, however the dependencies are not indicating that. https://github.com/odoo/odoo/blob/dd2da708bc4a42bba9670b8742
Original PR description
Steps to reproduce: - Install Time Off app - Go to working schedule 'Standard 40 hours/week' - Change the afternoon slots for Monday end time to 18 - Change the afternoon slots for Tuesday end time to 18 Issue: With the current depends, step 4, we will have an issue in the compute. This is due to the fact that `attendance.calendar_id.hours_per_day` depends on its siblings, however the dependencies are not indicating that. https://github.com/odoo/odoo/blob/dd2da708bc4a42bba9670b874282a2206d8f5ffe/addons/resource/models/resource_calendar_attendance.py#L83 As such we will not trigger `_compute_duration_days` after changing the hours which will cause issues. On a side note no test was made due to a limitation of the test form, which didn't replicate the real behaviour of the web client. opw-3783809 Forward-Port-Of: odoo/odoo#166680
This commit [1] introduces `queryOne` to find element nodes in DOM. But, if `queryOne` fails to find the element it throws error which breaks the tour which wasn't the case before this change was introduced. There might be some scenarios where it might not affect if the node is found or not, but because of `queryOne` the tour will fail. So, to fix this we use `queryFirst` which doesn't throw error if it fails to find the node. 1: c0f3bdb928db5a119817710e260edfda9a2f40ac --- I confirm I
Original PR description
This commit [1] introduces `queryOne` to find element nodes in DOM. But, if `queryOne` fails to find the element it throws error which breaks the tour which wasn't the case before this change was introduced. There might be some scenarios where it might not affect if the node is found or not, but because of `queryOne` the tour will fail. So, to fix this we use `queryFirst` which doesn't throw error if it fails to find the node. 1: c0f3bdb928db5a119817710e260edfda9a2f40ac --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168163
With an ES company setup and TicketBAI service active Create an Invoice Post it but do not send the Invoice to EDI (disable cron if necessary) Create a Credit note for the invoice Send the credit note to EDI service Traceback will raise "ValueError: time data '' does not match format '%d-%m-%Y'" This occurs because we retrieve information of the original invoice directly from the 'post' XMLs submitted to the government but we don't have any opw-3919568 Forward-Port-Of: odoo/odoo
Original PR description
With an ES company setup and TicketBAI service active Create an Invoice Post it but do not send the Invoice to EDI (disable cron if necessary) Create a Credit note for the invoice Send the credit note to EDI service Traceback will raise "ValueError: time data '' does not match format '%d-%m-%Y'" This occurs because we retrieve information of the original invoice directly from the 'post' XMLs submitted to the government but we don't have any opw-3919568 Forward-Port-Of: odoo/odoo#167172
The main purpose of this patch is to optimize how the location queries are generated in saas-17.2 in `stock.orderpoint`: https://github.com/odoo/odoo/blob/dd2da708bc4a42bba9670b874282a2206d8f5ffe/addons/stock/models/stock_orderpoint.py#L366-L374 The generated query is the same in 17.0. The advantage of the `any` operator is clarity and simplicity in this case. In saas-17.2 due to the presence of another branch using `location_final_id` the generated queries are much more efficient with
Original PR description
The main purpose of this patch is to optimize how the location queries are generated in saas-17.2 in `stock.orderpoint`:…
The main purpose of this patch is to optimize how the location queries
are generated in saas-17.2 in `stock.orderpoint`:
https://github.com/odoo/odoo/blob/dd2da708bc4a42bba9670b874282a2206d8f5ffe/addons/stock/models/stock_orderpoint.py#L366-L374
The generated query is the same in 17.0. The advantage of the `any` operator is
clarity and simplicity in this case.
In saas-17.2 due to the presence of another branch using
`location_final_id` the generated queries are much more efficient with
```py
dest_loc_domain = [
'|',
'&', ('location_final_id', '!=', False), ('location_final_id', 'any', paths_domain),
'&', ('location_final_id', '=', False), ('location_dest_id', 'any', paths_domain),
]
```
vs (current code in saas-17.2)
```py
dest_loc_domain = expression.OR([dest_loc_domain, [
'|',
'&', ('location_final_id', '!=', False), ('location_final_id.parent_path', '=like', location.parent_path + '%'),
'&', ('location_final_id', '=', False), ('location_dest_id.parent_path', '=like', location.parent_path + '%'),
]])
```
https://github.com/odoo/odoo/blob/88e75bb11053e3a16455f7d0e882cf2afd4b79a6/addons/stock/models/product.py#L311-L317
The version using the `any` operator is much faster: in an extreme case
with 6K replenish locations the any-based query runs in 1m50s while the
other runs in more than 3h.
In effect this is an example query generated by the ORM without the use
of `any` (3 replenish locations)
```sql
SELECT
"stock_move"."product_id",
"stock_move"."location_id",
SUM("stock_move"."product_qty")
FROM
"stock_move"
LEFT JOIN "stock_location" AS "stock_move__location_id" ON ("stock_move"."location_id" = "stock_move__location_id"."id")
LEFT JOIN "stock_location" AS "stock_move__location_final_id" ON ("stock_m ove"."location_final_id" = "stock_move__location_final_id"."id")
WHERE
(
(
(
(
(
(
(
(
(
"stock_move"."product_id" IN (16, 17, 18, 20, 21, 23, 24, 12, 13, 14, 25, 30, 26, 37, 31, 5, 8, 29, 32, 6, 28)
)
AND (
"stock_move"."state" IN ('waiting', 'confirmed', 'assigned', 'partially_available')
)
)
AND (
"stock_move"."location_final_id" IS NULL
OR (
"stock_move__location_final_id"."id" IS NULL
OR (
NOT (
(
"stock_move__location_final_id"."parent_path" :: text LIKE '1/7/8/18/%'
)
)
)
)
)
)
AND (
"stock_move"."location _final_id" IS NOT NULL
OR (
(
"stock_move"."location_dest_id" NOT IN (
SELECT
"stock_location"."id"
FROM
"stock_location"
WHERE
("stock_location"."parent_path" :: text LIKE '1/7/8/18/%')
AND (( "stock_location"."company _id" IN (1))
OR "stock_location"."company_id" IS NULL
)
)
)
OR "stock_move"."location_dest_id" IS NULL
)
)
)
AND (
"stock_move"."location_final_id" IS NULL
OR (
"stock_move__location_final_id"."id" IS NULL
OR (NOT (("stock_move__location_final_id"."parent_path" :: text LIKE '1/7/8/17/%')))
)
)
)
AND (
"stock_move"."location_final_id" IS NOT NULL
OR (
(
"stock_move"."location_dest_id" NOT IN (
SELECT
"stock_location"."id"
FROM
"stock_locati on"
WHERE
("stock_location"."parent_path" :: text LIKE '1/7/8/17/%')
AND (("stock_location"."company_id" IN (1))
OR "stock_location"."company_id" IS NULL
)
)
)
OR "stock_move"."location_dest_id" IS NULL
)
)
)
AND (
"stock_ move"."location_final_id" IS NULL
OR (
"stock_move__location_final_id"."id" IS NULL
OR (
NOT (( "stock_move__location_final_id"."parent_path" :: text LIKE '1/7/8/34/%')
)
)
)
)
)
AND (
"stock_move"."location_final_id" IS NOT NULL
OR (
(
"stock_move"."location_dest_id" NOT IN (
SELECT
"stock_location"."id"
FROM
"stock_location"
WHERE
("stock_location"."parent_path" :: text LIKE '1/7/8/34/%')
AND (
("stock_location"."company_id" IN (1))
OR " stock_location"."company_id" IS NULL
)
)
)
OR "stock_move"."location_dest_id" IS NULL
)
)
)
AND (
(
("stock_move__location_id"."parent_path" :: text LIKE '1/7/8/18/%')
OR ("stock_move__location_id"."parent_path" :: text LIKE '1/7/8/17/%')
)
OR ("stock_move__location_id"."parent_path" :: text LIKE '1/7/8/34/%')
)
)
AND (
"stock_move"."company_id" IN (1)
)
GROUP BY
"stock_move"."product_id",
"stock_move"."location_id"
ORDER BY
"stock_move"."product_id" ASC,
"stock_move"."location_id" ASC
```
vs the query using `any` variant:
```sql
SELECT
"stock_move"."product_id",
"stock_move"."location_id",
sum("stock_move"."product_qty")
FROM
"stock_move"
LEFT JOIN "stock_location" AS "stock_move__location_id" ON ("stock_move"."location_id" = "stock_move__location_id"."id")
LEFT JOIN "stock_location" AS "stock_move__location_final_id" ON ("stock_m ove"."location_final_id" = "stock_move__location_final_id"."id")
WHERE
(
(
(
(
(
"stock_move"."product_id" IN (16, 17, 18, 20, 21, 23, 24, 12, 13, 14, 25, 30, 26, 37, 31, 5, 8, 29, 32, 6, 28)
)
AND (
"stock_move"."state" IN ('waiting', 'confirmed', 'assigned', 'partially_available')
)
)
AND (
"stock_move"."location_final_id" IS NULL
OR (
"stock_move__location_final_id"."id" IS NULL
OR (
NOT (
(
(
("stock_move__location_final_id"."parent_path" :: text LIKE '1/7/8/18/%')
OR ("stock_move__location_final_id "."parent_path" :: text LIKE '1/7/8/17/%')
)
OR ("stock_move__location_final_id"."parent_path" :: text LIKE '1/7/8/34/%')
)
)
)
)
)
)
AND (
"stock_move"."location_final_id" IS NOT NULL
OR (
(
"stock_move"."location_dest_id" NOT IN (
SELECT
"stock_location"."id"
FROM
"stock_location"
WHERE
(
(
("stock_location"."parent_path" :: text LIKE '1/7/8/18/%')
OR ("stock_location"."parent_path" :: text LIKE '1/7/8/17/%')
)
OR ("stock_location"."parent_pa th" :: text LIKE '1/7/8/34/%')
)
AND (
("stock_location"."company_id" IN (1))
OR "stock_location"."company_id" IS NULL
)
)
)
OR "stock_move"."location_dest_id" IS NULL
)
)
)
AND (
(
("stock_move__location_id"."parent_path" :: text LIKE '1/7/8/18/%')
OR ("stock_move__location_id"."parent_path" :: text LIKE '1/7/8/17/%')
)
OR ("stock_move__location_id"."parent_path" :: text LIKE '1/7/8/34/%')
)
)
AND (
"stock_move"."company_id" IN (1)
)
GROUP BY
"stock_move"."product_id",
"stock_move"."location_id"
ORDER BY
"stock_move"."product_id" ASC,
"stock_move"."location_id" ASC
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#167947
Forward-Port-Of: odoo/odoo#167553Purpose ======= Fix the tooltip header color which wasn't reactive to the theme color (light vs dark theme). The header text is black instead of white in light theme and is thus not visible on the tooltip black background. Specification ============= Overwritting the h5 color style that is set to a dark color by the basic bootstrap style. The border-bottom isn't visible in the dark theme because of the tooltip border color style. This border style is applied to the external border
Original PR description
Purpose ======= Fix the tooltip header color which wasn't reactive to the theme color (light vs dark theme). The header text is black instead of white in light theme and is thus not visible on the tooltip black background. Specification ============= Overwritting the h5 color style that is set to a dark color by the basic bootstrap style. The border-bottom isn't visible in the dark theme because of the tooltip border color style. This border style is applied to the external borders of the tooltip and thus shoudln't be changed. Replacing the border-bottom class by a hr tag as it is more adequate for a divider and its color is independant from the tooltip basic border color. Task-3956309 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167833 Forward-Port-Of: odoo/odoo#167174
Prior to this commit, enabling the multi-employee option without any employees in the database would result in no action upon selecting cashier. This could lead to confusion. With this commit, an error message is displayed in such scenarios, enhancing user feedback and preventing confusion. opw-3851823 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#165213 Forward-Port-Of: odoo/odoo#160646
Original PR description
Prior to this commit, enabling the multi-employee option without any employees in the database would result in no action upon selecting cashier. This could lead to confusion. With this commit, an error message is displayed in such scenarios, enhancing user feedback and preventing confusion. opw-3851823 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#165213 Forward-Port-Of: odoo/odoo#160646
It should not be common, but through custo or in debug mode, one can create a menu without an URL since it's not required on the model. Through regular flows, it won't be possible since our UI won't let you go through when creating a menu if you don't set a URL. Followup of https://github.com/odoo/odoo/commit/948235079f002794f9837d3cf91e2d20e3254e20 Forward-Port-Of: odoo/odoo#160546 Forward-Port-Of: odoo/odoo#160457
Original PR description
It should not be common, but through custo or in debug mode, one can create a menu without an URL since it's not required on the model. Through regular flows, it won't be possible since our UI won't let you go through when creating a menu if you don't set a URL. Followup of https://github.com/odoo/odoo/commit/948235079f002794f9837d3cf91e2d20e3254e20 Forward-Port-Of: odoo/odoo#160546 Forward-Port-Of: odoo/odoo#160457
Due to Stripe sending multiple confirmations regarding authorized payment, multiple mails were send to customer that their payment was succesful, now only transactions that were not processed yet result in mail sending. opw-3967807 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#168298
Original PR description
Due to Stripe sending multiple confirmations regarding authorized payment, multiple mails were send to customer that their payment was succesful, now only transactions that were not processed yet result in mail sending. opw-3967807 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#168298
This commit fixes a staking context (z-index) problem. Our modal has a 1055 z-index (`$zindex-modal`) and FullCalendar "More popover" has 9999. To avoid some overlapping we set the FullCalendar "More popover" to a lower value. Steps to reproduce: * Open Project * Select Field Service * Go to Calendar View * Click on "+X more" (where X is a number) * Click on an event in the FullCalendar popover * Click on Edit in our popover => Bug the FullCalendar popover overlap our modal --- I c
Original PR description
This commit fixes a staking context (z-index) problem. Our modal has a 1055 z-index (`$zindex-modal`) and FullCalendar "More popover" has 9999. To avoid some overlapping we set the FullCalendar "More popover" to a lower value. Steps to reproduce: * Open Project * Select Field Service * Go to Calendar View * Click on "+X more" (where X is a number) * Click on an event in the FullCalendar popover * Click on Edit in our popover => Bug the FullCalendar popover overlap our modal --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168278
Version: ----------- 16.0 Steps to reproduce: --------------------------- - open the Calendar module - make sure google sync is enabled - when to click on a event, a popup appears - when you press on delete, a confirmation message is shown but the popup is not closed Issue: ---------- The popup is not disappearing which allows the user to click multiple times on the delete option which can cause error when the user confirm the deletion as the user cannot delete a deleted record.
Original PR description
Version: ----------- 16.0 Steps to reproduce: --------------------------- - open the Calendar module - make sure google sync is enabled - when to click on a event, a popup appears - when you press on…
Version: ----------- 16.0 Steps to reproduce: --------------------------- - open the Calendar module - make sure google sync is enabled - when to click on a event, a popup appears - when you press on delete, a confirmation message is shown but the popup is not closed Issue: ---------- The popup is not disappearing which allows the user to click multiple times on the delete option which can cause error when the user confirm the deletion as the user cannot delete a deleted record. Cause: ----------- When google sync is enabled the event becomes achievable so when you delete the event instead of onDeleteEvent() function of CalendarCommonPopover component the onClickArchive() of AttendeeCalendarCommonPopover is called which do not handle the closing of the popup. Solution: ------------- In the onClickArchive() function, call the close function which is passed in the props of the parent component. task-3875211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#162411
In Spanish (MX) / Español (MX) Language The Translation of ``Valor desconocido '%s' para campo booleano '%%(campo)s'`` is done wrong in ``es_MX.po`` file of the base module. which leads to a traceback Traceback : ``KeyError 'campo'`` In the above-translated term, we mistakenly translated ``field`` to ``campo``. We should not translate ``field`` because it contains dynamic values. sentry-5454184338 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/su
Original PR description
In Spanish (MX) / Español (MX) Language The Translation of ``Valor desconocido '%s' para campo booleano '%%(campo)s'`` is done wrong in ``es_MX.po`` file of the base module. which leads to a traceback Traceback : ``KeyError 'campo'`` In the above-translated term, we mistakenly translated ``field`` to ``campo``. We should not translate ``field`` because it contains dynamic values. sentry-5454184338 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168273
A fix's term was changing during the fw-port, but it's pot file was not re-exported to match. Therefore, re-export so that it translates properly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168165 Forward-Port-Of: odoo/odoo#167745
Original PR description
A fix's term was changing during the fw-port, but it's pot file was not re-exported to match. Therefore, re-export so that it translates properly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168165 Forward-Port-Of: odoo/odoo#167745
Steps to reproduce: - Open POS - Go to configuration > Payment methods - Create new > Journal > Bank - Integration select viva wallet - Use any fake credential - Use this payment method in any active POS - Open POS and pay using viva wallet Issue: Throws traceback while payment request. Cause: Used to fetch POS session id from undefined session. FIX: Fetched the session id of the pos model using the this.pos.session (correct position of data). task- 3883584 Forward-Port-O
Original PR description
Steps to reproduce: - Open POS - Go to configuration > Payment methods - Create new > Journal > Bank - Integration select viva wallet - Use any fake credential - Use this payment method in any active POS - Open POS and pay using viva wallet Issue: Throws traceback while payment request. Cause: Used to fetch POS session id from undefined session. FIX: Fetched the session id of the pos model using the this.pos.session (correct position of data). task- 3883584 Forward-Port-Of: odoo/odoo#168253 Forward-Port-Of: odoo/odoo#163291
Before this commit, the `open should update the value on the server` test was sometimes failing. This test opens a folded discuss sidebar category and asserts that its fold state was saved on the server. However, nothing guarantees that the RPC was triggered before asserting the server state, which is a source of non-determinism. This commit fixes the issue by ensuring the RPC is completed before checking the saved value. fixes runbot-66054. Forward-Port-Of: odoo/odoo#168257
Original PR description
Before this commit, the `open should update the value on the server` test was sometimes failing. This test opens a folded discuss sidebar category and asserts that its fold state was saved on the server. However, nothing guarantees that the RPC was triggered before asserting the server state, which is a source of non-determinism. This commit fixes the issue by ensuring the RPC is completed before checking the saved value. fixes runbot-66054. Forward-Port-Of: odoo/odoo#168257
Forward-Port-Of: odoo/enterprise#63968
Original PR description
Forward-Port-Of: odoo/enterprise#63968
Problem: When a selection field is mapped in a template variable, its key is returned instead of its value. E.g. a selection field is mapped in a template variable whose one of the selections is `('out_invoice', 'Customer Invoice')` then `out_invoice` will be returned instead of `Customer Invoice`. Technical Problem: The function `_find_value_from_field_path` of the class `BaseModel` is used to get the value of the template variable. This function uses `.mapped()` to get the template's
Original PR description
Problem:
When a selection field is mapped in a template variable, its key is returned instead of its value. E.g. a selection field is mapped in a template variable whose one of the selections is `('out_invoice', 'Customer Invoice')` then `out_invoice` will be returned instead of `Customer Invoice`.
Technical Problem:
The function `_find_value_from_field_path` of the class `BaseModel` is used to get the value of the template variable. This function uses `.mapped()` to get the template's variable value which returns the key instead of the value whenever the last field of the chain is a selection field.
Solution:
The `last_field_of_chain` and `last_model` are obtained using `field_path`. If `last_field_of_chain` is of the selection field then the function `convert_to_export` of the `Selection` class is used to get the value of the selection field by using the key obtained in the `field_value` and the `last_model`.
Task-3964078
Forward-Port-Of: odoo/enterprise#63695Issue: ------ When we go to a gantt view with the day view, the time format is always displayed in 12-hour format followed by "am" or "pm". Depending on the location, this format may also be 24 hours. Solution: --------- Use the current localization to determine the time display format. opw-3867317 Forward-Port-Of: odoo/enterprise#62896 Forward-Port-Of: odoo/enterprise#61209
Original PR description
Issue: ------ When we go to a gantt view with the day view, the time format is always displayed in 12-hour format followed by "am" or "pm". Depending on the location, this format may also be 24 hours. Solution: --------- Use the current localization to determine the time display format. opw-3867317 Forward-Port-Of: odoo/enterprise#62896 Forward-Port-Of: odoo/enterprise#61209
In the form view, new line were linked to new_id which computed the subscription_state value to a wrong version. Forcing readonly=False ensure the value is fetched from the origin and thus correct when computing the discount. task-id: 3699064 Forward-Port-Of: odoo/enterprise#58604
Original PR description
In the form view, new line were linked to new_id which computed the subscription_state value to a wrong version. Forcing readonly=False ensure the value is fetched from the origin and thus correct when computing the discount. task-id: 3699064 Forward-Port-Of: odoo/enterprise#58604
Steps to reproduce: - Run fetching payslip without provide the tax code in Odoo taxes Current behaviour: - Exception raised Expected behaviour: - Should not raise any exception Explanation: next() method is missing default value so it raised exception when filtering return empty array and iter() returns None. task-3897198 Forward-Port-Of: odoo/enterprise#64034 Forward-Port-Of: odoo/enterprise#62432
Original PR description
Steps to reproduce: - Run fetching payslip without provide the tax code in Odoo taxes Current behaviour: - Exception raised Expected behaviour: - Should not raise any exception Explanation: next() method is missing default value so it raised exception when filtering return empty array and iter() returns None. task-3897198 Forward-Port-Of: odoo/enterprise#64034 Forward-Port-Of: odoo/enterprise#62432
Since custom and anytime appointment types aren't visible on website pages, it makes sense to set their is_published field to False by default. The only exception when appointment types should be created with published flag is when it is being done from website page, since creating appointment from there implies their public visibility. task-3944831 Forward-Port-Of: odoo/enterprise#63756 Forward-Port-Of: odoo/enterprise#63441
Original PR description
Since custom and anytime appointment types aren't visible on website pages, it makes sense to set their is_published field to False by default. The only exception when appointment types should be created with published flag is when it is being done from website page, since creating appointment from there implies their public visibility. task-3944831 Forward-Port-Of: odoo/enterprise#63756 Forward-Port-Of: odoo/enterprise#63441
Current behavior: --- When rendering a linkedin feed, if one of the posts includes a video, no images will be displayed. Steps to reproduce: --- 1. Go to Configuration > Social Media 2. Link a linkedin account 3. Make a post with an image on linkedin 4. Make a post with a video 5. Go to feed 6. Neither the video nor the image is displayed Cause of the issue: --- When getting the image URNs with `post.get('content', {}).get('media', {}).get('id') ` you can get a video URN in th
Original PR description
Current behavior:
---
When rendering a linkedin feed, if one of the posts includes a video, no images will be displayed.
Steps to reproduce:
---
1. Go to Configuration > Social Media
2. Link a linkedin account
3. Make a post with an image on linkedin
4. Make a post with a video
5. Go to feed
6. Neither the video nor the image is displayed
Cause of the issue:
---
When getting the image URNs with
`post.get('content', {}).get('media', {}).get('id') `
you can get a video URN in the shape of
`'urn:li:video:abcdefghijklmnop1234'`
opw-3775212
Forward-Port-Of: odoo/enterprise#60950Purpose ======= Prevent multiple submits of the attendee form when the user spam clicks on the "Confirm Appointment" button. Specifications ============== Spam clicking the submit button is submitting multiple times the form which redirects the user to the "Date & Time" step with a red banner indicating that another user already has reserved this time slot a few seconds ago. Adding a loading effect on the confirmation button to disable it after a single click and inform the user that t
Original PR description
Purpose ======= Prevent multiple submits of the attendee form when the user spam clicks on the "Confirm Appointment" button. Specifications ============== Spam clicking the submit button is submitting multiple times the form which redirects the user to the "Date & Time" step with a red banner indicating that another user already has reserved this time slot a few seconds ago. Adding a loading effect on the confirmation button to disable it after a single click and inform the user that the form submission is correctly being processed. Backport of: odoo/enterprise#58865 Task-3945177 Forward-Port-Of: odoo/enterprise#63724 Forward-Port-Of: odoo/enterprise#63067
On computers where WPS office is installed, the mimetype of office files (eg. .docx, .xslx) the mimetype recognition is altered (at least on linux machines [^1][^2]). The detection of xlsx files in Documents did not account for the specific mimetype set by WPS Office. [^1]: https://forum.puppylinux.com/viewtopic.php?t=2379&i=1 [^2]: https://askubuntu.com/questions/1360278/wps-office-messing-up-mime-types-associated-with-office-documents Task-3915912 Forward-Port-Of: odoo/enterprise#63830
Original PR description
On computers where WPS office is installed, the mimetype of office files (eg. .docx, .xslx) the mimetype recognition is altered (at least on linux machines [^1][^2]). The detection of xlsx files in Documents did not account for the specific mimetype set by WPS Office. [^1]: https://forum.puppylinux.com/viewtopic.php?t=2379&i=1 [^2]: https://askubuntu.com/questions/1360278/wps-office-messing-up-mime-types-associated-with-office-documents Task-3915912 Forward-Port-Of: odoo/enterprise#63830 Forward-Port-Of: odoo/enterprise#62100
When printing payslip the fields which are not filled in Employee form ,demo data is filled while printing payslip report remove demo data from the payslip report ,the fields should be empty when no info is added task-3948257 Forward-Port-Of: odoo/enterprise#63313
Original PR description
When printing payslip the fields which are not filled in Employee form ,demo data is filled while printing payslip report remove demo data from the payslip report ,the fields should be empty when no info is added task-3948257 Forward-Port-Of: odoo/enterprise#63313
To reproduce: ============= - create a subscription and confirm it - create the invoice for this subscription - create an upsell, add some recurring products with qty > 0 - confirm the upsell, you can see that the parent sub has been updated with the qty coming from Upsell - cancel the upsell afterward -> the parent sub has not been reverted. Problem: ======== When we cancel an upsell, the changes on the parent subscription are not reverted. The message in the chatter is improved to
Original PR description
To reproduce: ============= - create a subscription and confirm it - create the invoice for this subscription - create an upsell, add some recurring products with qty > 0 - confirm the upsell, you can see that the parent sub has been updated with the qty coming from Upsell - cancel the upsell afterward -> the parent sub has not been reverted. Problem: ======== When we cancel an upsell, the changes on the parent subscription are not reverted. The message in the chatter is improved to notify the quantities on the subscription may need to be updated. opw-3269465 Forward-Port-Of: odoo/enterprise#63855 Forward-Port-Of: odoo/enterprise#61678
- Create a credit note - Add a product as a "Discount" and add the proper information - Process it under the use "devoluciones, descuentos o bonificaciones" (G02) - Check the generated XML Issue: Under description, we report "devolucion de mercancias" which wrong, as the user is not returning anything, they´re only getting a discount. opw-3902858 Forward-Port-Of: odoo/enterprise#63757 Forward-Port-Of: odoo/enterprise#63520
Original PR description
- Create a credit note - Add a product as a "Discount" and add the proper information - Process it under the use "devoluciones, descuentos o bonificaciones" (G02) - Check the generated XML Issue: Under description, we report "devolucion de mercancias" which wrong, as the user is not returning anything, they´re only getting a discount. opw-3902858 Forward-Port-Of: odoo/enterprise#63757 Forward-Port-Of: odoo/enterprise#63520
Configure 'Cash Discount Tax Reduction' on 'On early payment' Have a payment term [TERM] configured with 2% discount for early payment Create a [BILL_1] with: - partner: [DEMO] - payment terms: [TERM] - invoice line: qty 1, unit amount 161.10, tax 19% Create a [BILL_2] with: - partner: [DEMO] - payment terms: [TERM] - invoice line: qty 1, unit amount 77.50, tax 19% Create a bank statement with: - partner: [DEMO] - amount -278.27 - label: test Reconcile the bank statement wi
Original PR description
Configure 'Cash Discount Tax Reduction' on 'On early payment' Have a payment term [TERM] configured with 2% discount for early payment Create a [BILL_1] with: - partner: [DEMO] - payment terms: [TERM] - invoice line: qty 1, unit amount 161.10, tax 19% Create a [BILL_2] with: - partner: [DEMO] - payment terms: [TERM] - invoice line: qty 1, unit amount 77.50, tax 19% Create a bank statement with: - partner: [DEMO] - amount -278.27 - label: test Reconcile the bank statement with the 2 bills, the system will create 2 epd lines: - Discount line with credit 4.77 - Discount line tax with credit 0.90 Go to General Ledger Export "DATEV (ZIP)" and check accounting_entries.csv Issue: Early payment line amount will be 5.68 instead of 5.67 Similar to https://github.com/odoo/enterprise/commit/111cf205d91a1c8f46bc8d3f7b96b6dbfac7071b opw-3801374 Forward-Port-Of: odoo/enterprise#63799 Forward-Port-Of: odoo/enterprise#62910
This commit aims to convert QUnit tests which rely on mail/test_utils to hoot. Part of task-3818666 Forward-Port-Of: odoo/enterprise#63721
Original PR description
This commit aims to convert QUnit tests which rely on mail/test_utils to hoot. Part of task-3818666 Forward-Port-Of: odoo/enterprise#63721
Forward-Port-Of: odoo/enterprise#63758 Forward-Port-Of: odoo/enterprise#63716
Original PR description
Forward-Port-Of: odoo/enterprise#63758 Forward-Port-Of: odoo/enterprise#63716
To reproduce the Issue: - Preview any file. - Switch the file preview by clicking the NEXT button twice or thrice. - Now change the owner of the file. - The preview, switches back to the file you chose to preview at first. Reason: - Just as we change the owner of the file, the Component is rendered again, triggering the `onWillUpdateProps`. - At this moment, the value inside the `nextProps.startIndex` is the value, which was set the first time we clicked a file to preview it. It is not
Original PR description
To reproduce the Issue: - Preview any file. - Switch the file preview by clicking the NEXT button twice or thrice. - Now change the owner of the file. - The preview, switches back to the file you…
To reproduce the Issue: - Preview any file. - Switch the file preview by clicking the NEXT button twice or thrice. - Now change the owner of the file. - The preview, switches back to the file you chose to preview at first. Reason: - Just as we change the owner of the file, the Component is rendered again, triggering the `onWillUpdateProps`. - At this moment, the value inside the `nextProps.startIndex` is the value, which was set the first time we clicked a file to preview it. It is not equal to the index of the file currently previewed (`this.state.index`). - Hence, the LOC `this.activateFile(nextProps.startIndex)` executes and switches the preview back to the file present at the `startIndex`. ref. to, where the values of the `previewStore` (including the `startIndex`) are set: https://github.com/odoo/enterprise/blob/saas-16.4/documents/static/src/views/hooks.js#L330-L334 After this commit: - As we select multiple documents, and try to switch the preview from the `DocumentsInspector`, we now compare the current index with the index of the file we wish to preview. The record (`DocumentsKanbanRecord`) of the file (to switch the preview to) is already set as the `selectedDocument` before this Component is rendered. refer - https://github.com/odoo/enterprise/blob/saas-16.4/documents/static/src/views/hooks.js#L296-L298 - While updating the values inside the `DocumentsInspector` we no longer the face the issue of the preview switching to another document Task-3599129 Forward-Port-Of: odoo/enterprise#55957