Thursday, March 6, 2025
46 changes · saas-18.1
Resolved issues and error corrections
Receipts without order lines no longer display the misleading prompt to start adding products. This avoids confusion when settling customer accounts in Point of Sale, where receipts are view-only and cannot be edited.
Original PR description
When settling the user account from pos_settle_due, we show a receipt with no order (as expected), but with an empty state saying "Start adding products"! Now we don't show the empty state on a receipt, since the user cannot edit a receipt anyway. This bug has been reported while using the pos_settle_due module, however, the fix has been made generic and hence been implemented in the point_of_sale module. (Note, this same bug has been fixed in 17.0 with https://github.com/odoo/odoo/pull/197256, and it was fixed in 17.2 till 18.0 with https://github.com/odoo/odoo/pull/184646) opw-4430325
This fix prevents live chat sessions from accidentally reverting their message loading status after updates are received in real time. It helps avoid unnecessary message loading and keeps the chat experience more reliable for users and support teams.
Original PR description
When a live chat session is created, the "isLoaded" field of the thread comes from the server to avoid loading messages if it's not needed. However, sending this information on the bus can rollback the newest value after message fetch. This PR ensures this information is not sent through the bus. This issue was discovered in 18.2 as websockets are enabled during tours. 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
Mail discussion and chat compact display settings now update immediately across open browser tabs. This keeps the user experience consistent without needing to reload pages or manually adjust each tab.
Original PR description
Before this commit, some local settings were not properly synced in crosstab: - discuss sidebar compact mode was only visible on reloading the page. - chat hub compact mode was only affected the tab…
Before this commit, some local settings were not properly synced in crosstab: - discuss sidebar compact mode was only visible on reloading the page. - chat hub compact mode was only affected the tab that triggered the compact mode. The problem of discuss sidebar compact comes from lack of responsiveness from change in local storage value, which this commit fixes with `onStorage` in DiscussApp model. Note that settings model had already this implementation, but it made a typo: the `this` in `onStorage` could be the raw record instead of reactive record. This is fixed by registering the `onStorage` in the `static new`. For the ChatHub compact mode, usually triggering this mode is intended for reduced footprint of chat windows when navigating on the webclient, including opening new or existing tabs. This means the compact mode should be applied on all tabs at once. This commit fixes it by using a similar technique as discuss sidebar compact mode to sync its state immediately accros all tabs. 
This fixes a small issue in the Indian localization reports where extra information was being sent to a credit purchase message. The change helps avoid errors and keeps the process reliable without changing user-facing workflows.
Original PR description
The method _l10n_in_edi_get_iap_buy_credits_message does not have the company_id parameter. This commit removes the redundant argument to ensure correctness and prevent unnecessary parameter passing.
Miscellaneous changes
The test `test_account_group_account_secured` introduced in #197558 fails when the `group_account_secured` group is added by default to the users, as is the case in l10n_de. This fix modifies the test by checkign that the user groups didn't change after hashing moves from the only journal with 'Hash on Post', instead of checking that `group_account_secured` is not part of the user's groups. runbot-159826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/sub
Original PR description
The test `test_account_group_account_secured` introduced in #197558 fails when the `group_account_secured` group is added by default to the users, as is the case in l10n_de. This fix modifies the test by checkign that the user groups didn't change after hashing moves from the only journal with 'Hash on Post', instead of checking that `group_account_secured` is not part of the user's groups. runbot-159826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#200526
opw-4464701 Forward-Port-Of: odoo/odoo#199548
Original PR description
opw-4464701 Forward-Port-Of: odoo/odoo#199548
### Issue: MO with a tracked finished product are actually splited at validation. However, the qties of the MO are usually set by default to fulfill the maximal demand. As such, component registrations performed form the shopfloor might be completely override by the MO split. ### Steps to reproduce: - Create 2 storable products tracked by SN: FP and COMP - Create a BOM for you final product FP: - 1 x COMP - 1 operation with an instruction of type "Register Consumed Materials
Original PR description
### Issue: MO with a tracked finished product are actually splited at validation. However, the qties of the MO are usually set by default to fulfill the maximal demand. As such, component…
### Issue:
MO with a tracked finished product are actually splited at validation. However, the qties of the MO are usually set by default to fulfill the maximal demand. As such, component registrations performed form the shopfloor might be completely override by the MO split.
### Steps to reproduce:
- Create 2 storable products tracked by SN: FP and COMP
- Create a BOM for you final product FP:
- 1 x COMP
- 1 operation with an instruction of type "Register Consumed Materials" for COMP
- Put 2 serial numbers in WH/Stock for COMP: SN01, SN02
- Create and confirm an MO for 2 units of FP using that BOM
> SN01 and SN02 should be reserved on the move raw
- Go to the shopfloor to the MO
- Click on Register component SN02 > Validate
- Click on the [+] button of the register Production
- Mark the MO as Done > Close Production
> You trigger a consumption warning dialog telling you that you registered more consumed quantity than expected (2 instead of 1) This dialog should not appear in the first place as you registered only 1 unit but suppose it is ok and continue
- Click on "Set quantities and validate"
- Go back to your MO in the back end
#### > It was closed using SN01 rather than the SN you registered.
### Cause of the issue:
Confirming the MO confirmed the move raw and a reservation was made for 2 units as the MO is not splitted yet. However, since the final product is tracked this MO will end up splitted. When you register consumption, the serial number of one of the move line related to the raw move will be updated and the line will be picked:
https://github.com/odoo/enterprise/blob/d4ff42fbcfa3dd297c6cb838b5b03955f12f02a4/mrp_workorder/models/quality.py#L519-L525 However, since at least one of the move line of the move raw is picked the move its self will become picked:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/stock/models/stock_move.py#L208-L212 This is problematic as picked picked move by pass the set_qty_producing so from now if you were to adapt the qty producing of the MO you would not affect the quantity of the raw move (which is currently at 2: one unpicked move line with SN01 and one picked with SN02): https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1218-L1228 Finally, when you click on the Close production, a `_split_productions` process will be started and adpat the demand of the move raw to 1: https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1831-L1832 Since the quantity set on the move exceeds this new demand the consumption warning. Note that at this point the backorders of the initial MO were already created and confirm without you dialog to be resolved so that the reservations of these splitted MO could not reserve the SN01 that is still used by your move. Finally, when you "Set quantities and validate" it will adpat the quantity and unreserve the picked move line as this decrease process does not prioritise to unlink unpicked move lines first:
### Fix:
Since registration process through shopfloor and barcode are expected to create picked move lines which will adpat the picked state of the move and since picking the move will automatically pick all the move line, a move line that is not picked in a picked move is a move line that is not expected to be kept. We therefore unlik these move_lines before adapting the demand of the move_raws in the split production.
### Note:
We also tried 2 other fixes of the issue but aborted these other ideas:
1) try to keep only picked move line at the Validation of the registration component process but this change of behavior was aborted since if instead of clicking on validate you click on "Continue consumption and then on the top right cross button", you would technically have registered only the first SN but you would fall in the situation as above and trigger the same issue.
2) Adapt the condition of that makes a move raw by pass the _set_qty_producing:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1219-L1221 Since the move is picked for the wrong reason we would instead use: `all(ml.pikced for ml in move.move_line_ids)`
However, this would also require to change the process decrease to unreserve picked move last here:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/stock/models/stock_move.py#L361-L365 Changing the loop to
`reversed(move.move_line_ids.sorted(lambda ml: (not ml.picked, ml.id))` And this would not solve the issue starting post 17.0 since we would still bypass the set_qty producing on the next lines:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1223-L1225
Enterprise: https://github.com/odoo/enterprise/pull/79591
opw-4558900
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#198599
Forward-Port-Of: odoo/odoo#198175### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation. ### Cause of the issues: The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15 However, d
Original PR description
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC…
### Issues:
Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation.
### Cause of the issues:
The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
However, depending on where you click in the barcode app, the moves might end up being assigned and hence skip the "_action_confirm" of the picking (which is computed to be assigned) prior to the `_pre_action_done_hook` of the `button_validate` of the picking wich is suppose to return already created quality check:
https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_picking.py#L1145-L1147
In which case, the quality check is not triggered (Issue 1). Furthermore, since the `_action_confirm` of moves can also be applied to extra moves created to update the demand and to be merged to the initial move during the validation, the quality check creation might be called twice on a move once during its own `action_confirm` and once during the `_action_confirm` of its extra move (Issue2).
### Issue 1:
1. Create a storable product P with a barcode: XXX
2. Go to Quality > Quality Control > Quality Points > New
3. Create a new quality point for your product:
- Control per: "Operation"
- Operations: "Receipts"
4. Go to the barcode app > Operations > Receipts > New
5. Scan your product
6. Click on the pencil (key step)
7. Either edit the quantity from the digipad and confirm or go back to the picking and edit it from there.
8. Validate the receipt
#### > Even thought a quality check was created using your quality point for your receipt, it was not triggered before validation.
### Cause of the Issue:
Clicking on the pencil will trigger a call of the `save_barcode_data` which will in turn create a stock move line related to the picking during the write performed on the picking:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/controllers/stock_barcode.py#L68-L74
After this edition of the quantity of the picking will write on the `qty_done` dummy field of that move line which will in turn trigger a call of its inverse method and modify its quantity: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/models/stock_move_line.py#L58-L61
Changing the quantity of the ml will then update the state of the move to "assigned" because of these lines:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L487-L488 https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L530-L531 https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_move.py#L2022-L2023 In turns, the state compute method of the picking will determine that the picking is assigned and the picking will not be confirmed during its `button_validate` prior to the `_pre_action_done_hook` of the `button_validate` as it is not in draft anymore.
### Fix:
The state of the move should stay as draft just as if we didn't created the move line through the pencil if we were to edit the qty_done via the barcode app.
### Note:
The inverse method of the "qty_done" computed field was introduced in 17.0+ by commit: 4f19668c51a90e8c12e57b6353bbe5194f83ca10 during the quantity refactoring so that the issue is not reproducible prior to that version.
### Issue 2:
Same steps 1 -> 5.
6'. click on the +1 button.
7'. Validate > this opens the quality check
8'. Pass the quality check > Validate again
9'. Go to Quality > Quality Control > Quality check
#### > Two quality checks were created isntead of one for your receipt
### Cause of the issue:
At some later point in the button validate of the picking, an `_action_done` is called to put the pickings and its move in done state: https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_picking.py#L1157
However, during the `_action_done` of the moves if the quantity of the move exceeds its `product_uom_qty`, extra moves will be created, confirmed and merged back to the move in order to update its `product_uom_qty`:
https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1885-L1890 https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1823-L1832 However, the action confirm of this extra move will trigger the same override of the `_action_confirm` that creates a quality check and it will even be called on the original move that was already confirmed and already created its QC since the extra move was merged into it: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
As a result we end up with an extra quality check creation.
### Fix:
We avoid quality check creation during extra move confirmation.
Enterprise: https://github.com/odoo/enterprise/pull/76301
opw-4266053
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#199233
Forward-Port-Of: odoo/odoo#192034### Before Codabox used to require a fiduciary VAT and the VAT of a company (managed by the fiduciary) in order to connect to their services. - Access to Codabox was limited to companies with an accounting firm with a VAT number assigned ### Now Codabox gives the opportunity for companies to directly connect (without being a fiduciary/ being managed by one). This is through the same port as before, just receiving two identical VAT numbers. - Module summary, descriptions and ot
Original PR description
### Before Codabox used to require a fiduciary VAT and the VAT of a company (managed by the fiduciary) in order to connect to their services. - Access to Codabox was limited to companies with an accounting firm with a VAT number assigned ### Now Codabox gives the opportunity for companies to directly connect (without being a fiduciary/ being managed by one). This is through the same port as before, just receiving two identical VAT numbers. - Module summary, descriptions and other texts are updated to generalize - Companies without an accounting firm can access the Codabox configuration settings task - 4460499 Forward-Port-Of: odoo/odoo#198622
When sending combo products that contains different products with different pos categories, the receipt was not showing the products grouped by combo. Steps to reproduce: ------------------- * Create a combo product with different products with different pos categories * Setup a preparation printer that will print all categories * Open PoS and add at least 2 combo products with different selection * Send the order to the kitchen > Observation: The product on the receipt are grouped by p
Original PR description
When sending combo products that contains different products with different pos categories, the receipt was not showing the products grouped by combo. Steps to reproduce: ------------------- * Create a combo product with different products with different pos categories * Setup a preparation printer that will print all categories * Open PoS and add at least 2 combo products with different selection * Send the order to the kitchen > Observation: The product on the receipt are grouped by product category instead of being grouped by combo. Why the fix: ------------ Instead of sorting all product based on their category, we filter out the combo products first and sort the other products based on their category. opw-4459211 Forward-Port-Of: odoo/odoo#196628
Versions -------- - 18.0+ Steps ----- 1. Have an unpaid invoice; 2. create a payment using the "Pay" button; 3. go the the payment; 4. duplicate payment. Issue ----- Duplicate payment is linked to the same invoice, with no way to change this. Cause ----- The `invoice_ids` field was added to `account.payment` in commit 01b87f1230bea. Before it, it relied on the reconciliation mechanism to link payments to invoices. Solution -------- Add `copy=false` to the field declarati
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Have an unpaid invoice; 2. create a payment using the "Pay" button; 3. go the the payment; 4. duplicate payment. Issue ----- Duplicate payment is linked to the same invoice, with no way to change this. Cause ----- The `invoice_ids` field was added to `account.payment` in commit 01b87f1230bea. Before it, it relied on the reconciliation mechanism to link payments to invoices. Solution -------- Add `copy=false` to the field declaration, to prevent it from getting duplicated, and let other flows handle linking it to the desired invoice. opw-4555499 Forward-Port-Of: odoo/odoo#197988
…wizards - In the wizard of exporting data there are fields that may be not in our data base with attribute _table_query not set to none. -I have modified the export.py file to make the field of id in our fild dict only if the _table_query is set to None. task-4592514 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
Original PR description
…wizards - In the wizard of exporting data there are fields that may be not in our data base with attribute _table_query not set to none. -I have modified the export.py file to make the field of id in our fild dict only if the _table_query is set to None. task-4592514 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#199102
Steps: - Create and confirm an invoice with 3 lines for the same product P: 1 - 10 quantity, 10$ 2 - 5 quantity, 5$ 3 - 20 quantity, 2$ - Go to invoice analysis, pivot view - Filter to see only product P - Measure Untaxed Amount, Product Quantity and Average Price -> The average price is 5.67 instead of 4.71 This is because the SQL query calculates the average of each line before calculating the average of the 3 lines instead of calculating the global average. With this commit,
Original PR description
Steps:
- Create and confirm an invoice with 3 lines for the same product P:
1 - 10 quantity, 10$
2 - 5 quantity, 5$
3 - 20 quantity, 2$
- Go to invoice analysis, pivot view
- Filter to see only product P
- Measure Untaxed Amount, Product Quantity and Average Price
-> The average price is 5.67 instead of 4.71
This is because the SQL query calculates the average of each line before
calculating the average of the 3 lines instead of calculating the global
average.
With this commit, we override the `read_group` method to make the
correct calcultaion of the average price.
opw-4503562
Forward-Port-Of: odoo/odoo#196975### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create and confirm an MO for one unit of FP. - Go to the shopfoor app > open the instruction of your operation - Type a non-existing serial number in the search bar > Create "new_sn" > This opens a form view of the stock.lot model - Save and close the new stock.lot > Invalid operation: You
Original PR description
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create…
### Steps to reproduce:
- Create a storable product FP tracked by SN with a BOM:
- 1 Operation: - instruction: Register Production type (per product)
- 1 x Comp (storable product in stock)
- Create and confirm an MO for one unit of FP.
- Go to the shopfoor app > open the instruction of your operation
- Type a non-existing serial number in the search bar > Create "new_sn"
> This opens a form view of the stock.lot model
- Save and close the new stock.lot
> Invalid operation: You are not allowed to create or edit a lot or serial number for the components with the operation type
> "Manufacturing". To change this, go on the operation type and tick the box "Create New Lots/Serial Numbers for
> Components"
#### Expected behavior:
The invalid operation should not be raised as the "required" option concerns only componenets and not final products.
### Cause of the issue:
Creating a stock lot will first launch a call of the `_check_create`: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/stock/models/stock_lot.py#L150-L153 However, since this check does not verifies that the product for which we create the lot is indeed related to a component of the MO it will raise the invalid operation even for final products: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/mrp/models/stock_lot.py#L11-L17
### Issue 2:
Currently, the `quickCreate` ("Create *sn_name*") option of the lot field of te "register production" dialog calls a `name_create` that will set an error message in the logs as the product_id required field can not be provided neither in the vals or the context of the `name_create`. You then fall back on the same form dialog than the "Create and edit". The `quickCreate` option should therefore just be disabled.
Enterprise: https://github.com/odoo/enterprise/pull/77265
opw-4452747
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#197372
Forward-Port-Of: odoo/odoo#193965*: web_editor Before this commit, there was two cases where we forced the backend to reload using a website domain: 1. When trying to enter the website app, and reaching the default website's preview. Ensuring edition of that website is made while being on the right website domain. 2. When switching website using the website switcher (multi-websites case). This commit removes the redirection in the first case. It might lead to unexpected behavior in some specific/advanced cases, but
Original PR description
*: web_editor Before this commit, there was two cases where we forced the backend to reload using a website domain: 1. When trying to enter the website app, and reaching the default website's…
*: web_editor Before this commit, there was two cases where we forced the backend to reload using a website domain: 1. When trying to enter the website app, and reaching the default website's preview. Ensuring edition of that website is made while being on the right website domain. 2. When switching website using the website switcher (multi-websites case). This commit removes the redirection in the first case. It might lead to unexpected behavior in some specific/advanced cases, but it was decided it was worth the risk, to improve the QoL of users reaching their backend by explicitly typing their `<database>`.odoo.com URL. Even though this is not supposed the case anymore as soon as their website is properly configured. At the same time, this commit strengthens (hopefully) link edition. In the past, we suggested users to automatically strip the domain part of the URL they added in their website if it matches the current domain used while being in edit mode. Now we still do that and two more checks: - If the added URL is using `<dbname>`.odoo.com, suggest to strip the domain too. It might not be right, but it's a good guess. And the user can still opt-out. - If the added URL uses the website domain, suggest to strip the domain. Related to task-4069779 Forward-Port-Of: odoo/odoo#200227
Steps to reproduce the bug: - Create a cash or bank account journal - Archive it (you will have an error, because it is associated with a payment method) - Delete it (it will be deleted normally) Problem: The problem is because of added constraint on the archival of account journal, that wasn't added to the deletion as well. The constraint on the archival was too strict after discussion with accounting team, it should be reverted and a new constraint will be added from the pos side. Now,
Original PR description
Steps to reproduce the bug: - Create a cash or bank account journal - Archive it (you will have an error, because it is associated with a payment method) - Delete it (it will be deleted normally)…
Steps to reproduce the bug: - Create a cash or bank account journal - Archive it (you will have an error, because it is associated with a payment method) - Delete it (it will be deleted normally) Problem: The problem is because of added constraint on the archival of account journal, that wasn't added to the deletion as well. The constraint on the archival was too strict after discussion with accounting team, it should be reverted and a new constraint will be added from the pos side. Now, the journal can't be archived nor deleted if it has at least one payment with payment method for that journal in an active session, because the journal items are written when the session is closed only. So, if the journal is archived with some active payments before closing the session, the journal entries are lost because it fails to write them in archived journal. The constraint is added to both archival and deletion to prevent the possibility of deletion while we can't archive. Testing: A performance testing was held on the new constraint, and based on the profiling the execution time was 0.00 seconds, and the pos.payments test passed successfully. Commits that added the constraint: d430231 5722d52 Tickets that required that constraint: opw-4070620 ------------------------------------------- opw-4554961 opw-4438601 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#200156 Forward-Port-Of: odoo/odoo#199009
Versions -------- - 18.0+ Issue ----- The `website_sale_contact_us_button` tour fails randomly on Runbot. Cause ----- 50 ms check delay is inadequate. Solution -------- Set check delay to 500 ms. runbot-145471 runbot-145473 Forward-Port-Of: odoo/odoo#199966
Original PR description
Versions -------- - 18.0+ Issue ----- The `website_sale_contact_us_button` tour fails randomly on Runbot. Cause ----- 50 ms check delay is inadequate. Solution -------- Set check delay to 500 ms. runbot-145471 runbot-145473 Forward-Port-Of: odoo/odoo#199966
Steps to reproduce: - Create a Vendor Bill with 10% ND tax - Post - In 'Edi Documents' tab download e-invoice Issue: `CuotaIVADeducible` element show the full tax amount, even if the tax has been set to non deductible opw-4582712 Forward-Port-Of: odoo/odoo#200251 Forward-Port-Of: odoo/odoo#200157
Original PR description
Steps to reproduce: - Create a Vendor Bill with 10% ND tax - Post - In 'Edi Documents' tab download e-invoice Issue: `CuotaIVADeducible` element show the full tax amount, even if the tax has been set to non deductible opw-4582712 Forward-Port-Of: odoo/odoo#200251 Forward-Port-Of: odoo/odoo#200157
Behaviour Before the Commit: When an invoice pdf has more than 1 page and legal notes(multiline notes) section is the first thing on next page, wkhtmltopdf fails to handle page-break for legal notes text. First line of legal notes overwrites on the total amount section resulting in overflow of contents. It works fine if legal notes are not the first thing on page. Behaviour After the Commit: Legal notes(multiline notes) text does not overwrite on total payment summary anymore. Fix:
Original PR description
Behaviour Before the Commit: When an invoice pdf has more than 1 page and legal notes(multiline notes) section is the first thing on next page, wkhtmltopdf fails to handle page-break for legal notes…
Behaviour Before the Commit: When an invoice pdf has more than 1 page and legal notes(multiline notes) section is the first thing on next page, wkhtmltopdf fails to handle page-break for legal notes text. First line of legal notes overwrites on the total amount section resulting in overflow of contents. It works fine if legal notes are not the first thing on page. Behaviour After the Commit: Legal notes(multiline notes) text does not overwrite on total payment summary anymore. Fix: Add 'overflow-auto' class to div with id='payment-term' and has clearfix class to ensure it handles overflow. Steps to reproduce: 1. Create a multiline legal notes for any tax. 2. Open Customer-Invoices, create an invoice by adding multiple products with the tax which has multiline legal notes. 3. Make sure to add specific number of products/sections so that invoice expands to 2 pages. 4. Legal notes section must be the first thing on second page, otherwise it will not overwrite text. Feel free to look at the ticket number 4416845 for detailed understanding of the bug. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193399
When trying to sign in (for a new user) after making a purchase (existing token), we can choose a password of less than the minimum length allowed in the configuration. The _check_password_policy method prevents the save of the password to the user but arrives too late in the flow as the initiation of the user creation is half done leading to an Invalid token issue at the next attempt (no partner found for the existing token with _signup_retrieve_partner). By adding the minlength attribute in
Original PR description
When trying to sign in (for a new user) after making a purchase (existing token), we can choose a password of less than the minimum length allowed in the configuration. The _check_password_policy method prevents the save of the password to the user but arrives too late in the flow as the initiation of the user creation is half done leading to an Invalid token issue at the next attempt (no partner found for the existing token with _signup_retrieve_partner). By adding the minlength attribute in the form of the sign up, we force the respect of the password policy minimum length in the front end and minimize the risk to encounter the issue. previous PR unmerged: https://github.com/odoo/odoo/pull/186622 opw-4514350 Forward-Port-Of: odoo/odoo#199549
Until 18.0 [1], test classes should not inherit from other test classes which themselves contain tests. When this happens, the tests of the parent class are run for every class that inherits from it. We fix occurrences of this for social marketing apps. A naive detection script is available on the pad of the related task. [1]: 6dc96811c24ec4c97b8fbd2489aef6d4f061ac03 task-3792478 Forward-Port-Of: odoo/odoo#200132 Forward-Port-Of: odoo/odoo#198993
Original PR description
Until 18.0 [1], test classes should not inherit from other test classes which themselves contain tests. When this happens, the tests of the parent class are run for every class that inherits from it. We fix occurrences of this for social marketing apps. A naive detection script is available on the pad of the related task. [1]: 6dc96811c24ec4c97b8fbd2489aef6d4f061ac03 task-3792478 Forward-Port-Of: odoo/odoo#200132 Forward-Port-Of: odoo/odoo#198993
Improve deletion performance for `project.task` with numerous `account.analytic.line` records by adding a missing index on the `parent_task_id` foreign key, which Postgres checks during the `DELETE` operation. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#200354
Original PR description
Improve deletion performance for `project.task` with numerous `account.analytic.line` records by adding a missing index on the `parent_task_id` foreign key, which Postgres checks during the `DELETE` operation. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#200354
Before this fix, the list widget's extractProps function was never called due to an incorrect method reference in the web module. This caused issues when rendering dynamic props or customizing the list view behavior. After the fix: - The extractProps function is properly invoked. - The list widget can now retrieve props values as expected. Closes #200296 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged:
Original PR description
Before this fix, the list widget's extractProps function was never called due to an incorrect method reference in the web module. This caused issues when rendering dynamic props or customizing the list view behavior. After the fix: - The extractProps function is properly invoked. - The list widget can now retrieve props values as expected. Closes #200296 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#200350
Currently one can still edit section / note lines on posted moves (but not save the move). This commit makes the section / notes lines readonly when they should be. task: none Forward-Port-Of: odoo/odoo#200155
Original PR description
Currently one can still edit section / note lines on posted moves (but not save the move). This commit makes the section / notes lines readonly when they should be. task: none Forward-Port-Of: odoo/odoo#200155
When handling errors on runbot, it can be difficult to know where a message comes from. It can be problematic to identify automatically the source of an error. This branch give the possibility to add metadata to log_db. The current only metadata is the canonical tag. Some other information, like the stack, or the subtest could be added in the future. This is not the case for now to make the review easier. ```patch def get_log_metadata(self): + stack = traceback.format_
Original PR description
When handling errors on runbot, it can be difficult to know where a message comes from. It can be problematic to identify automatically the source of an error.
This branch give the possibility to add metadata to log_db.
The current only metadata is the canonical tag.
Some other information, like the stack, or the subtest could be added in the future. This is not the case for now to make the review easier.
```patch
def get_log_metadata(self):
+ stack = traceback.format_stack()
+ start = next((index for index, frame in enumerate(stack) if self._testMethodName in frame), 0)
metadata = {
'canonical_tag': self.canonical_tag,
+ 'stack': '\n'.join(traceback.format_stack()[start:-7]),
+ 'subtest': str(self._subtest),
}
return metadata
```
Forward-Port-Of: odoo/odoo#199964**Problem**: When a portal user edits a task's description and adds a checklist, the checkboxes do not appear as they do in the Odoo backend (e.g., in the To-Do app). This occurs because the editor is rendered in an `iframe` with only `html_editor` loaded, while checklist styles are in `web_editor`. **Solution**: Add checklist styles to `html_editor`. **Steps to Reproduce**: 1. Share a project with **"Edit"** permission for a portal user. 2. Log in as the portal user. 3. Go to any
Original PR description
**Problem**: When a portal user edits a task's description and adds a checklist, the checkboxes do not appear as they do in the Odoo backend (e.g., in the To-Do app). This occurs because the editor is rendered in an `iframe` with only `html_editor` loaded, while checklist styles are in `web_editor`. **Solution**: Add checklist styles to `html_editor`. **Steps to Reproduce**: 1. Share a project with **"Edit"** permission for a portal user. 2. Log in as the portal user. 3. Go to any task inside the project. 4. In the description, add a checklist using `/checklist` command. - **Issue**: No checkboxes appear. opw-4481993 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#200309
This commit will revert the change done in this commit: https://github.com/odoo/odoo/commit/49217dc494d01326bb8a4221bbfa99d9c02aeec5 Because a majority of companies in Saudi Arabia instead provide services locally to Non-Resident Individual Customers, thereby necessitating the issuance of a Simplified Tax Invoice. With our recent change, those non-resident individual contacts are now being issued a Standard Export Tax Invoice, which is incorrect. task-4611062 --- I confirm I have si
Original PR description
This commit will revert the change done in this commit: https://github.com/odoo/odoo/commit/49217dc494d01326bb8a4221bbfa99d9c02aeec5 Because a majority of companies in Saudi Arabia instead provide services locally to Non-Resident Individual Customers, thereby necessitating the issuance of a Simplified Tax Invoice. With our recent change, those non-resident individual contacts are now being issued a Standard Export Tax Invoice, which is incorrect. task-4611062 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#200024 Forward-Port-Of: odoo/odoo#199734
**Problem**: When an `img` is inside a link, `removeCurrentLinkIfEmpty` removes the `<a>` node if no `href` is provided. This resets `linkElement` to `null`. This happens if the user clicks outside the link popover (when is is open) without entering a URL, it results in a traceback due to an invalid reference. **Solution**: Ensure `linkEl.isConnected` before defining popover properties to avoid referencing a removed element. **Steps to Reproduce**: 1. Add an image. 2. Click on the i
Original PR description
**Problem**: When an `img` is inside a link, `removeCurrentLinkIfEmpty` removes the `<a>` node if no `href` is provided. This resets `linkElement` to `null`. This happens if the user clicks outside the link popover (when is is open) without entering a URL, it results in a traceback due to an invalid reference. **Solution**: Ensure `linkEl.isConnected` before defining popover properties to avoid referencing a removed element. **Steps to Reproduce**: 1. Add an image. 2. Click on the image > toolbar > "Link". 3. When the link popover appears, click outside without typing a URL. 4. Observe a traceback. opw-4546324 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196434
**Steps to reproduce:** - Install Accounting - Create an included tax: * Amount: 20% * Included in Price: [enabled] * Affect Base of Subsequent Taxes: [disabled] - Create a retention tax: * Amount: -5% * Included in Price: [disabled] * Affect Base of Subsequent Taxes: [disabled] * Base Affected by Previous Taxes: [enabled] - Create an invoice: * Price: 120.0 * Taxes: [Both created taxes] **Issue:** The base amount used to compute the retention tax is including
Original PR description
**Steps to reproduce:** - Install Accounting - Create an included tax: * Amount: 20% * Included in Price: [enabled] * Affect Base of Subsequent Taxes: [disabled] - Create a retention tax: * Amount: -5% * Included in Price: [disabled] * Affect Base of Subsequent Taxes: [disabled] * Base Affected by Previous Taxes: [enabled] - Create an invoice: * Price: 120.0 * Taxes: [Both created taxes] **Issue:** The base amount used to compute the retention tax is including the amount of the included tax (i.e. 120.0), but it should not (i.e. 100.0) as the included tax doesn't affect the base of subsequent taxes. **Cause:** When "special_mode" is False, all excluded taxes following an included tax have their base affected by the included tax. opw-4451617 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#200257 Forward-Port-Of: odoo/odoo#197512
**Current behavior before PR:** - In mass mailing, when the link popover opens, clicking on a link that is available near the edge of the mailing template beside the sidebar would sometimes cause the popover to appear behind the sidebar. **Desired behavior after PR is merged:** - Clicking on a link near the edge of the mailing template now ensures that the link popover does not appear behind the sidebar. task-4237091 Forward-Port-Of: odoo/odoo#198252
Original PR description
**Current behavior before PR:** - In mass mailing, when the link popover opens, clicking on a link that is available near the edge of the mailing template beside the sidebar would sometimes cause the popover to appear behind the sidebar. **Desired behavior after PR is merged:** - Clicking on a link near the edge of the mailing template now ensures that the link popover does not appear behind the sidebar. task-4237091 Forward-Port-Of: odoo/odoo#198252
Fix the traceback appearing when trying to create live session sample data. The live session survey is initialized with the 'session_speed_rating' field set to True meaning a 'session_speed_rating_time_limit' value is required but wasn't given. related PR: odoo/odoo#115141 Task-4569972 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197584
Original PR description
Fix the traceback appearing when trying to create live session sample data. The live session survey is initialized with the 'session_speed_rating' field set to True meaning a 'session_speed_rating_time_limit' value is required but wasn't given. related PR: odoo/odoo#115141 Task-4569972 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197584
Before Commit: --------------- - Shipping rates were retrieved based on the total shipping weight calculated from product. - Manually adjusted weights were not considered in the rate retrieval, causing inconsistencies. After Commit: ------------- - The weight computation for the packages was updated to take into consideration the manually modified order weight. - If an adjusted weight is provided, it will be used for rate calculations; otherwise, the calculated weight will be used. - T
Original PR description
Before Commit: --------------- - Shipping rates were retrieved based on the total shipping weight calculated from product. - Manually adjusted weights were not considered in the rate retrieval, causing inconsistencies. After Commit: ------------- - The weight computation for the packages was updated to take into consideration the manually modified order weight. - If an adjusted weight is provided, it will be used for rate calculations; otherwise, the calculated weight will be used. - This fix prevents confusion and ensures that the shipping rate reflects the actual weight of the order as adjusted by the user. task-4203065 Forward-Port-Of: odoo/odoo#200023 Forward-Port-Of: odoo/odoo#189392
Before this commit, some messages in portal chatter may have avatar squished vertically or horizontally when the source image of avatar is not a square. This happens because avatar are cropped to fit cover with `.o_object_fit_cover`, in order to give the right visual when the avatar doesn't fit in a square. The classname was present but the SCSS file defining this rule was missing from the ` "portal.assets_chatter_style"` bundle, which this commit fixes. Before  After  Forward-Port-Of: odoo/odoo#200241
**Problem**: When applying a light background color to a table cell, switching to dark mode changes the text color to white, making it invisible. **Solution**: When setting a background color on a block element, also apply the default text color. This ensures text remains visible in both light and dark modes. **Steps to Reproduce**: 1. Add a table. 2. Change the background color of cells to white. 3. Switch to dark mode. 4. Observe that the text inside the cells is not visible. op
Original PR description
**Problem**: When applying a light background color to a table cell, switching to dark mode changes the text color to white, making it invisible. **Solution**: When setting a background color on a block element, also apply the default text color. This ensures text remains visible in both light and dark modes. **Steps to Reproduce**: 1. Add a table. 2. Change the background color of cells to white. 3. Switch to dark mode. 4. Observe that the text inside the cells is not visible. opw-4546663 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196651
Steps to reproduce: 1. Install l10n_ar_edi 2. Use an Argentinian company 3. Go to the "Argentinean Localization" section of the settings 4. Make sure "Private Key" and "Certificate" are empty. Save. 5. Click on "Generate Request". 6. A key has been created but looks like it's not set on the company. --- Description of the issue this commit addresses: When generating a certificate request without selecting a private key to generate the certificate request with, a private key is g
Original PR description
Steps to reproduce: 1. Install l10n_ar_edi 2. Use an Argentinian company 3. Go to the "Argentinean Localization" section of the settings 4. Make sure "Private Key" and "Certificate" are empty. Save.…
Steps to reproduce: 1. Install l10n_ar_edi 2. Use an Argentinian company 3. Go to the "Argentinean Localization" section of the settings 4. Make sure "Private Key" and "Certificate" are empty. Save. 5. Click on "Generate Request". 6. A key has been created but looks like it's not set on the company. --- Description of the issue this commit addresses: When generating a certificate request without selecting a private key to generate the certificate request with, a private key is generated by the system but in the settings windows, the field remains empty. Also, later, after retrieving the certificate from the official platform and trying to insert it in the database, it is required to link it with the private key that was used for its generation but since all automatically generated keys share the same name, this can be quite hard. --- Desired behavior after this commit is merged: When using the "Generate Request" button with no private key selected, the Private Key fields is populated with the key that was created for the generation of the request. Also, the names of the automatically generated keys use the current time for differenciation purposes. --- Note on the fix: The error happened because when using the Generate Request button, the key is created by a method called via another request so virtually, the assignment happens in another window. To fix that issue, the key has to be created and assigned before making any other request. --- task-4393259 Forward-Port-Of: odoo/enterprise#79253
Steps to reproduce: - Go to website and set the lang to Spanish - Book an appointment from the website Bug: The confirmation email sent to the customer is not correctly translated to Spanish opw:4382606 Forward-Port-Of: odoo/enterprise#80257
Original PR description
Steps to reproduce: - Go to website and set the lang to Spanish - Book an appointment from the website Bug: The confirmation email sent to the customer is not correctly translated to Spanish opw:4382606 Forward-Port-Of: odoo/enterprise#80257
### Issue: MO with a tracked finished product are actually splited at validation. However, the qties of the MO are usually set by default to fulfill the maximal demand. As such, component registrations performed form the shopfloor might be completely override by the MO split. ### Steps to reproduce: - Create 2 storable products tracked by SN: FP and COMP - Create a BOM for you final product FP: - 1 x COMP - 1 operation with an instruction of type "Register Consumed Materials
Original PR description
### Issue: MO with a tracked finished product are actually splited at validation. However, the qties of the MO are usually set by default to fulfill the maximal demand. As such, component…
### Issue:
MO with a tracked finished product are actually splited at validation. However, the qties of the MO are usually set by default to fulfill the maximal demand. As such, component registrations performed form the shopfloor might be completely override by the MO split.
### Steps to reproduce:
- Create 2 storable products tracked by SN: FP and COMP
- Create a BOM for you final product FP:
- 1 x COMP
- 1 operation with an instruction of type "Register Consumed Materials" for COMP
- Put 2 serial numbers in WH/Stock for COMP: SN01, SN02
- Create and confirm an MO for 2 units of FP using that BOM
> SN01 and SN02 should be reserved on the move raw
- Go to the shopfloor to the MO
- Click on Register component SN02 > Validate
- Click on the [+] button of the register Production
- Mark the MO as Done > Close Production
> You trigger a consumption warning dialog telling you that you registered more consumed quantity than expected (2 instead of 1) This dialog should not appear in the first place as you registered only 1 unit but suppose it is ok and continue
- Click on "Set quantities and validate"
- Go back to your MO in the back end
#### > It was closed using SN01 rather than the SN you registered.
### Cause of the issue:
Confirming the MO confirmed the move raw and a reservation was made for 2 units as the MO is not splitted yet. However, since the final product is tracked this MO will end up splitted. When you register consumption, the serial number of one of the move line related to the raw move will be updated and the line will be picked:
https://github.com/odoo/enterprise/blob/d4ff42fbcfa3dd297c6cb838b5b03955f12f02a4/mrp_workorder/models/quality.py#L519-L525 However, since at least one of the move line of hte move raw is picked the move its self will become picked:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/stock/models/stock_move.py#L208-L212 This is problematic as picked picked move by pass the set_qty_producing so from now if you were to adapt the qty producing of the MO you would not affect the quantity of the raw move (which is currently at 2: one unpicked move line with SN01 and one picked with SN02): https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1218-L1228 Finally, when you click on the Close production, a `_split_productions` process will be started and adpat the demand of the move raw to 1: https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1831-L1832 Since the quantity set on the move exceeds this new demand the consumption warning. Note that at this point the backorders of the initial MO were already created and confirm without you dialog to be resolved so that the reservations of these splitted MO could not reserve the SN01 that is still used by your move. Finally, when you "Set quantities and validate" it will adpat the quantity and unreserve the picked move line as this decrease process does not prioritise to unlink unpicked move lines first:
### Fix:
Since registration process through shopfloor and barcode are expected to create picked move lines which will adpat the picked state of the move and since picking the move will automatically pick all the move line, a move line that is not picked in a picked move is a move line that is not expected to be kept. We therefore unlik these move_lines before adapting the demand of the move_raws in the split production.
### Note:
We also tried 2 other fixes of the issue but aborted these other ideas:
1) try to keep only picked move line at the Validation of the registration component process but this change of behavior was aborted since if instead of clicking on validate you click on "Continue consumption and then on the top right cross button", you would technically have registered only the first SN but you would fall in the situation as above and trigger the same issue.
2) Adapt the condition of that makes a move raw by pass the _set_qty_producing:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1219-L1221 Since the move is picked for the wrong reason we would instead use: `all(ml.pikced for ml in move.move_line_ids)`
However, this would also require to change the process decrease to unreserve picked move last here:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/stock/models/stock_move.py#L361-L365 Changing the loop to
`reversed(move.move_line_ids.sorted(lambda ml: (not ml.picked, ml.id))` And this would not solve the issue starting post 17.0 since we would still bypass the set_qty producing on the next lines:
https://github.com/odoo/odoo/blob/f9e362c45414001077738c2462e9e030f865ec36/addons/mrp/models/mrp_production.py#L1223-L1225
Community: https://github.com/odoo/odoo/pull/198175
opw-4558900
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/enterprise#80727
Forward-Port-Of: odoo/enterprise#79591### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation. ### Cause of the issues: The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15 However, d
Original PR description
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC…
### Issues:
Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation.
### Cause of the issues:
The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
However, depending on where you click in the barcode app, the moves might end up being assigned and hence skip the "_action_confirm" of the picking (which is computed to be assigned) prior to the `_pre_action_done_hook` of the `button_validate` of the picking wich is suppose to return already created quality check:
https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_picking.py#L1145-L1147
In which case, the quality check is not triggered (Issue 1). Furthermore, since the `_action_confirm` of moves can also be applied to extra moves created to update the demand and to be merged to the initial move during the validation, the quality check creation might be called twice on a move once during its own `action_confirm` and once during the `_action_confirm` of its extra move (Issue2).
### Issue 1:
1. Create a storable product P with a barcode: XXX
2. Go to Quality > Quality Control > Quality Points > New
3. Create a new quality point for your product:
- Control per: "Operation"
- Operations: "Receipts"
4. Go to the barcode app > Operations > Receipts > New
5. Scan your product
6. Click on the pencil (key step)
7. Either edit the quantity from the digipad and confirm or go back to the picking and edit it from there.
8. Validate the receipt
#### > Even thought a quality check was created using your quality point for your receipt, it was not triggered before validation.
### Cause of the Issue:
Clicking on the pencil will trigger a call of the `save_barcode_data` which will in turn create a stock move line related to the picking during the write performed on the picking:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/controllers/stock_barcode.py#L68-L74
After this edition of the quantity of the picking will write on the `qty_done` dummy field of that move line which will in turn trigger a call of its inverse method and modify its quantity: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/models/stock_move_line.py#L58-L61
Changing the quantity of the ml will then update the state of the move to "assigned" because of these lines:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L487-L488 https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L530-L531 https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_move.py#L2022-L2023 In turns, the state compute method of the picking will determine that the picking is assigned and the picking will not be confirmed during its `button_validate` prior to the `_pre_action_done_hook` of the `button_validate` as it is not in draft anymore.
### Fix:
The state of the move should stay as draft just as if we didn't created the move line through the pencil if we were to edit the qty_done via the barcode app.
### Note:
The inverse method of the "qty_done" computed field was introduced in 17.0+ by commit: 4f19668c51a90e8c12e57b6353bbe5194f83ca10 during the quantity refactoring so that the issue is not reproducible prior to that version.
### Issue 2:
Same steps 1 -> 5.
6'. click on the +1 button.
7'. Validate > this opens the quality check
8'. Pass the quality check > Validate again
9'. Go to Quality > Quality Control > Quality check
#### > Two quality checks were created isntead of one for your receipt
### Cause of the issue:
At some later point in the button validate of the picking, an `_action_done` is called to put the pickings and its move in done state: https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_picking.py#L1157
However, during the `_action_done` of the moves if the quantity of the move exceeds its `product_uom_qty`, extra moves will be created, confirmed and merged back to the move in order to update its `product_uom_qty`:
https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1885-L1890 https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1823-L1832 However, the action confirm of this extra move will trigger the same override of the `_action_confirm` that creates a quality check and it will even be called on the original move that was already confirmed and already created its QC since the extra move was merged into it: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
As a result we end up with an extra quality check creation.
### Fix:
We avoid quality check creation during extra move confirmation.
Community: https://github.com/odoo/odoo/pull/192034
opw-4266053
---
Forward-Port-Of: odoo/enterprise#80142
Forward-Port-Of: odoo/enterprise#76301### Before Codabox used to require a fiduciary VAT and the VAT of a company (managed by the fiduciary) in order to connect to their services. - Access to Codabox was limited to companies with an accounting firm with a VAT number assigned ### Now Codabox gives the opportunity for companies to directly connect (without being a fiduciary/ being managed by one). This is through the same port as before, just receiving two identical VAT numbers. - Module summary, descriptions and ot
Original PR description
### Before Codabox used to require a fiduciary VAT and the VAT of a company (managed by the fiduciary) in order to connect to their services. - Access to Codabox was limited to companies with an accounting firm with a VAT number assigned ### Now Codabox gives the opportunity for companies to directly connect (without being a fiduciary/ being managed by one). This is through the same port as before, just receiving two identical VAT numbers. - Module summary, descriptions and other texts are updated to generalize - Companies without an accounting firm can access the Codabox configuration settings task - 4460499 Forward-Port-Of: odoo/enterprise#77240
When settling the user account from `pos_settle_due`, we show a receipt with no order (as expected), but with an empty state saying "Start adding products"! This bug has been reported while using the `pos_settle_due` module, however, the fix has been made generic and hence been implemented in the `point_of_sale` module. This PR just adds the test specific to `pos_settle_due`. opw-4430325 Forward-Port-Of: odoo/enterprise#80514 Forward-Port-Of: odoo/enterprise#79454
Original PR description
When settling the user account from `pos_settle_due`, we show a receipt with no order (as expected), but with an empty state saying "Start adding products"! This bug has been reported while using the `pos_settle_due` module, however, the fix has been made generic and hence been implemented in the `point_of_sale` module. This PR just adds the test specific to `pos_settle_due`. opw-4430325 Forward-Port-Of: odoo/enterprise#80514 Forward-Port-Of: odoo/enterprise#79454
Prior to this commit, we get an error when we try to make a copy of a certain revision of a quotation/quality template spreadsheet. This is due to the method `_creation_msg` which was not implemented after inheriting the `spreadsheet.mixin` class. Steps to reproduce: - Go to Sales > Configuration > Quotation Templates (or Quality Control Templates) - Create a quotation template - Select the quotation calculator field and create a new quotation spreadsheet - In the quotation spreadsheet, s
Original PR description
Prior to this commit, we get an error when we try to make a copy of a certain revision of a quotation/quality template spreadsheet. This is due to the method `_creation_msg` which was not implemented after inheriting the `spreadsheet.mixin` class. Steps to reproduce: - Go to Sales > Configuration > Quotation Templates (or Quality Control Templates) - Create a quotation template - Select the quotation calculator field and create a new quotation spreadsheet - In the quotation spreadsheet, select File > See version history - Select the three dots on any version and click "Make a copy" - Traceback occurs task-4568319 Forward-Port-Of: odoo/enterprise#79096
Currently, an error was occurring when a user tried to reverse a journal entry by following these steps: - Install ``Accounting`` and ``Payroll`` module - Enabled payroll entries in Payroll > Configuration > Settings. - Created a new employee and its corresponding contract in payroll > Create a bank account and enable ``Send Money`` in ``Private Information`` - In ``Contract`` change state from `New` to `Running` > Click on `Payslips` - Computed the payslip > generated draft journal entr
Original PR description
Currently, an error was occurring when a user tried to reverse a journal entry by following these steps: - Install ``Accounting`` and ``Payroll`` module - Enabled payroll entries in Payroll >…
Currently, an error was occurring when a user tried to reverse a journal entry by following these steps: - Install ``Accounting`` and ``Payroll`` module - Enabled payroll entries in Payroll > Configuration > Settings. - Created a new employee and its corresponding contract in payroll > Create a bank account and enable ``Send Money`` in ``Private Information`` - In ``Contract`` change state from `New` to `Running` > Click on `Payslips` - Computed the payslip > generated draft journal entries > add lines in journal items and click `Pay` in payslip. - Go to ``Journal Entry`` and make a ``Reverse Entry``. ValueError: Expected singleton: res.currency() The issue occurs at [1] because, when a user makes a payment from a payslip after posting journal entries, the ``currency_id`` is not available. [1] - https://github.com/odoo/odoo/blob/0583db332efdc884975da1a074c91981d2865c9d/addons/account/wizard/account_payment_register.py#L972 This commit will fix the above issue by providing default company currency when currency is not available. sentry-6207053954 Forward-Port-Of: odoo/enterprise#77334
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO for a product and add an operation (no need of component) - Confirm the MO and go to your operation in the shopfloor - Click on the 3 dots > Add component > add any component #### > Back to the MO: No transfer was created from stock to pre-prod ### Cause of the issue: When you add comp
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO for a product and add an operation (no need of component) - Confirm the MO and go to your operation in the shopfloor - Click on the 3 dots > Add component > add any component #### > Back to the MO: No transfer was created from stock to pre-prod ### Cause of the issue: When you add component from the shopfloor, you will trigger a call of the `add_product` method to create and confirm the raw move associated to the MO: https://github.com/odoo/enterprise/blob/2e2efe8421b2f85950e50ff102cdabf98d2d91ab/mrp_workorder/wizard/additional_product.py#L36-L37 However, if the `procure_method`` of this move is not set to mto/mtso it will not trigger other rules in order to generate the other transfers ### Note: A priori, the issue should not be reproducible in 18.0+ as this part of the code was refactored and the issue was fixed by 235047b68e6a24a14e32b94b1d4a15a580dc5ad2 opw-4236272 Forward-Port-Of: odoo/enterprise#75583 Forward-Port-Of: odoo/enterprise#74178
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create and confirm an MO for one unit of FP. - Go to the shopfoor app > open the instruction of your operation - Type a non-existing serial number in the search bar > Create "new_sn" > This opens a form view of the stock.lot model - Save and close the new stock.lot > Invalid operation: You
Original PR description
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create…
### Steps to reproduce:
- Create a storable product FP tracked by SN with a BOM:
- 1 Operation: - instruction: Register Production type (per product)
- 1 x Comp (storable product in stock)
- Create and confirm an MO for one unit of FP.
- Go to the shopfoor app > open the instruction of your operation
- Type a non-existing serial number in the search bar > Create "new_sn"
> This opens a form view of the stock.lot model
- Save and close the new stock.lot
> Invalid operation: You are not allowed to create or edit a lot or serial number for the components with the operation type
> "Manufacturing". To change this, go on the operation type and tick the box "Create New Lots/Serial Numbers for
> Components"
#### Expected behavior:
The invalid operation should not be raised as the "required" option concerns only componenets and not final products.
### Cause of the issue:
Creating a stock lot will first launch a call of the `_check_create`: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/stock/models/stock_lot.py#L150-L153 However, since this check does not verifies that the product for which we create the lot is indeed related to a component of the MO it will raise the invalid operation even for final products: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/mrp/models/stock_lot.py#L11-L17
### Issue 2:
Currently, the `quickCreate` ("Create *sn_name*") option of the lot field of te "register production" dialog calls a `name_create` that will set an error message in the logs as the product_id required field can not be provided neither in the vals or the context of the `name_create`. You then fall back on the same form dialog than the "Create and edit". The `quickCreate` option should therefore just be disabled.
Community: https://github.com/odoo/odoo/pull/193965
opw-4452747
---
Forward-Port-Of: odoo/enterprise#79109
Forward-Port-Of: odoo/enterprise#77265Issue: When the user tries to create a contact from the approval form, they get a "Missing Record" error. Steps to reproduce: - Install the Approvals app - Create a new Approval Type with Contact set as either 'Required' or 'Optional' - When creating a new Request from the created Type, try to create a new Contact Cause: Both Approvals and Partners have a 'category_id' field. In the approval form, the context has the approval's value for 'category_id', which is being used for the part
Original PR description
Issue: When the user tries to create a contact from the approval form, they get a "Missing Record" error. Steps to reproduce: - Install the Approvals app - Create a new Approval Type with Contact set as either 'Required' or 'Optional' - When creating a new Request from the created Type, try to create a new Contact Cause: Both Approvals and Partners have a 'category_id' field. In the approval form, the context has the approval's value for 'category_id', which is being used for the partner creation. Solution: In the approval form view, change the context used by the partner field to not have a default 'category_id'. Ticket: opw-4328371 Forward-Port-Of: odoo/enterprise#80177 Forward-Port-Of: odoo/enterprise#74579
- hr_payroll > Dashboard - After completing all the steps of onboarding when the user is refreshing all the menuitems get hidden or whenever user does a level up and refresh/ press F5 then also all the menuitme gets hidden. Before this commit, after completing all the onboarding steps or whenever user does a level up after that refreshing the page (F5). so, all menu items to disappear. This occurs because the `hr_referral_welcome` client action is missing the required path. Now, the stati
Original PR description
- hr_payroll > Dashboard - After completing all the steps of onboarding when the user is refreshing all the menuitems get hidden or whenever user does a level up and refresh/ press F5 then also all the menuitme gets hidden. Before this commit, after completing all the onboarding steps or whenever user does a level up after that refreshing the page (F5). so, all menu items to disappear. This occurs because the `hr_referral_welcome` client action is missing the required path. Now, the static path has been added to the `hr_referral_welcome` client action. in that way, when reloading ,after completing all the onboarding steps or level up, all menu items is not disappear Task-4391729 Forward-Port-Of: odoo/enterprise#77478