Friday, January 31, 2025
49 changes · saas-18.1
Enhancements to existing features
Users can now start typing while the quick reaction menu is open to automatically open the full emoji picker and search for the emoji they want. This makes reacting to messages smoother when the desired emoji is not among the frequently used options.
Original PR description
"Add reaction" message action shows the quick reaction menu, which shows a nice listing of the most frequently used emoji. Sometimes the desired emoji is not there, and it's clunky to click on "+" and then search. This commit intercepts keydown that are not used for naviation in the quick reaction menu, so that it automatically opens the full emoji picker. That way, we can quickly search for the desired emoji for the message reaction 
Scheduled background jobs that use progress tracking now keep running for at least 10 seconds when there is still work to process. This helps process more pending records in each run, reducing delays without changing how users interact with the system.
Original PR description
When using the progress API, run for at least 10 seconds if there are rows to be processed. This is a simple alternative to solution described in task-4433571. task-4433571 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Point of Sale order processing now treats a known incomplete-processing situation as a warning instead of an error. This reduces unnecessary error noise in logs while still keeping the issue visible for monitoring and follow-up.
Original PR description
Currently, the error occurs when the system cannot fully process the POS Order This error occurs during the process of the POS Order, So replace a logger error a message with a logger warning message at [1] to prevent more error logs in a terminal. link [1]:https://github.com/odoo/odoo/blob/3be513d5cc89ad4fefb84fabd8c9089f9ef95aa2/addons/point_of_sale/models/pos_order.py#L147 Sentry-5315326414 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Steps to reproduce the error: - Create a new invoice. Don't confirm it. - Go to list view of invoices. - Select that invoice > Download > PDF Traceback: "AttributeError: 'bool' object has no attribute 'replace'" `_get_move_display_name` can be used instead as it already handles draft invoices. sentry-6191644587 Forward-Port-Of: odoo/odoo#194866
Original PR description
Steps to reproduce the error: - Create a new invoice. Don't confirm it. - Go to list view of invoices. - Select that invoice > Download > PDF Traceback: "AttributeError: 'bool' object has no attribute 'replace'" `_get_move_display_name` can be used instead as it already handles draft invoices. sentry-6191644587 Forward-Port-Of: odoo/odoo#194866
This update improves how Odoo removes unused unsubscribe links from outgoing email notifications. It prevents slowdowns in emails with many formatting elements while keeping compatibility with older customized notification templates.
Original PR description
Notification layout contain a somehow-fake node holding a generic unfollow link. It is dynamically replaced at sending time to make it recipient-specific. In a lot of cases we don't need that unfollow URL and the node should be removed. This is done using a regex to avoid parshing HTML. Current regex can be improved, notably to avoid backtracking. When having bodies with lot of span, timing become quite bad. Our use cases are simple, either old <span id="mail_unfollow">..</span> either new <span t-if="show_unfollow" id="mail_unfollow">..</span> layouts. Regex can be therefore be simplified. Note that we support "two" kind of nodes mainly to maintain support of custom / copied / frozen notification layouts. Followup of https://github.com/odoo/odoo/pull/189741 Task-4529263
Avatars shown for call participants in Discuss now preserve their original image proportions instead of appearing stretched or squashed. This improves the visual quality and professionalism of the Discuss sidebar during calls.
Original PR description
Avatar stack of call participants in discuss sidebar lacked preserving aspect ratio of image, so image may be squished. This commit fixes the issue with `.o_object_fit_cover` used in all showings of avatars in discuss. Before  After 
This fixes a live chat issue where visitors could see the message box during chatbot steps that did not require a reply. It prevents confusion by only showing the input field when the visitor is actually expected to type or when appropriate for operators.
Original PR description
The composer is disabled when not needed (chat bot steps not requiring user input) or when the live chat has ended. However, the composer is sometimes shown to the visitor even when the composer is disabled. Steps to reproduce the issue: - Go to the /contactus page - Start the chat bot - Composer is shown, while the bot doesn't expect any user input In [1], we enabled the composer for operators even when the chat has ended. To do so, we check that the current user is not the visitor. However, temporary threads are missing some information such as channel members. As a result, the composer is shown to the visitor even if disabled when the thread is temporary. This PR modify this condition to handle temporary threads. [1]: https://github.com/odoo/odoo/pull/195734
This fixes inconsistent behavior in the web interface when managing favorites. The change helps ensure favorite-related actions behave predictably, reducing intermittent failures and improving user confidence.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Public website visitors will no longer see the option to insert canned responses in mail discussions. This keeps an internal support productivity feature visible only to employees, reducing confusion for external users.
Original PR description
The "insert a canned response" button is displayed when the user has access to canned responses. It is the case if the user created the canned response or if he is a member of once of the authorized groups. However, it makes no sense to display canned response for public users. This PR ensures canned responses are only available to internal users.
This fix prevents the emoji picker from crashing when a user searches for something with no matching emojis and then uses the arrow keys. It makes the messaging experience more reliable in this edge case without changing normal emoji picker behavior.
Original PR description
Before this PR, pressing the right arrow key when the emoji picker was empty led to a crash.
Steps to reproduce:
- Open the picker
- Type a search that matches no emojis ("ezaeazeza")
- Press the right arrow
This PR fixes the issue.
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-prThe online synchronization menu now correctly includes credit card accounts when users choose accounts to connect. This prevents eligible accounts from being hidden and helps businesses set up bank and credit card synchronization as expected.
Original PR description
In this pr: https://github.com/odoo/enterprise/pull/70591 we added a way to add credit card account but forgot to change some domains in the online synchronisation menu. no-task-id
Versions -------- - 17.0+ Steps ----- 1. Ensure `geoip` works (or patch the `_get_geoip_country_code` method); 2. create two pricelists for the website; 3. first should be restricted to EU countries & use EUR; 4. second one shouldn't be restricted to any country & use USD; 5. log in as a Portal user without address details from a EU IP; 6. open the shop. Issue ----- The prices are displayed in USD. Cause ----- The geoip country is taken into account for public users, but no
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Ensure `geoip` works (or patch the `_get_geoip_country_code` method); 2. create two pricelists for the website; 3. first should be restricted to EU countries & use EUR; 4. second one shouldn't be restricted to any country & use USD; 5. log in as a Portal user without address details from a EU IP; 6. open the shop. Issue ----- The prices are displayed in USD. Cause ----- The geoip country is taken into account for public users, but not for partners. Instead it relies on the partner's country_id, which could be empty. Solution -------- When computing the `property_product_pricelist`, add the geoip country to the context. Use this value in the fallback for partners without specific pricelist property set, and without a `country_id`. opw-4398543 Forward-Port-Of: odoo/odoo#195723 Forward-Port-Of: odoo/odoo#194885
If Projects plan is removed we cannot let it be recreated in a module upgrade. If we allow so the new plan will create an unnecessary column in `account_analytic_line`. This would repeat each time the user upgrades the module in case the plan is removed before the upgrade. In principle this is not an issue, unless account_budget is also installed. In such case the new column for `budget_line` won't be created and that would cause errors. Steps to reproduce 1. Install `account_budget` 2. Cre
Original PR description
If Projects plan is removed we cannot let it be recreated in a module upgrade. If we allow so the new plan will create an unnecessary column in `account_analytic_line`. This would repeat each time…
If Projects plan is removed we cannot let it be recreated in a module upgrade. If we allow so the new plan will create an unnecessary column in `account_analytic_line`. This would repeat each time the user upgrades the module in case the plan is removed before the upgrade. In principle this is not an issue, unless account_budget is also installed. In such case the new column for `budget_line` won't be created and that would cause errors. Steps to reproduce 1. Install `account_budget` 2. Create a new Plan 3. Set the config parameter to the id of the new plan 4. Remove Projects plan 5. Upgrade analytic module 6. Try to create a new analytic account. There is an error in the frontend ``` OwlError: The following error occurred in onWillStart: ""budget.line"."x_plan3_id" field is undefined." ``` The problem is that since the new plan was created via an upgrade the post init hook of `account_budget` didn't run. Therefore the new column in `budget_line` was not created. Notes: * In step 4 above the column `x_plan2_id` in analytic line is left unused. This is not a problem per-se besides extra data dangling in the DB. * We may argue that we should ensure that the column plan is created in a register_hook in `account_budget` but conceptually the relevant setting is the config parameter, recreating a plan that has no reason to exist could cause more issues down the line. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195778 Forward-Port-Of: odoo/odoo#195710
This commit fixes the width of not available items inside the search results list and the search result dropdown. We achieve the fix by using the same approach used in this commit: https://github.com/odoo/odoo/commit/9ffbc8720b84f51d5d03a7e11c74c19b62cf46c0 opw-4444222 task-4517564 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195758 Forward-Port-Of: odoo/odoo#195316
Original PR description
This commit fixes the width of not available items inside the search results list and the search result dropdown. We achieve the fix by using the same approach used in this commit: https://github.com/odoo/odoo/commit/9ffbc8720b84f51d5d03a7e11c74c19b62cf46c0 opw-4444222 task-4517564 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195758 Forward-Port-Of: odoo/odoo#195316
Steps to reproduce the bug: - Create a workcenter “WC1”: - Cost by hour: 60 - Setup time: 10 min - Cleanup time: 10 min - Time Efficiency: 85 - Create a storable product “P1” with the following BoM: - Operation: OP1 -> 60 min in WC1 - Create a MO to produce one unit of P1: - Confirm the MO - Go to the MO overview Problem: Time Efficiency, setup, and cleanup times are not taken into account in the BoM Cost calculation. The calculation should be the
Original PR description
Steps to reproduce the bug: - Create a workcenter “WC1”: - Cost by hour: 60 - Setup time: 10 min - Cleanup time: 10 min - Time Efficiency: 85 - Create a storable product “P1” with the following BoM:…
Steps to reproduce the bug:
- Create a workcenter “WC1”:
- Cost by hour: 60
- Setup time: 10 min
- Cleanup time: 10 min
- Time Efficiency: 85
- Create a storable product “P1” with the following BoM:
- Operation: OP1 -> 60 min in WC1
- Create a MO to produce one unit of P1:
- Confirm the MO
- Go to the MO overview
Problem:
Time Efficiency, setup, and cleanup times are not taken into account in
the BoM Cost calculation.
The calculation should be the same as in the BoM overview. The purpose
of the BoM cost in the MO overview is to provide information for
comparison with the real cost, in case the user has modified certain
parameters during production.
Attention: There may be a slight difference in the calculation of
"mo_cost" and "bom_cost" because the expected duration is rounded to
two digits in the work order. This affects the mo_cost calculation
since it relies directly on this field,
opw-4478070
Forward-Port-Of: odoo/odoo#195493Steps to reproduce the bug: - Create a storable product “P1”: - UoM: g - Go to inventory > operation > Scrap: - Create a new one: - product: P1 - UoM: KG - Quantity: 1 - Validate the scrap - A wizard is triggered indicating insufficient stock quantity. - validate it Problem: The quantity in the scrap is updated to 1000 kg, and the related move is created with a quantity of 1000 kg. opw-4485849 Forward-Port-Of: odoo/odoo#195748 Forward-Port-Of: odoo/odoo#194012
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”:
- UoM: g
- Go to inventory > operation > Scrap:
- Create a new one: - product: P1 - UoM: KG - Quantity: 1
- Validate the scrap
- A wizard is triggered indicating insufficient stock quantity.
- validate it
Problem:
The quantity in the scrap is updated to 1000 kg, and the related move is created with a quantity of 1000 kg.
opw-4485849
Forward-Port-Of: odoo/odoo#195748
Forward-Port-Of: odoo/odoo#194012Commit https://github.com/odoo/odoo/commit/98218629f88b619ca9c8013ecbffaa221d82531c introduced a test with two non-related steps (these steps were certainly copy-pasted from another test, in spreadsheet). This commit removes these steps. 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#194832
Original PR description
Commit https://github.com/odoo/odoo/commit/98218629f88b619ca9c8013ecbffaa221d82531c introduced a test with two non-related steps (these steps were certainly copy-pasted from another test, in spreadsheet). This commit removes these steps. 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#194832
If you sell a product that has multiple pos categories, the report would contain as many lines as the number of categories. Steps to reproduce: ------------------- * Create product A with atleast 2 pos categories * Make a sale in PoS with this product * Go to PoS order report and click on the graph * This will open a view containing all the lines of the report > Observation: You have multiple lines for the same order Why the fix: ------------ To avoid this issue, we select only the
Original PR description
If you sell a product that has multiple pos categories, the report would contain as many lines as the number of categories. Steps to reproduce: ------------------- * Create product A with atleast 2 pos categories * Make a sale in PoS with this product * Go to PoS order report and click on the graph * This will open a view containing all the lines of the report > Observation: You have multiple lines for the same order Why the fix: ------------ To avoid this issue, we select only the first category of the product. opw-4451101 Forward-Port-Of: odoo/odoo#195097
Versions -------- - 16.0 Backport of https://github.com/odoo/odoo/pull/195266 Issue ----- Use `float_compare` to compare floating point amounts on reward validation. Forward-Port-Of: odoo/odoo#195793 Forward-Port-Of: odoo/odoo#195637
Original PR description
Versions -------- - 16.0 Backport of https://github.com/odoo/odoo/pull/195266 Issue ----- Use `float_compare` to compare floating point amounts on reward validation. Forward-Port-Of: odoo/odoo#195793 Forward-Port-Of: odoo/odoo#195637
Before this commit, with a slow internet connection, if a user added an item to the order and pressed the pay button very quickly (before completing the price loading), it would bypass the payment step and directly give the receipt. opw-4305214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186960
Original PR description
Before this commit, with a slow internet connection, if a user added an item to the order and pressed the pay button very quickly (before completing the price loading), it would bypass the payment step and directly give the receipt. opw-4305214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186960
The credit limit in the partner form view was missing a currency symbol, leading to ambiguity about whether the limit was in the customer's currency or the company's currency. Displayed the partner limit in the company currency to avoid confusion. task-4507336 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195477 Forward-Port-Of: odoo/odoo#194807
Original PR description
The credit limit in the partner form view was missing a currency symbol, leading to ambiguity about whether the limit was in the customer's currency or the company's currency. Displayed the partner limit in the company currency to avoid confusion. task-4507336 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195477 Forward-Port-Of: odoo/odoo#194807
Currently, a traceback occurs when there is no invoice date and tries to register a payment from actions. To reproduce this issue: 1) Install accounting 2) Create a customer invoice with payment term having an early discount 3) Make sure the invoice date to be empty 4) Add a line and from actions click pay Error:- ``` TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta' ``` In account move, `invoice_date` is not required. So when the user tries to regist
Original PR description
Currently, a traceback occurs when there is no invoice date and tries to register a payment from actions. To reproduce this issue: 1) Install accounting 2) Create a customer invoice with payment term…
Currently, a traceback occurs when there is no invoice date and tries to register a payment from actions. To reproduce this issue: 1) Install accounting 2) Create a customer invoice with payment term having an early discount 3) Make sure the invoice date to be empty 4) Add a line and from actions click pay Error:- ``` TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta' ``` In account move, `invoice_date` is not required. So when the user tries to register a payment with payment term having an early discount and no invoice date, It leads to the above traceback from below line. https://github.com/odoo/odoo/blob/ee48df7f33a3aeb1798bf5852be8c6d26a7db7fd/addons/account/models/account_payment_term.py#L256-L258 Indeed, a date is required to get an early discount date. so without date, we should not execute the `_get_last_discount_date` method. In some other locations, it was managed in a similar manner as indicated in the below line. https://github.com/odoo/odoo/blob/ee48df7f33a3aeb1798bf5852be8c6d26a7db7fd/addons/account/models/account_payment_term.py#L262-L264 We can resolve this issue by adding an additional check of invoice_date, Which makes the code more robust. sentry-6149404219 Forward-Port-Of: odoo/odoo#190801
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#195791
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195791
check commit message for description. Forward-Port-Of: odoo/odoo#195193
Original PR description
check commit message for description. Forward-Port-Of: odoo/odoo#195193
Versions -------- - saas-17.4+ Steps ----- 1. Create a `next_order_coupons` loyalty program; 2. go to eCommerce as Public User; 3. add products to cart so that the program gets applied; 4. on checkout, log in as Portal User during delivery step; 5. finalize payment. Issue ----- Two coupons were created: one for Public User with 0 points, one with no partner and 1 point. There should only be one coupon, and it should be linked to the logged in user. Cause ----- PR https://
Original PR description
Versions -------- - saas-17.4+ Steps ----- 1. Create a `next_order_coupons` loyalty program; 2. go to eCommerce as Public User; 3. add products to cart so that the program gets applied; 4. on…
Versions -------- - saas-17.4+ Steps ----- 1. Create a `next_order_coupons` loyalty program; 2. go to eCommerce as Public User; 3. add products to cart so that the program gets applied; 4. on checkout, log in as Portal User during delivery step; 5. finalize payment. Issue ----- Two coupons were created: one for Public User with 0 points, one with no partner and 1 point. There should only be one coupon, and it should be linked to the logged in user. Cause ----- PR https://github.com/odoo/odoo/pull/163545 changed `next_order_coupons` programs to set a partner when created. Issue is when they get created as Public user, the next call to `_update_programs_and_rewards` when logged in will remove the point entries for that coupon, as it's linked to partner that doesn't match the sale order's: https://github.com/odoo/odoo/blob/278ce01fe1882ea424032dcf97c4d345816be96e/addons/sale_loyalty/models/sale_order.py#L867-L870 Solution -------- Before checking whether to unlink the point entries, update the coupon's `partner_id` if it was created for Public User and the sale order itself is no longer linked to Public User. Also when generating new coupons in `_update_programs_and_rewards`, link `next_order_coupons` to the customer to make it behave identical to coupons created via `__try_apply_program` (relevant when changing the SO customer from a one specific partner to another specific partner). opw-4397753 Forward-Port-Of: odoo/odoo#194936
This fix addresses a minor issue with the `_compute_available_product_document_ids` method of `sale.order`, which doesn't fully support multi-compute. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193747
Original PR description
This fix addresses a minor issue with the `_compute_available_product_document_ids` method of `sale.order`, which doesn't fully support multi-compute. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193747
**Specifications:** - remove modal when user click on kiosk mode and directly open kiosk view. - add an install button in kiosk view **After this PR:** Modal will be removed while opening kiosk mode in hr_attendance. Task-4161336 Forward-Port-Of: odoo/odoo#182308
Original PR description
**Specifications:** - remove modal when user click on kiosk mode and directly open kiosk view. - add an install button in kiosk view **After this PR:** Modal will be removed while opening kiosk mode in hr_attendance. Task-4161336 Forward-Port-Of: odoo/odoo#182308
**Current behavior before PR:** Push notifications displayed the Odoo Bot icon regardless of the actual message author. **Desired behavior after PR is merged:** The push notifications now correctly display the avatar of the message author. Task-[4510479](https://www.odoo.com/odoo/project/1519/tasks/4510479) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195688 Forward-Port-Of: odoo/odoo#195219
Original PR description
**Current behavior before PR:** Push notifications displayed the Odoo Bot icon regardless of the actual message author. **Desired behavior after PR is merged:** The push notifications now correctly display the avatar of the message author. Task-[4510479](https://www.odoo.com/odoo/project/1519/tasks/4510479) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195688 Forward-Port-Of: odoo/odoo#195219
Before this commit, attempting to validate an order with a zero total (such as when fully paid using an eWallet) would result in an error. opw-4487591 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195264
Original PR description
Before this commit, attempting to validate an order with a zero total (such as when fully paid using an eWallet) would result in an error. opw-4487591 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195264
In https://github.com/odoo/odoo/pull/127877, the active field was removed and replaced with state: cancel. This domain was modified but removed the check for the cancelled state. opw-4420347 Forward-Port-Of: odoo/odoo#195078 Forward-Port-Of: odoo/odoo#194600
Original PR description
In https://github.com/odoo/odoo/pull/127877, the active field was removed and replaced with state: cancel. This domain was modified but removed the check for the cancelled state. opw-4420347 Forward-Port-Of: odoo/odoo#195078 Forward-Port-Of: odoo/odoo#194600
Issue: If we have a X2many that allows to have inactive records (with `context={'active_test': False}` on the field definition) and we specify a specific order for this X2many in this view, web_read won't respect the context of the field and will filter out inactive records. This is because to apply a specific order in the web_read, we use search(), which will filter out inactive records from the `corecords` recordset. Fix: We fix this by forcing active_test=False before calling search a
Original PR description
Issue:
If we have a X2many that allows to have inactive records (with `context={'active_test': False}` on the field definition) and we specify a specific order for this X2many in this view, web_read won't respect the context of the field and will filter out inactive records.
This is because to apply a specific order in the web_read, we use search(), which will filter out inactive records from the `corecords` recordset.
Fix:
We fix this by forcing active_test=False before calling search and reapplying the previous context immediately after.
Closes #194311
Forward-Port-Of: odoo/odoo#195297
Forward-Port-Of: odoo/odoo#194379Steps to reproduce the bug: - Create a storable product “P1”: - Product category: “AVCO” - BoM: - Type: Kit - Components: - C1: Tracked by lot and valuated by lot - C2 - Create a purchase order: - 1 unit of P1 → Price: $10 - Confirm the PO - Go to the reception: - Set a new lot (Lot_1) for C1 - Validate the reception Problem: A traceback is triggered: ``` new_std_price = move_cost[lot] ~~~~~~~~~^^^^^ KeyError: stoc
Original PR description
Steps to reproduce the bug: - Create a storable product “P1”: - Product category: “AVCO” - BoM: - Type: Kit - Components: - C1: Tracked by lot and valuated by lot - C2 - Create a purchase order: - 1…
Steps to reproduce the bug:
- Create a storable product “P1”:
- Product category: “AVCO”
- BoM:
- Type: Kit
- Components:
- C1: Tracked by lot and valuated by lot
- C2
- Create a purchase order:
- 1 unit of P1 → Price: $10
- Confirm the PO
- Go to the reception:
- Set a new lot (Lot_1) for C1
- Validate the reception
Problem:
A traceback is triggered:
```
new_std_price = move_cost[lot]
~~~~~~~~~^^^^^ KeyError: stock.lot(19,)"
```
When validating the picking, the moves will first be validated, and then
the product price will be updated before the move is marked as done:
https://github.com/odoo/odoo/blob/168f4d75ef724ee99ffaf7884730facd8ed936bb/addons/stock_account/models/stock_move.py#L387-L388
The move cost is retrieved using the _get_price_unit function:
https://github.com/odoo/odoo/commit/2d933b83613ad52d76ab457201adecac6fcf184b#diff-ad6229e976ce0bd1592e805b88e9813ac4e3f6fb989d3dfb8dfb8b70af03cd58R403
However, since move.product_id is different from move.purchase_line,
the parent product will be treated as a kit, and the unit price of the
kit product will be used instead: https://github.com/odoo/odoo/blob/17.0/addons/purchase_mrp/models/stock_move.py#L19
Based on this, the unit price for each component is calculated using
the cost_share and the bom_lines quantities. This is then stored in a
dictionary with an empty record of the ```”stock.lot”``` model:
When attempting to access the dictionary using the lot key from the move,
no result is returned, leading to an error.
https://github.com/odoo/odoo/blob/2d933b83613ad52d76ab457201adecac6fcf184b/addons/stock_account/models/stock_move.py#L425
Solution:
The process should account for the fact that the move product is a
component of a kit. Therefore, the price should be directly retrieved
from the dictionary without requiring a key.
opw-4434390
Forward-Port-Of: odoo/odoo#195303Steps to reproduce: - In V17.0 drag and drop an "Image Gallery" block into the page. - Upgrade to 18.0 - Click on the last "Image Gallery" indicator and then quickly on the first one. - Traceback: "TypeError: Cannot read properties of null (reading 'classList') at Carousel._setActiveIndicatorElement ..." This issue is caused by the front-end code of the image gallery, which updates the active indicator during a slide event. When the crash happens, it cannot find the active slide in the
Original PR description
Steps to reproduce: - In V17.0 drag and drop an "Image Gallery" block into the page. - Upgrade to 18.0 - Click on the last "Image Gallery" indicator and then quickly on the first one. - Traceback: "TypeError: Cannot read properties of null (reading 'classList') at Carousel._setActiveIndicatorElement ..." This issue is caused by the front-end code of the image gallery, which updates the active indicator during a slide event. When the crash happens, it cannot find the active slide in the DOM. After investigation, everything already works with Bootstrap, and the purpose of this code remains unclear. However, in the stable version, we are not taking any risks and will not modify it. In this commit, we simply added a return; in case the active slide is not found. opw-4519455 Forward-Port-Of: odoo/odoo#195606
The $0 placeholder in templates is highly useful, but it is not considered when saving a view. For instance, the search icon in the shop search bar has an incorrect xpath: `/data/xpath[3]/form/t[1]/div[1]/button[1]/i[1]`, where the inner `t[1]` actually points to another view through a `<t>$0</t>` containing the inherited view. The method responsible for handling this replacement fails when the element is editable, causing a crash. This commit ensures that when an xpath jumps to another t
Original PR description
The $0 placeholder in templates is highly useful, but it is not considered when saving a view. For instance, the search icon in the shop search bar has an incorrect xpath: `/data/xpath[3]/form/t[1]/div[1]/button[1]/i[1]`, where the inner `t[1]` actually points to another view through a `<t>$0</t>` containing the inherited view. The method responsible for handling this replacement fails when the element is editable, causing a crash. This commit ensures that when an xpath jumps to another template, it disallows the branding. task-3609835 Forward-Port-Of: odoo/odoo#187760
Upon zooming in on the elearning slides view from the mobile by finger pinch, the whole page zooms in and not just the content, which causes the content quality to be still blurry. To Reproduce on Runbot: 1.Go to eLearning module. 2.Go to "Edit" on any of the courses. 3.Add a pdf content. 4.From the phone, go to the website elearning for the same course. 4.Click on the pdf content we uploaded. 5.Try finger pinch zooming in, the document gets still blurry. 6.The issue seems to be that
Original PR description
Upon zooming in on the elearning slides view from the mobile by finger pinch, the whole page zooms in and not just the content, which causes the content quality to be still blurry. To Reproduce on Runbot: 1.Go to eLearning module. 2.Go to "Edit" on any of the courses. 3.Add a pdf content. 4.From the phone, go to the website elearning for the same course. 4.Click on the pdf content we uploaded. 5.Try finger pinch zooming in, the document gets still blurry. 6.The issue seems to be that there's no finger pinch zoom in and out, and when you try doing that the whole page zooms in and out, not changing the quality of the document. So, the solution was to make zoom in and out icon available on small screen devices as well. opw-3893275 Forward-Port-Of: odoo/odoo#178655
**Problem**: Embedded components do not render when the `html` field content is displayed outside the editor, as their mechanism relies on the editor plugin. **Solution**: Disable embedded components for the survey. **Steps to Reproduce**: 1. In a survey, add a section. 2. Add a "View" button. (Debug mode ON) 3. Use the `/` command box and add the "Video link" option. 4. Save and test the survey. 5. The video does not display. opw-4487027 --- I confirm I have signed the CLA a
Original PR description
**Problem**: Embedded components do not render when the `html` field content is displayed outside the editor, as their mechanism relies on the editor plugin. **Solution**: Disable embedded components for the survey. **Steps to Reproduce**: 1. In a survey, add a section. 2. Add a "View" button. (Debug mode ON) 3. Use the `/` command box and add the "Video link" option. 4. Save and test the survey. 5. The video does not display. opw-4487027 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194657
**Specifications:** - remove modal when user click on registration desk and directly open desk view. - Add an Install button in desk view **After this PR:** Modal will be removed while opening kiosk mode in event. Task-4161336 Forward-Port-Of: odoo/odoo#182299
Original PR description
**Specifications:** - remove modal when user click on registration desk and directly open desk view. - Add an Install button in desk view **After this PR:** Modal will be removed while opening kiosk mode in event. Task-4161336 Forward-Port-Of: odoo/odoo#182299
**Problem**: `this.state.showCodeView` cannot be relied upon because `toggleCodeView` of `HtmlField` is never called in cases like mass mailing. Instead, `MassMailingSnippetsMenu` forces code view without using the `HtmlField` mechanism. **Solution**: Instead of checking `this.state.showCodeView`, directly check the return value of `this._getCodeViewEl()` in `MassMailingHtmlField`. **Steps to Reproduce**: 1. Add an Image-Text snippet. 2. Save the snippet. 3. Resize the image. 4.
Original PR description
**Problem**: `this.state.showCodeView` cannot be relied upon because `toggleCodeView` of `HtmlField` is never called in cases like mass mailing. Instead, `MassMailingSnippetsMenu` forces code view without using the `HtmlField` mechanism. **Solution**: Instead of checking `this.state.showCodeView`, directly check the return value of `this._getCodeViewEl()` in `MassMailingHtmlField`. **Steps to Reproduce**: 1. Add an Image-Text snippet. 2. Save the snippet. 3. Resize the image. 4. Switch to code view. 5. Save. 6. Observe that the class `o_modified_image_to_save` is not removed from the image. opw-4406195 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195587 Forward-Port-Of: odoo/odoo#195539
Assuming that an order is a refund with the presence of some negative lines is not compatible with the current implementation of pos_loyalty rewards. In this PR, we make an assumption that is valid in most cases than previous, such that an order is a refund if all of its lines are negative. Forward-Port-Of: odoo/odoo#195705
Original PR description
Assuming that an order is a refund with the presence of some negative lines is not compatible with the current implementation of pos_loyalty rewards. In this PR, we make an assumption that is valid in most cases than previous, such that an order is a refund if all of its lines are negative. Forward-Port-Of: odoo/odoo#195705
Since [1], a method was introduced to prevent the "controllers" options from being centered when arrows and indicators are displayed. However, it was implemented in the wrong overridden method (computeWidgetState), which cannot update the DOM. Additionally, it failed to account for the preview mode. This commit resolves these issues. Steps to reproduce: - Website - Edit mode - Drag and drop a "carousel intro" snippet onto the page. - Select the option "Controllers > Arrows > Hidden."
Original PR description
Since [1], a method was introduced to prevent the "controllers" options from being centered when arrows and indicators are displayed. However, it was implemented in the wrong overridden method (computeWidgetState), which cannot update the DOM. Additionally, it failed to account for the preview mode. This commit resolves these issues. Steps to reproduce: - Website - Edit mode - Drag and drop a "carousel intro" snippet onto the page. - Select the option "Controllers > Arrows > Hidden." - Then select the option "Controllers > Centered." - The controllers are now displayed as centered. - Hover over the "Controllers > Arrows" options and preview a value other than "Hidden." - The preview does not update correctly. [1]: https://github.com/odoo/odoo/commit/454d743ed631c068b7b0bc72e4fd81b225a5ac52 Related to: task-4094405 Forward-Port-Of: odoo/odoo#189858
This commit fix 2 tests who nightly fails on runbot: Test 1, `test_01_orders_no_invoiced` (https://runbot.odoo.com/odoo/runbot.build.error/111519): This test failed because of a `flush_all()`, who raised an error because of an `api.depends_context` on a computed field in `product_template` Solution: remove the `api.depends_context` as he's useless (the compute still trigger as it should) Test 2, `test_read_purchase_order` (https://runbot.odoo.com/odoo/runbot.build.error/111518): This te
Original PR description
This commit fix 2 tests who nightly fails on runbot: Test 1, `test_01_orders_no_invoiced` (https://runbot.odoo.com/odoo/runbot.build.error/111519): This test failed because of a `flush_all()`, who raised an error because of an `api.depends_context` on a computed field in `product_template` Solution: remove the `api.depends_context` as he's useless (the compute still trigger as it should) Test 2, `test_read_purchase_order` (https://runbot.odoo.com/odoo/runbot.build.error/111518): This test failed because of access right error Solution: add a compute_sudo on `l10n_ke_validation_message` field and add a `groups="point_of_sale.group_pos_user"` on account_move view. no-task Forward-Port-Of: odoo/enterprise#77636
The aim of this commit is to avoid having inconsistent data leading to a Traceback while loading the lines of the Profit and Loss report. Context: cbe74884b937f630cf1d2ccf475a04e70b6f4669 changed the structure hierachy. It wasn't a big issue until e96e8d4aa663a4a5305214f2124243070fa797bb resequenced the lines and changed the order of computation in `<account.report>._get_line`. This method assumes the parent lines are going to be computed first and then cached in a dict. Leaving `parent_id`
Original PR description
The aim of this commit is to avoid having inconsistent data leading to a Traceback while loading the lines of the Profit and Loss report. Context: cbe74884b937f630cf1d2ccf475a04e70b6f4669 changed the structure hierachy. It wasn't a big issue until e96e8d4aa663a4a5305214f2124243070fa797bb resequenced the lines and changed the order of computation in `<account.report>._get_line`. This method assumes the parent lines are going to be computed first and then cached in a dict. Leaving `parent_id` made this assumption wrong leading to a KeyError exception throwing a traceback. Before the commit: The data kept the previous `parent_id` which could lead to a traceback due to inconsistent data. After the commit: `parent_id` not being set, the code doesn't try to get it from the cached lines and computes it correctly. task-id: None Forward-Port-Of: odoo/enterprise#78219
runbot-error-108304 Forward-Port-Of: odoo/enterprise#78094
Original PR description
runbot-error-108304 Forward-Port-Of: odoo/enterprise#78094
When trying to print invoice before reveiving etims details by the gouvernment, we get an error because we're trying to access some attributes of those fields, such as `strftime` or `len()` With this commit, we replace non set fields by empty strings either for display purpose or methods calls. opw-4480304 Forward-Port-Of: odoo/enterprise#78176
Original PR description
When trying to print invoice before reveiving etims details by the gouvernment, we get an error because we're trying to access some attributes of those fields, such as `strftime` or `len()` With this commit, we replace non set fields by empty strings either for display purpose or methods calls. opw-4480304 Forward-Port-Of: odoo/enterprise#78176
**Specifications:** - remove modal when user click on open desk and directly open kiosk view. - add an install button in menu-item in kanban card **After this PR:** Modal will be removed while opening kiosk mode in frontdesk Task-4161336 Forward-Port-Of: odoo/enterprise#71018
Original PR description
**Specifications:** - remove modal when user click on open desk and directly open kiosk view. - add an install button in menu-item in kanban card **After this PR:** Modal will be removed while opening kiosk mode in frontdesk Task-4161336 Forward-Port-Of: odoo/enterprise#71018
Envia is a delivery aggregator for North and South America that supports a large subset of carriers in the area. It integrates with the main carriers used in: Argentina, Australia, Brazil, Canada, Chile, Colombia, Spain, Guatemala, India, Mexico, Peru, United States, and Uruguay task-4056309 odoo PR: https://github.com/odoo/odoo/pull/174098 Forward-Port-Of: odoo/enterprise#67131
Original PR description
Envia is a delivery aggregator for North and South America that supports a large subset of carriers in the area. It integrates with the main carriers used in: Argentina, Australia, Brazil, Canada, Chile, Colombia, Spain, Guatemala, India, Mexico, Peru, United States, and Uruguay task-4056309 odoo PR: https://github.com/odoo/odoo/pull/174098 Forward-Port-Of: odoo/enterprise#67131
The issue was that payment lines with `is_change` were also being considered in the computation. Exemple: Product: 14.50 Payment: 20.00 Change: 5.50 Forward-Port-Of: odoo/enterprise#76476
Original PR description
The issue was that payment lines with `is_change` were also being considered in the computation.
Exemple:
Product: 14.50
Payment: 20.00
Change: 5.50
Forward-Port-Of: odoo/enterprise#76476When the user tries to forward a Google Maps location in a message, a traceback will appear. Steps to reproduce the error: - Go to WhatsApp > Templates > Create a new template A > Header Type: Location - Set a Body message > In Variables, Set the sample values for all the variables - Create a new Contact with a Mobile number > Send a Whatsapp message with template A - User will receive a message with a link of location > Forward that message back to that number Traceback: ``` File "
Original PR description
When the user tries to forward a Google Maps location in a message, a traceback will appear. Steps to reproduce the error: - Go to WhatsApp > Templates > Create a new template A > Header Type:…
When the user tries to forward a Google Maps location in a message,
a traceback will appear.
Steps to reproduce the error:
- Go to WhatsApp > Templates > Create a new template A > Header Type: Location
- Set a Body message > In Variables, Set the sample values for all the variables
- Create a new Contact with a Mobile number > Send a Whatsapp message with template A
- User will receive a message with a link of location > Forward that message back to that number
Traceback:
```
File "/home/odoo/odoo/enterprise/whatsapp/controller/main.py", line 42, in webhookpost
wa_account_id._process_messages(value)
File "/home/odoo/odoo/enterprise/whatsapp/models/whatsapp_account.py", line 225, in _process_messages
body += Markup("<br/>{location_address}").format(location_name=messages['location']['address'])
File "/home/odoo/.local/lib/python3.10/site-packages/markupsafe/__init__.py", line 213, in format
return self.__class__(formatter.vformat(self, args, kwargs))
File "/usr/lib/python3.10/string.py", line 165, in vformat
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
File "/usr/lib/python3.10/string.py", line 205, in _vformat
obj, arg_used = self.get_field(field_name, args, kwargs)
File "/usr/lib/python3.10/string.py", line 270, in get_field
obj = self.get_value(first, args, kwargs)
File "/usr/lib/python3.10/string.py", line 227, in get_value
return kwargs[key]
File "/home/odoo/.local/lib/python3.10/site-packages/markupsafe/__init__.py", line 249, in __getitem__
return self._kwargs[key]
KeyError: 'location_address'
```
https://github.com/odoo/enterprise/blob/2b4acb4c82a7374d45f25a7d8eebdc53b7f6e140/whatsapp/models/whatsapp_account.py#L225
Here, ``location_name`` is used instead of ``location_address``,
So, It will lead to the above traceback.
sentry-6206183097
Forward-Port-Of: odoo/enterprise#76883At the moment, when grouping by a selection field, the in-database name of the selection option is shown rather than the human-readable name. This is fixed by the present commit. task-none Forward-Port-Of: odoo/enterprise#78153 Forward-Port-Of: odoo/enterprise#78128
Original PR description
At the moment, when grouping by a selection field, the in-database name of the selection option is shown rather than the human-readable name. This is fixed by the present commit. task-none Forward-Port-Of: odoo/enterprise#78153 Forward-Port-Of: odoo/enterprise#78128