Monday, July 15, 2024
38 changes
Enhancements to existing features
The calendar module's internal automated tests were updated to use Odoo's newer testing framework. This improves maintainability and reliability of future calendar quality checks without changing the user-facing calendar experience.
Original PR description
Update legacy tests importing mail/test_utils.js to use HOOT instead of Qunit. Task-3818666
Resolved issues and error corrections
Fixes a visual glitch in the test status spinner when HOOT tests run on small or mobile screens. This makes the testing interface more stable and readable for teams checking software quality on different device sizes.
Original PR description
This commit fixes a glitch in the animated spinner when running HOOT tests on small/mobile screen. Note: adding flex grow/shrink variants for consistency's sake. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Impacted Version: - 15.0 and above This commit improve below features: - Update singapore default taxes opw-3679292 Forward-Port-Of: odoo/odoo#172704
Original PR description
Impacted Version: - 15.0 and above This commit improve below features: - Update singapore default taxes opw-3679292 Forward-Port-Of: odoo/odoo#172704
When a recruitment applicant is created with both a name and an email address, the related contact will now be named after the applicant instead of the email address. This keeps contact records clearer and avoids confusing duplicate-looking entries based on email addresses.
Original PR description
STEP TO REPRODUCE:
==================
1- Go on recruitment application
2- Click on applications/All applications
3- Click on new
4- Write this in the form view :
A- "manager" in subject/application
B- "Milly" in Applicant's name
C- "thefunnyguys@example.com" in Email
5- Save it
6- Go in contact application
7- search thefunnyguys
Current Behaviour:
===================
You will find a partner with this name and this email.
Expected Behaviour:
===================
The name of this partner should be "Milly" not the email adress.
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-prThis fixes the GCC Arabic-English invoice report so it uses the correct current report language setting. It prevents issues caused by an outdated internal reference, helping invoices render reliably with right-to-left text ordering.
Original PR description
Problem: The `l10n_gcc_invoice.arabic_english_invoice` report was recently updated to fix (https://github.com/odoo/odoo/pull/169267) an issue related to RTL ordering. However, this fix uses the `_lang_get_direction` method. While fine on theoriginally targeted version, in 17.2 this method was reworked into a new api `_get_data`. FW ports for 17.2+ had this older method still. Purpose: Swap `_lang_get_direction` with new `_get_data` method in report opw-4045879
In This PR: - Set Place of Supply on 'general' journals with POS sessions if the country is India and Place of Supply is not set. - Adjusted state ID computation for account moves with POS sessions. Task Id: 3935317 Forward-Port-Of: odoo/odoo#172377
Original PR description
In This PR: - Set Place of Supply on 'general' journals with POS sessions if the country is India and Place of Supply is not set. - Adjusted state ID computation for account moves with POS sessions. Task Id: 3935317 Forward-Port-Of: odoo/odoo#172377
Steps to reproduce: - Go to Shop page on website - Enable edit mode - Pick a product and create a new Badge/Ribbon - Change the background color - Bug -> the bg-color is not set. Issue : ribbon bg-color is not set on the product. Cause : The !important attribute has been duplicated in the CSS rule since [1] and [2]. As a result, the background colour CSS rule for the ribbon is broken due to having !important twice. [1]: https://github.com/odoo/odoo/commit/c6f4929f65b899736c556f
Original PR description
Steps to reproduce: - Go to Shop page on website - Enable edit mode - Pick a product and create a new Badge/Ribbon - Change the background color - Bug -> the bg-color is not set. Issue : ribbon bg-color is not set on the product. Cause : The !important attribute has been duplicated in the CSS rule since [1] and [2]. As a result, the background colour CSS rule for the ribbon is broken due to having !important twice. [1]: https://github.com/odoo/odoo/commit/c6f4929f65b899736c556f8f0bb7824883a6d893 [2]: https://github.com/odoo/odoo/commit/9ee115b58342b3e0dbc11081e7ff752c10f8bfa9 fix : After removing the '!important' attribute from the create and write methods, we only encounter the '!important' attribute once. As a result, the ribbon background color is applied to the product. opw-3964071 Forward-Port-Of: odoo/odoo#168265
Description On a 'stock.move' with a lot of move lines (serial numbers), setting the 'stock.move' quantity to 0 could take a few minutes due to the number of unlink calls. Solution: Extract unlink call outside the "for" loop. | Move Lines | Without Fix | With Fix | | --- | --- | ---| | 10 | 321 ms | 102 ms | | 100 | 2.60 s | 108 ms | | 1.000 | 31.71 s | 380 ms | | 10.000 | 20.7 min | 1.41 s | | 100.000 | no idea | 17.47 | --- OPW-4043076 --- I confirm I have signed
Original PR description
Description On a 'stock.move' with a lot of move lines (serial numbers), setting the 'stock.move' quantity to 0 could take a few minutes due to the number of unlink calls. Solution: Extract unlink call outside the "for" loop. | Move Lines | Without Fix | With Fix | | --- | --- | ---| | 10 | 321 ms | 102 ms | | 100 | 2.60 s | 108 ms | | 1.000 | 31.71 s | 380 ms | | 10.000 | 20.7 min | 1.41 s | | 100.000 | no idea | 17.47 | --- OPW-4043076 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172750
Before this commit, there was a (xss specific) form view rule preventing the oe_title content to be displayed properly. In the task form view, in mobile, the title is a textarea, and long titles were displayed with words cut in the middle. The removed rule had been introduced a long time ago, for the kanban quick create form view [1], but it was probably a mistake. [1] https://github.com/odoo/odoo/commit/d18d08f01a589053e40c7af1fd4dd59c13aaa625 Task 4045168 Description of the issue/feat
Original PR description
Before this commit, there was a (xss specific) form view rule preventing the oe_title content to be displayed properly. In the task form view, in mobile, the title is a textarea, and long titles were displayed with words cut in the middle. The removed rule had been introduced a long time ago, for the kanban quick create form view [1], but it was probably a mistake. [1] https://github.com/odoo/odoo/commit/d18d08f01a589053e40c7af1fd4dd59c13aaa625 Task 4045168 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#172898
Issue: In edit mode, the "on click" dropdown remains open even after clicking outside of the dropdown. With this pull request [1], we manually handle the dropdown to keep it open when clicking a dropdown item, but it prevents the dropdown from closing when clicking outside of the menu. Before this commit, we only handled the on-page click event for the HoverableDropdown [2], but not for the clickable dropdown. To maintain the same behavior for both clickable and hoverable dropdowns, this
Original PR description
Issue: In edit mode, the "on click" dropdown remains open even after clicking outside of the dropdown. With this pull request [1], we manually handle the dropdown to keep it open when clicking a dropdown item, but it prevents the dropdown from closing when clicking outside of the menu. Before this commit, we only handled the on-page click event for the HoverableDropdown [2], but not for the clickable dropdown. To maintain the same behavior for both clickable and hoverable dropdowns, this commit binds the onPageClick event once we entered in edit mode. [1]: https://github.com/odoo/odoo/commit/fe67b34f1a03d838df82a1307cf6467f994a8f3b [2]: https://github.com/odoo/odoo/commit/455e03c743d6f1db70fab4e82b2fdbc963bc22ef task-3370847 Forward-Port-Of: odoo/odoo#172677 Forward-Port-Of: odoo/odoo#127529
Before this commit, when creating a channel from the discuss sidebar, the name of the channel would be transformed to lower case and stripped of accents. This happens because the same cleaned term used for searching gets used to define the name of the new channel. This commit fixes the issue by using the unaltered search term. Before:  After:  After:  Forward-Port-Of: odoo/odoo#172494
To reproduce the bug: - Go to website(eCommerce) - Click on the Shop tab. - Once you are in the store tab, click on the 'Edit' option to edit the website and select Categories: Left and Collapse Categories: enable. - Go to the theme, in the light and dark themes select a darker version like black or gray for the first option. - The drop down appears for categories which are not selected but when selected the up arrow disappears. This problem was due to the superposition of the .accordion
Original PR description
To reproduce the bug: - Go to website(eCommerce) - Click on the Shop tab. - Once you are in the store tab, click on the 'Edit' option to edit the website and select Categories: Left and Collapse Categories: enable. - Go to the theme, in the light and dark themes select a darker version like black or gray for the first option. - The drop down appears for categories which are not selected but when selected the up arrow disappears. This problem was due to the superposition of the .accordion-button and .bg-transparent CSS classes. When the accordion button is clicked, it switches its body and background colors, changing the body color from black to white. However, since the background becomes black, we can still see the button. The issue arises when the background is transparent; in this case, the button becomes invisible. opw-4009051 Forward-Port-Of: odoo/odoo#171009
Steps to reproduce the bug: - Create a storable product P1 with BoM: - Component: Add any component - operation: OP1 - Create a MO with P1: - Confirm it - Start the workorder and mark it as done - Come back to the dashboard > workorders list - Select the finished workorder - Try to start it Problem: The work order can be started while it is in the 'done' state. When the function `button_start` is called, we will check if we need to skip the employee check or n
Original PR description
Steps to reproduce the bug: - Create a storable product P1 with BoM: - Component: Add any component - operation: OP1 - Create a MO with P1: - Confirm it - Start the workorder and mark it as done -…
Steps to reproduce the bug:
- Create a storable product P1 with BoM:
- Component: Add any component
- operation: OP1
- Create a MO with P1:
- Confirm it
- Start the workorder and mark it as done
- Come back to the dashboard > workorders list
- Select the finished workorder
- Try to start it
Problem:
The work order can be started while it is in the 'done' state.
When the function `button_start` is called, we will check if we need to
skip the employee check or not. However, since the current user is also
an employee, we will use them:
https://github.com/odoo/enterprise/blob/c4604d8b398713898b014e6073219d6202c154c3/mrp_workorder/models/mrp_workorder.py#L258-L259
The function start_employee will then be called:
https://github.com/odoo/enterprise/blob/c4604d8b398713898b014e6073219d6202c154c3/mrp_workorder/models/mrp_workorder.py#L284-L286
The state of the work order will then be updated:
https://github.com/odoo/enterprise/blob/c4604d8b398713898b014e6073219d6202c154c3/mrp_workorder/models/mrp_workorder.py#L740"
opw-[4024904](https://www.odoo.com/web#id=4024904&view_type=form&model=project.task)
Forward-Port-Of: odoo/odoo#172587Current behavior: --- When printing a Lot/Serial Number, if the product name is too long, the content overlaps. Steps to reproduce: --- 1. Go to Inventory > Products > Lots/Serial Numbers 2. Open one Serial Number > open its product 3. Rename product with long name 4. Go back to Lots/Serial Numbers 5. Select the Serial Number with renamed product 6. Click on Print > PDF 7. Barcode is out of the box Cause of the issue: --- Caused by: https://github.com/odoo/odoo/commit/95880f4
Original PR description
Current behavior: --- When printing a Lot/Serial Number, if the product name is too long, the content overlaps. Steps to reproduce: --- 1. Go to Inventory > Products > Lots/Serial Numbers 2. Open one Serial Number > open its product 3. Rename product with long name 4. Go back to Lots/Serial Numbers 5. Select the Serial Number with renamed product 6. Click on Print > PDF 7. Barcode is out of the box Cause of the issue: --- Caused by: https://github.com/odoo/odoo/commit/95880f43c59c061f2a971ba8f41f9912139b798a div was changed to span without changing the css opw-3819349 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159137
Currently the condition on `self.product_id or not self.account_id` is inside the lambda passed to `_conditional_add_to_compute`. `_conditional_add_to_compute` calls the lambda in a filtered so this condition will be evaluated for all the lines in self. As it only depends on self, i.e. not the current line, we can move it outside of the implicit for-loop. #### speedup Customer database. Calling `_inverse_product_id` increasing the cardinality of self. | self size | Before PR | After PR
Original PR description
Currently the condition on `self.product_id or not self.account_id` is inside the lambda passed to `_conditional_add_to_compute`. `_conditional_add_to_compute` calls the lambda in a filtered so this condition will be evaluated for all the lines in self. As it only depends on self, i.e. not the current line, we can move it outside of the implicit for-loop. #### speedup Customer database. Calling `_inverse_product_id` increasing the cardinality of self. | self size | Before PR | After PR | |:----------:|:---------------:|:-----------:| | 10 | 5ms | 5ms | | 100 | 14ms | 11ms | | 1000 | 271ms | 36ms | | 10000 | 28.7s | 300ms | | 50000 | 16min | 1.5s | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170934
In Sweden, Peppol endpoint is required to be exactly 10 digits - no other characters are allowed. Currently, we're mapping SE peppol endpoint to be the VAT number, which contains the country code prefix and a 12-digit number. As a result, a lot of our invoices are being rejected by the Swedish access points. Let's map it to the company registry number and add a check in constrains. See: https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/ no task, customer feedback --- I confirm
Original PR description
In Sweden, Peppol endpoint is required to be exactly 10 digits - no other characters are allowed. Currently, we're mapping SE peppol endpoint to be the VAT number, which contains the country code prefix and a 12-digit number. As a result, a lot of our invoices are being rejected by the Swedish access points. Let's map it to the company registry number and add a check in constrains. See: https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/ no task, customer feedback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172834 Forward-Port-Of: odoo/odoo#172756
Steps to reproduce: ------------------- - Install `Task Logs` module - Go to `Timesheets` - Create a timesheet line in the project `Research & Development` and give a description (but set no task) - Go to `Project` and open `Research & Development` project settings - Click on `Actions` button and select `Timesheets` to download report - Open the downloaded report Issue: ------ The `Task` column contains the `Description` of the timesheet, and the `Hours` value is in the `Descript
Original PR description
Steps to reproduce: ------------------- - Install `Task Logs` module - Go to `Timesheets` - Create a timesheet line in the project `Research & Development` and give a description (but set no task) - Go to `Project` and open `Research & Development` project settings - Click on `Actions` button and select `Timesheets` to download report - Open the downloaded report Issue: ------ The `Task` column contains the `Description` of the timesheet, and the `Hours` value is in the `Description` column. Cause: ------ If the timesheet line has no task and generating report only for one project, the cell value will not be created for the timesheet line. Solution: --------- If the column `Task` (or `Project`) exist, create the cell anyway. opw-3984479 Forward-Port-Of: odoo/odoo#172382
Imagine a scenario where Odoo and Google calendars are synced. Then, this happens: 1. User goes to Google and changes one event from a recurrence series. 2. When saving, user chooses to modify "this event and all upcoming". 3. Odoo syncs from Google automatically via cron. <details> ``` 2024-07-04 10:02:21,094 25 INFO odoo odoo.addons.google_calendar.models.res_users: Calendar Synchro - Starting synchronization for res.users(15,)
Original PR description
Imagine a scenario where Odoo and Google calendars are synced. Then, this happens: 1. User goes to Google and changes one event from a recurrence series. 2. When saving, user chooses to modify "this…
Imagine a scenario where Odoo and Google calendars are synced. Then, this happens:
1. User goes to Google and changes one event from a recurrence series.
2. When saving, user chooses to modify "this event and all upcoming".
3. Odoo syncs from Google automatically via cron.
<details>
```
2024-07-04 10:02:21,094 25 INFO odoo odoo.addons.google_calendar.models.res_users: Calendar Synchro - Starting synchronization for res.users(15,)
2024-07-04 10:02:21,568 25 INFO odoo odoo.addons.google_calendar.models.calendar_recurrence_rule: Recurrence #4838 | current rule: FREQ=WEEKLY;WKST=MO;UNTIL=20240620T215959Z;BYDAY=FR | new rule: FREQ=WEEKLY;WKST=MO;UNTIL=20240613T215959Z;BYDAY=FR | remaining: 1 | removed: 1
2024-07-04 10:02:21,583 25 INFO odoo odoo.models.unlink: User #15 deleted calendar.event records with IDs: [1999701]
2024-07-04 10:02:21,586 25 INFO odoo odoo.models.unlink: User #15 deleted mail.followers records with IDs: [3665655, 3665656, 3665657, 3665658, 3665659, 3665660, 3665661, 3665662, 3665768]
2024-07-04 10:02:21,919 25 ERROR odoo odoo.addons.google_calendar.models.res_users: [res.users(15,)] Calendar Synchro - Exception : Record does not exist or has been deleted.
(Record: calendar.event(1999701,), User: 15) !
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/[api.py](https://api.py/)", line 997, in get
cache_value = field_cache[record._ids[0]]
KeyError: 1999701
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/[fields.py](https://fields.py/)", line 1161, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/custom/src/odoo/odoo/[api.py](https://api.py/)", line 1004, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'calendar.event(1999701,).write_date'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/auto/addons/google_calendar/models/[res_users.py](https://res_users.py/)", line 100, in _sync_all_google_calendar
user.with_user(user).sudo()._sync_google_calendar(google)
File "/opt/odoo/auto/addons/google_calendar/models/[res_users.py](https://res_users.py/)", line 79, in _sync_google_calendar
synced_events = self.env['calendar.event'].with_context(write_dates=events_write_dates)._sync_google2odoo(events - recurrences, default_reminders=default_reminders)
File "/opt/odoo/auto/addons/google_calendar/models/[google_sync.py](https://google_sync.py/)", line 181, in _sync_google2odoo
odoo_record_write_date = write_dates.get([odoo_record.id](https://odoo_record.id/), odoo_record.write_date)
File "/opt/odoo/custom/src/odoo/odoo/[fields.py](https://fields.py/)", line 1191, in __get__
raise MissingError("\n".join([
odoo.exceptions.MissingError: Record does not exist or has been deleted.
(Record: calendar.event(1999701,), User: 15)
```
</details>
In such case, due to the way this was handled, Odoo would die with `MissingError`.
Here I contribute a test for such scenario and the fix.
@moduon MT-6287
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#172103Open Bank Journal settings In 'Outgoing Payments' tab add a payment method entry: - Type: Manual - Name: [TEST] - Outstanding Payment Account: [ACCOUNT] Create an expense paid by company Create the report, select as payment method [TEST] Approve the expense and post journal entry Check the created payment Issue: Payment line is not using [ACCOUNT], but the account of the first outgoing payment line found in the Bank Journal opw-4015780 Forward-Port-Of: odoo/odoo#171892
Original PR description
Open Bank Journal settings In 'Outgoing Payments' tab add a payment method entry: - Type: Manual - Name: [TEST] - Outstanding Payment Account: [ACCOUNT] Create an expense paid by company Create the report, select as payment method [TEST] Approve the expense and post journal entry Check the created payment Issue: Payment line is not using [ACCOUNT], but the account of the first outgoing payment line found in the Bank Journal opw-4015780 Forward-Port-Of: odoo/odoo#171892
**Steps to reproduce the bug:** - Create a storable product P1. - Create two purchase agreement with the same product and qty=10 - Create and confirm a PO with only the second PO - Try to export both purchase agreements, selecting the one without a PO first and then the other. For the fields to export, choose: Products to purchase/ordered quantities. **Problem**: Sure, here is the corrected version in English: Both lines will show 0 units. When the `_compute_ordered_qty` is call
Original PR description
**Steps to reproduce the bug:** - Create a storable product P1. - Create two purchase agreement with the same product and qty=10 - Create and confirm a PO with only the second PO - Try to export both…
**Steps to reproduce the bug:** - Create a storable product P1. - Create two purchase agreement with the same product and qty=10 - Create and confirm a PO with only the second PO - Try to export both purchase agreements, selecting the one without a PO first and then the other. For the fields to export, choose: Products to purchase/ordered quantities. **Problem**: Sure, here is the corrected version in English: Both lines will show 0 units. When the `_compute_ordered_qty` is called with the first PO requisition line, no purchase order is linked, and therefore the total quantity remains at 0. However, the product is added as a founded line. So, on the second requisition line, even though the total quantity (10) is correctly calculated because a PO is linked, the condition that checks if the product has already been found will be true, and therefore the quantity will be set to 0. https://github.com/odoo/odoo/blob/e7850da5848993e036ab70b731f37005ccd64604/addons/purchase_requisition/models/purchase_requisition.py#L240-L244 opw-[4005265](https://www.odoo.com/web#id=4005265&view_type=form&model=project.task) Forward-Port-Of: odoo/odoo#171972 Forward-Port-Of: odoo/odoo#171809
Currently a traceback is occurring when the user tries to load demo data in POS. To reproduce this issue: 1) Install `POS`, `pos_loyalty` without demo data 2) Make sure no products are available in `POS` by disabling the `Available in POS` for `products` in the `POS` 3) Now open a session and click the explore `demo data` button Error:- ``` KeyError: 'pos_special_products_ids' File "odoo/http.py", line 2248, in __call__ response = request._serve_db() File "odoo/http.
Original PR description
Currently a traceback is occurring when the user tries to load demo data in POS. To reproduce this issue: 1) Install `POS`, `pos_loyalty` without demo data 2) Make sure no products are available in…
Currently a traceback is occurring when the user tries to load demo data in POS.
To reproduce this issue:
1) Install `POS`, `pos_loyalty` without demo data
2) Make sure no products are available in `POS` by disabling
the `Available in POS` for `products` in the `POS`
3) Now open a session and click the explore `demo data` button
Error:-
```
KeyError: 'pos_special_products_ids'
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/point_of_sale/models/pos_session.py", line 2127, in load_product_frontend
return self.get_onboarding_data()
File "home/odoo/src/enterprise/saas-17.2/pos_preparation_display/models/pos_session.py", line 20, in get_onboarding_data
result = super().get_onboarding_data()
File "addons/point_of_sale/models/pos_session.py", line 1902, in get_onboarding_data
response = self.load_data(['pos.category', 'product.product'], True)
File "home/odoo/src/enterprise/saas-17.2/pos_settle_due/models/pos_session.py", line 20, in load_data
response = super().load_data(models_to_load, only_data)
File "addons/pos_loyalty/models/pos_session.py", line 103, in load_data
result['custom']['pos_special_products_ids'].extend(
```
When the user clicks on the `load demo` button, it triggers with `only_data` as a truthy value from `[1]`
But the `pos_special_products_ids` value assigns only if no `only_data` from `[2]`
which leads to a traceback from `[3]`
[1]
https://github.com/odoo/odoo/blob/d0cf45dc6bb472907f6b8542992f717c699f5a34/addons/point_of_sale/models/pos_session.py#L1904-L1905
[2]
https://github.com/odoo/odoo/blob/d0cf45dc6bb472907f6b8542992f717c699f5a34/addons/point_of_sale/models/pos_session.py#L289-L307
[3]
https://github.com/odoo/odoo/blob/d0cf45dc6bb472907f6b8542992f717c699f5a34/addons/pos_loyalty/models/pos_session.py#L103-L105
After applying this commit, it will resolve this issue by only accessing the value when the only_data value is falsy.
sentry-5588106710
Forward-Port-Of: odoo/odoo#172608Steps to reproduce: - Install Calendar and Appointment - Go to Calendar - Create a meeting with a name and click on "+ Odoo Meeting" - Copy this link and keep it on the side - Create the event and edit it - Copy the link Issues: The link doesn't match, this is because we are not sending the access token upon the creation of the meeting to the backend. This causes a new access token to be created which ends up in a new link. opw-3910706 Forward-Port-Of: odoo/odoo#169992
Original PR description
Steps to reproduce: - Install Calendar and Appointment - Go to Calendar - Create a meeting with a name and click on "+ Odoo Meeting" - Copy this link and keep it on the side - Create the event and edit it - Copy the link Issues: The link doesn't match, this is because we are not sending the access token upon the creation of the meeting to the backend. This causes a new access token to be created which ends up in a new link. opw-3910706 Forward-Port-Of: odoo/odoo#169992
Steps to reproduce: - Create a subcontracted bom for a product with: - Flexible consumption (with warning) - One component requiring 1 qty - Create a receipt for 10 for that product from the recorded subcontractor - Click on 'Record Component' and set: - Quantity (subcontracted product) to 3 - Done (component) to 5 - Record Production and validate the warning - Discard the wizard - Validate the picking and select 'No backorder' Issue: Once validated, the subcontracted consu
Original PR description
Steps to reproduce: - Create a subcontracted bom for a product with: - Flexible consumption (with warning) - One component requiring 1 qty - Create a receipt for 10 for that product from the recorded…
Steps to reproduce: - Create a subcontracted bom for a product with: - Flexible consumption (with warning) - One component requiring 1 qty - Create a receipt for 10 for that product from the recorded subcontractor - Click on 'Record Component' and set: - Quantity (subcontracted product) to 3 - Done (component) to 5 - Record Production and validate the warning - Discard the wizard - Validate the picking and select 'No backorder' Issue: Once validated, the subcontracted consumption will be back to 3 instead of 5. During the subcontracted move's `_action_done()`, as the move is incomplete, it will be split in two. After doing the split, the `product_uom_qty` of the initial move will be changed to its done quantity, which will trigger the update of the subcontracted demand. This will end up triggering `change_prod_qty()` of the recorded production, but to change its quantity to the same quantity. However, doing that will reset the consumption of its components to what would be expected from the bom. Instead of doing that, we can simply stop if there is no quantity to remove anymore before calling `change_prod_qty()`. opw-4032052 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172243 Forward-Port-Of: odoo/odoo#171078
### Steps to reproduce: 1. Create a product - Tracked by serial numbers - Set the weight to 2kg - Update the quantity on hands to 2 (with serials numbers) 2. Create a transfer of 2 quantities of the product 3. Open the detailed operations 5. Set the quantity done on a single line 6. Go back to the transfer and click put in pack 7. Select any package ### Before this commit: The shipping weight is 4 kg instead of 2 kg, as it takes all lines regardless of their picked state.
Original PR description
### Steps to reproduce: 1. Create a product - Tracked by serial numbers - Set the weight to 2kg - Update the quantity on hands to 2 (with serials numbers) 2. Create a transfer of 2 quantities of the product 3. Open the detailed operations 5. Set the quantity done on a single line 6. Go back to the transfer and click put in pack 7. Select any package ### Before this commit: The shipping weight is 4 kg instead of 2 kg, as it takes all lines regardless of their picked state. ### After this commit: Only the picked move lines are used to compute the shipping weight. opw-4028054 Forward-Port-Of: odoo/odoo#172790
The recent PR #171722 introduced the use of stdnum and zeep Python libraries in odoo/tools/_monkeypatches.py Now when connecting an iot box to a database Odoo never starts on it as the IoT Box Image 24_01 doesn't have these libraries. This PR adds the try/except around the imports of them and adds a check to make sure that the variables defined through these libraries exist With these try/except the IoT Box works as expected Forward-Port-Of: odoo/odoo#172887 Forward-Port-Of: odoo/odoo#
Original PR description
The recent PR #171722 introduced the use of stdnum and zeep Python libraries in odoo/tools/_monkeypatches.py Now when connecting an iot box to a database Odoo never starts on it as the IoT Box Image 24_01 doesn't have these libraries. This PR adds the try/except around the imports of them and adds a check to make sure that the variables defined through these libraries exist With these try/except the IoT Box works as expected Forward-Port-Of: odoo/odoo#172887 Forward-Port-Of: odoo/odoo#172789