Monday, May 30, 2022
39 changes · master
Enhancements to existing features
This update simplifies the styling behind the Expenses app as part of a broader interface cleanup. It should make expense-related screens easier to maintain while preserving the existing user experience.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984. task-2859751 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prepares Odoo's mail and discussion features to load key messaging screens more reliably during startup. It wraps important interface elements so they wait for the messaging system to be ready, reducing transition risks as the discuss app architecture evolves.
Original PR description
Top level components should always be wrapped in containers since they have to receive a record comming from messaging. To do that, we need to wait for messaging to be initialized. In the PR introducing the new environment in the discuss app, some of those components will be passed to the main_component registry, messaging won't be ready yet. In order to ease the transition, the last components missing a wrapper have been wrapped. task-2582313
The mail call viewer now hides its on-screen overlay when the user moves the mouse away. This reduces visual clutter during calls and makes the calling experience feel cleaner and less distracting.
Original PR description
part of task-2692836
Odoo now makes deprecation warnings more reliable during automated test retries and reports each place where outdated internal methods are still being used. This helps development teams identify and clean up risky legacy code earlier, reducing future maintenance issues.
Original PR description
First, make warnings be emitted when retrying a test. Second, warn every call site of a deprecated method.
Updates Odoo's messaging-related apps to use a newer shared web environment instead of the older legacy setup. This is an internal modernization that should improve maintainability and consistency across communication features without changing day-to-day user workflows.
Original PR description
enterprise: https://github.com/odoo/enterprise/pull/26493
This update renames several internal mail call interface components to use clearer business-oriented terms. The change helps make the codebase easier to understand and maintain, without introducing expected changes to the user experience.
Original PR description
- rename 'RtcController' to 'CallActionListView' - rename 'RtcOptionList' to 'CallOptionMenu' - rename 'RtcInvitationCard' to 'CallInviteRequestPopup' - rename 'RtcInvitations' to 'CallInviteRequestPopupList' - rename 'RtcVideo' to 'CallParticipantVideo' Task-2867786
This update moves several Enterprise apps and their tests onto Odoo's newer internal web environment. It helps keep core business apps maintainable and aligned with the current platform architecture, with little direct change expected for end users.
Original PR description
community: https://github.com/odoo/odoo/pull/83774
Resolved issues and error corrections
Internal notes created when a customer views a quotation in the portal are now translated using the salesperson's or company's language instead of the customer's website or browser language. This keeps sales activity logs consistent and easier for internal teams to understand.
Original PR description
The note "Quotation viewed by customer" posted when a public user accesses an order on the portal (with a token) was translated in the "automatic" language, i.e. the website or user (or browser language). This doesn't make much sense since log notes are not meant to be shown to the user, only to the internal user(s) (/salesman). This commit makes sure that the message is not translated in the website/customer lang, but in the salesman or company language instead. Task - 2836421 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
The activity menu test has been relocated into the test mail area so it can use a more suitable real test model. This is an internal cleanup that prepares future testing changes without affecting end users.
Original PR description
In preparation for the adaptation of its test adaptation, the `systray_activity_menu_test` is moved to test_mail. Indeed, with this adaptation, all fake models will be replaced by real ones, the `MailTestActivity` model is the perfect candidate for this.. task-2792108
Miscellaneous changes
Description of the issue/feature this PR addresses: - `name` field not present in `gamification.goal` model which causes error while rendering mail template such that object `gamification.goal` has no attribute `name` opw-2844136 Current behavior before PR: - While selecting the Language in preview, it renders the mail template and causes validation error such that field 'name' not present in `gamification.goal` Desired behavior after PR is merged: - It renders the mail templ
Original PR description
Description of the issue/feature this PR addresses: - `name` field not present in `gamification.goal` model which causes error while rendering mail template such that object `gamification.goal` has no attribute `name` opw-2844136 Current behavior before PR: - While selecting the Language in preview, it renders the mail template and causes validation error such that field 'name' not present in `gamification.goal` Desired behavior after PR is merged: - It renders the mail template properly -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#91439
This fixes a crash that happened when users changed the checkbox for a suggested email recipient in the mail composer. The change keeps the recipient selection flow working smoothly, avoiding interruptions when composing messages.
Original PR description
Follow-up of #91671 (Task-2817547) Changes above fixed an issue with composer suggested recipient feature not properly prompting a dialog to create new partners. The fix was correct before #90678 (Task-2831082/Task-2849934), but it needs to be slightly adapted for this small technical changes. By omiting them, any change of checkbox state results in a crash. This commit properly adapt code in `_onChangeCheckbox` to take into account both changes.
Fixes an issue where re-enabling the blog page top banner could cause an error after a user had added content at the top of the page. The banner is now added without removing or replacing existing page blocks, preserving user edits and improving reliability.
Original PR description
Before this commit an error appeared if a block had been set at the top of the /blog page and the user wanted to re-enable the "top banner - Name / Latest Post" option. This commit solves the problem and improves the behavior by not trying to replace the block that the user had set at the top of the page. The option adds a top banner but does not remove the blocks present. Steps to reproduce the fixed bug: 1. go on /blog page 2. disable the customize option "Top banner - Name / Latest Post" 3. go in edit mode 4. drop a snippet in this new oe_structure 5. save the page 6. enable the customize option "Top banner - Name / Latest Post" =>traceback task-2774944 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes duplicate product records in the Sales demo data. It helps keep sample data cleaner and avoids confusion when users evaluate or demonstrate sales workflows.
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A small internal test update keeps the marketing automation test suite compatible with a newer underlying system method. This helps maintain reliable quality checks without changing the product experience for users.
The export dialog’s visual styling has been cleaned up to make the interface easier to maintain. This is an internal refactor with minimal expected impact for users, while helping future updates be delivered more consistently.
Original PR description
This commit simplifies the SCSS of the export dialog. task-2816763 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update simplifies the styling behind the mobile messaging navigation bar as part of Odoo's broader interface restyling work. It should make the mobile messaging area easier to maintain while preserving the user experience.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2837311 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The mail app’s video call configuration menu styling was simplified as part of a broader interface cleanup. This keeps the underlying design easier to maintain and improves compatibility for users on Safari-based browsers.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2853292 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Mail emoji picker styling was simplified as part of a broader interface cleanup. Emoji spacing was adjusted to make selecting emojis easier, improving usability with minimal functional impact.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984 This commit also uses padding instead of margin to select emojis more easily. task-2856230 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update simplifies the styling of discussion previews in Odoo's Mail app as part of a broader interface cleanup. It should help keep the messaging interface consistent and easier to maintain, with little to no change in daily workflows.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2843449 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Mail welcome screen styling was reviewed and simplified as part of a broader Odoo 16 visual optimization effort. This helps keep the interface easier to maintain while preserving the user experience.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2852562 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update simplifies the styling and tidies the structure of the mail call layout menu. It supports ongoing interface cleanup work, making the code easier to maintain without changing business workflows.
Original PR description
Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2855553 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Discuss area styling was simplified by replacing custom style rules with standard shared layout classes. This reduces maintenance overhead and may slightly improve page performance without changing how users work with Discuss.
Original PR description
Current SCSS is replaced with global Bootstrap classes, in order to reduce code lines and to increase performance. Task-2821258 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update replaces a custom layout helper in the Mail app with a standard Bootstrap styling class. It keeps the messaging interface behavior consistent while reducing custom code that must be maintained over time.
Original PR description
This commit deletes the class `o-autogrow` and replaces each instance of it with a global Bootstrap class. Task-2833725 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Timeoff is apply in the view to take effect on every view type instead of only the calendar. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#91452 Forward-Port-Of: odoo/odoo#91095
Original PR description
Timeoff is apply in the view to take effect on every view type instead of only the calendar. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#91452 Forward-Port-Of: odoo/odoo#91095
The only mail.channel rule was that a user only had access to channels they're members of, or can subscribe to (public, or group based). This rule applied to admins as well, forcing them to switch to super-admin mode in order to manage mail channels. This is undesirable on lots of axis: - superadmin mode is a bit of a last-ditch feature, as a result it's somewhat hidden - there is a much higher risk of screwing up as superadmin mode basically lifts all the access rules, which can have
Original PR description
The only mail.channel rule was that a user only had access to channels they're members of, or can subscribe to (public, or group based). This rule applied to admins as well, forcing them to switch to super-admin mode in order to manage mail channels. This is undesirable on lots of axis: - superadmin mode is a bit of a last-ditch feature, as a result it's somewhat hidden - there is a much higher risk of screwing up as superadmin mode basically lifts all the access rules, which can have correctness implications - auditing completely breaks down when using superadmin mode, as the real identity of the user is lost Forward-Port-Of: odoo/odoo#91650
Since [1] synonyms entered on IAP had to be lower-case to be matched by the industry auto-complete. After this commit the client-side of the configurator makes sure labels and synonyms are matched without case sensitivity. Steps to reproduce: - Add an upper-case synonym on IAP - Create a new website - Search for added synonym => Industry associated with synonym did not show up. [1]: https://github.com/odoo/odoo/commit/5d5d5d75d52a2a9e0d12bdb6442e006327ba9b0c task-2835608 Des
Original PR description
Since [1] synonyms entered on IAP had to be lower-case to be matched by the industry auto-complete. After this commit the client-side of the configurator makes sure labels and synonyms are matched without case sensitivity. Steps to reproduce: - Add an upper-case synonym on IAP - Create a new website - Search for added synonym => Industry associated with synonym did not show up. [1]: https://github.com/odoo/odoo/commit/5d5d5d75d52a2a9e0d12bdb6442e006327ba9b0c task-2835608 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#89972
bcf665a291b8 introduced this deprecation warning without a `stacklevel` argument. Adding it makes the error highlighted precisely where the deprecated import occurred. Forward-Port-Of: odoo/odoo#92398
Original PR description
bcf665a291b8 introduced this deprecation warning without a `stacklevel` argument. Adding it makes the error highlighted precisely where the deprecated import occurred. Forward-Port-Of: odoo/odoo#92398
opw-2767903 Forward-Port-Of: odoo/odoo#92020 Forward-Port-Of: odoo/odoo#91627
Original PR description
opw-2767903 Forward-Port-Of: odoo/odoo#92020 Forward-Port-Of: odoo/odoo#91627
Ensure that the value of binary_field_real_user is a record before using it. Forward-Port-Of: odoo/odoo#92135
Original PR description
Ensure that the value of binary_field_real_user is a record before using it. Forward-Port-Of: odoo/odoo#92135
With this commit, we make sure that all lines are fully reconciled when reversing a move. Steps to reproduce: - Create a Journal Entry, with eg a line with 300$ debit/credit and two others lines to make the journal entry fully balanced | Account | Partner | Debit | Credit | |-------------|-------------|-----------|------------| | Account X | | 300.0 | 0.0 | | Account Y | partner A | 0.0 | 100.0 | | Account Y | partner B |
Original PR description
With this commit, we make sure that all lines are fully reconciled when reversing a move. Steps to reproduce: - Create a Journal Entry, with eg a line with 300$ debit/credit and two others lines to…
With this commit, we make sure that all lines are fully reconciled when reversing a move. Steps to reproduce: - Create a Journal Entry, with eg a line with 300$ debit/credit and two others lines to make the journal entry fully balanced | Account | Partner | Debit | Credit | |-------------|-------------|-----------|------------| | Account X | | 300.0 | 0.0 | | Account Y | partner A | 0.0 | 100.0 | | Account Y | partner B | 0.0 | 200.0 | - Then reverse the move -> Only one line is marked as fully reconciled, the other one is marked as partially reconciled. This is because each line was passed in the reconcile method with all the counterpart lines, even those which didn't belong to it. Therefore, all the firsts lines was marked as partially reconciled until the last one, which passed with the only counterpart line left. With this commit, we group the lines and counterpart lines by account, and reconcile them. This is a correction of this commit 6481eb720f36f3e81c2ec8371cccdd893a5e8ddf which introduced a bug in l10n_mx, when unreconciling moves with tax 0%, here are the steps to reproduce this bug: - With l10n_mx installed - Create an invoice with tax 0% - Confirm and register payment - Try to unreconcile the payment -> We get an UserError : "You are trying to reconcile some entries that are already reconciled" This happened because in the first fix, we didn't filtered the already reconciled moves. Also, it's reproductible in 15 but change is made here in order to keep consistency between versions. opw-2810392 opw-2851999 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#91804
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#92383
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#92383
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#92352
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#92352
closes odoo/odoo#91173 Signed-off-by: Julien Castiaux <juc@odoo.com> 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#92432
Original PR description
closes odoo/odoo#91173 Signed-off-by: Julien Castiaux <juc@odoo.com> 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#92432
Steps to reproduce: - Create 2 warehouse (WH1 and WH2) - Ensure warehouse order is WH1 then WH2 - Set warehouse WH2 on website - Go to portal as guest (in incognito window) - Add product to cart - As admin (in main window), open quotation in backend and ensure warehouse_id is set to WH2 - Go back to shop and confirm cart (in incognito window) - Fill partner address and click next - As admin (in main window), open quotation in backend Issue: Wrong warehou
Original PR description
Steps to reproduce: - Create 2 warehouse (WH1 and WH2) - Ensure warehouse order is WH1 then WH2 - Set warehouse WH2 on website - Go to portal as guest (in incognito window) - Add product to cart - As…
Steps to reproduce:
- Create 2 warehouse (WH1 and WH2)
- Ensure warehouse order is WH1 then WH2
- Set warehouse WH2 on website
- Go to portal as guest (in incognito window)
- Add product to cart
- As admin (in main window), open quotation in
backend and ensure warehouse_id is set to WH2
- Go back to shop and confirm cart (in incognito window)
- Fill partner address and click next
- As admin (in main window), open quotation in backend
Issue:
Wrong warehouse set on order (WH1).
Cause:
When updating partner, it trigger the compute
of user_id that trigger compute of warehouse_id.
Since compute method is in `sale_stock` module,
it does not take into account the website config and
user `_get_default_warehouse_id` method from current
user.
Therefore it don't use the same logic as creation of
sale order from website (by adding item in cart)
by using `_get_warehouse_available` method from
current website to set warehouse on order.
Note: When user logged, since partner already set, the
warehouse set is the right one since not recomputing.
Solution:
If order has a `website_id`, use `_get_warehouse_available`
to compute warehouse and fallback on `_get_default_warehouse_id`.
opw-2851944
Forward-Port-Of: odoo/odoo#92444
Forward-Port-Of: odoo/odoo#92130Step to reproduce: - Have a least 2 lang with portal lang set to langA - Log in as portal user - In portal change lang to langB - Go to portal sharing view Current behaviour: - Iframe does not get info from the request and use the user's lang Behaviour after PR: - If there is a lang set on the website (in url) we use this one instead. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#92042 Forward-Port-Of: odo
Original PR description
Step to reproduce: - Have a least 2 lang with portal lang set to langA - Log in as portal user - In portal change lang to langB - Go to portal sharing view Current behaviour: - Iframe does not get info from the request and use the user's lang Behaviour after PR: - If there is a lang set on the website (in url) we use this one instead. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#92042 Forward-Port-Of: odoo/odoo#91485
This bug has been introduced in https://github.com/odoo/enterprise/pull/24865 Wkhtmltopdf is quite old and doesn't properly support Bootstrap because of media queries. So, Bootstrap breakpoints can't be used. Steps to reproduce: - Install "Field Service" - Go to "Settings" and activate "Custom Worksheets" - Create a new task - Click on the Worksheet stat button and fill in the description => Not able to see the description because the element is away of the page. opw-2841621 Forw
Original PR description
This bug has been introduced in https://github.com/odoo/enterprise/pull/24865 Wkhtmltopdf is quite old and doesn't properly support Bootstrap because of media queries. So, Bootstrap breakpoints can't be used. Steps to reproduce: - Install "Field Service" - Go to "Settings" and activate "Custom Worksheets" - Create a new task - Click on the Worksheet stat button and fill in the description => Not able to see the description because the element is away of the page. opw-2841621 Forward-Port-Of: odoo/enterprise#27835 Forward-Port-Of: odoo/enterprise#27746
Steps: Financial reports -> belgian balance sheet (bilan) on line ASSET (ACTIF) or LIABILITY (PASSIF), check 'hide if zero' go to belgian balance sheet /!\ ACTIF or PASSIF are hidden This is because we hide a line if its balance is zero, based on the formula. In this specific case, the lines ACTIF or PASSIF have no formulas, as their total is calculated in one of their children. With this commit, we check for each line with 'hide if zero' checked, if all of their children are zero t
Original PR description
Steps: Financial reports -> belgian balance sheet (bilan) on line ASSET (ACTIF) or LIABILITY (PASSIF), check 'hide if zero' go to belgian balance sheet /!\ ACTIF or PASSIF are hidden This is because we hide a line if its balance is zero, based on the formula. In this specific case, the lines ACTIF or PASSIF have no formulas, as their total is calculated in one of their children. With this commit, we check for each line with 'hide if zero' checked, if all of their children are zero themselves, only in this case we hide the lines. opw-2797559 Forward-Port-Of: odoo/enterprise#27836 Forward-Port-Of: odoo/enterprise#26048
TaskID: 2862737 Forward-Port-Of: odoo/enterprise#27799
Original PR description
TaskID: 2862737 Forward-Port-Of: odoo/enterprise#27799
Here is the description of each commit: Commit 01: [[FIX] stock_barcode: scan USN in a picking](https://github.com/odoo/enterprise/pull/27159/commits/8a2d26ef17ba60346526b196231bac1263c6df3c) Scanning several serial numbers in a picking doesn't work. To reproduce the issue: 1. Create two tracked-by-usn products P01, P02 2. Update the quantities: - 1 x P01 with serial USN01 - 1 x P02 with serial USN02 3. Barcode > Operations > Delivery Orders, Create 4. Scan USN01 5. Scan
Original PR description
Here is the description of each commit: Commit 01: [[FIX] stock_barcode: scan USN in a picking](https://github.com/odoo/enterprise/pull/27159/commits/8a2d26ef17ba60346526b196231bac1263c6df3c)…
Here is the description of each commit:
Commit 01: [[FIX] stock_barcode: scan USN in a picking](https://github.com/odoo/enterprise/pull/27159/commits/8a2d26ef17ba60346526b196231bac1263c6df3c)
Scanning several serial numbers in a picking doesn't work.
To reproduce the issue:
1. Create two tracked-by-usn products P01, P02
2. Update the quantities:
- 1 x P01 with serial USN01
- 1 x P02 with serial USN02
3. Barcode > Operations > Delivery Orders, Create
4. Scan USN01
5. Scan USN02
Error: USN02 is added as a subline of P01. It should create a new line
for P02
When processing a barcode, if a line is already selected and if the line
product is a tracked one (which is the case at step 5), we add a filter
in case the barcode is a `stock.production.lot`: the product of the lot
must be the product of the selected line (i.e., P01). Therefore, when
looking for a lot USN02 related to product P01, it doesn't find
anything. That's the reason why USN02 is considered as an unknown lot
(and thus linked to the currently-selected line).
This mechanism (the adding of a filter on the product) is useless in
case of a serial number: each one is linked to a specific product.
Side notes: suppose the above use case but this time, P01 and P02 are
tracked by lots (L01 and L02). The user scans L01 (it adds P01 on the
screen) then scans L02: because two different products can have the same
lot name, we are not able to know if L02 is an unknown lot of P01 or if
L02 is the lot for P02. So, in such case, the user has to first scan the
product P02 before scanning L02.
OPW-2798144
Commit 02: [[FIX] stock_barcode: scan lots with same name](https://github.com/odoo/enterprise/pull/27159/commits/c1d45888e45d2c683b2dc7b8958b1106d4ce9dce)
Scanning several lots with the same name does not work if the picking
doesn't expect the related products.
To reproduce the issue:
1. Create two tracked-by-lot products:
- P01:
- Barcode: 0010000000009
- P02:
- Barcode: 0020000000008
2. Update the quantities:
- 1 x P01 with lot L01 (name: "SUPERLOT")
- 1 x P02 with lot L02 (name: "SUPERLOT")
3. Barcode > Operations > Delivery Orders, Create
4. Scan 0010000000009 (i.e., P01)
5. Scan SUPERLOT
6. Scan 0020000000008 (i.e., P02)
7. Scan SUPERLOT
Error: The quantity of P01 has been updated, it is now equal to 2 and
the quantity of P02 is still zero. This is incorrect. We should have 1 x
P01 and 1 x P02
The issue occurs at step 7, here is the explanations:
Because the selected line (line of P02, thanks to step 6) is tracked by
lot, we add a filter in case the barcode is a lot:
https://github.com/odoo/enterprise/blob/a680071e2da1c1198065e7ac706f77a773787f4f/stock_barcode/static/src/models/barcode_model.js#L1091-L1096
So, we expected that the product of the lot will be P02. Later on,
`getRecordByBarcode` is called to get the record related to the barcode.
In the for-loop, we find some `ids` for the model
`stock.production.lot`. This is actually the lot added at step 5 (L01).
We directly add this lot in the `result` and then check if the record
respects the filters (so we check if the product of L01 is P02). Because
the condition is not respected, and because `ids` does not contain any
other identifier, the for-loop is stopped, but `result` still contains
L01 -> this is the issue, it explains why the wrong quantity is updated.
Once the above issue is fixed, we need to fix two other issues
(otherwise the above use case still does not work):
- Because `result` is now empty, we try to find the missing record
thanks to `_getMissingRecord`. However, this method has already been
called at step 5 for the same barcode ("SUPERLOT"). As a result, the
barcode has been saved in `missCache`. Back to step 7, it will lead to:
https://github.com/odoo/enterprise/blob/5b29cf6d96bc26139c767188fb68f3fa56a1a537/stock_barcode/static/src/lazy_barcode_cache.js#L156-L158
i.e., we will consider that we have already looked for that barcode and
the we don't need to look for it again. We should not complete
`missCache` when the record is a lot
- Once `_getMissingRecord` is processed, we call again
`getRecordByBarcode` to recompute `result`:
https://github.com/odoo/enterprise/blob/5b29cf6d96bc26139c767188fb68f3fa56a1a537/stock_barcode/static/src/lazy_barcode_cache.js#L138-L139
However, because we don't provide the filters anymore, it will find and
return the lot L01. We should provide the filters.
Forward-Port-Of: odoo/enterprise#27751
Forward-Port-Of: odoo/enterprise#27159