Tuesday, March 4, 2025
23 changes · saas-17.4
Resolved issues and error corrections
The mail app now avoids showing the new message banner when the unread message has already been deleted. This prevents users from seeing an error screen when they click the banner in a conversation.
Original PR description
Before this commit, if a user deletes a message before the recipient sees it and the recipient tries to click on "1 new message", they get a traceback. Steps to reproduce: 1. Have a long conversation between user A and user B 2. Scroll up with user B 3. Send message with user A 4. Delete said message 5. User B clicks on new message banner -> traceback This commit fixes the issue by only showing the unread banner if there is an unread message. task-4240887
Miscellaneous changes
Steps to reproduce =================== - Create database with a valid mail configuration. - Open CRM module apply some random filters to get the helper. - alias name is there in the helper. This PR addresses the issue and now the alias email will be there instead of the name. Task-4619974 Forward-Port-Of: odoo/odoo#200129
Original PR description
Steps to reproduce =================== - Create database with a valid mail configuration. - Open CRM module apply some random filters to get the helper. - alias name is there in the helper. This PR addresses the issue and now the alias email will be there instead of the name. Task-4619974 Forward-Port-Of: odoo/odoo#200129
### 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#198175Following the fixes - https://github.com/odoo/odoo/commit/ce92dedea0fd3cdc73da6366c20b8052bb04f7e9 & https://github.com/odoo/odoo/commit/4dc901e77dc7e2873a94ea3a541450fc9fb2eb5e Investing more into the issues, we found out that E-waybill portal, doesn't allow generation of E-waybill as Inwards (Tax Invoice) type for Sales Return, Only Challan Type is accepted it means that the Sales Return, E-waybill should be generated by the E-waybill on Stock/Inventory. Not through the Invoice/Account App.
Original PR description
Following the fixes - https://github.com/odoo/odoo/commit/ce92dedea0fd3cdc73da6366c20b8052bb04f7e9 & https://github.com/odoo/odoo/commit/4dc901e77dc7e2873a94ea3a541450fc9fb2eb5e Investing more into the issues, we found out that E-waybill portal, doesn't allow generation of E-waybill as Inwards (Tax Invoice) type for Sales Return, Only Challan Type is accepted it means that the Sales Return, E-waybill should be generated by the E-waybill on Stock/Inventory. Not through the Invoice/Account App. This commit intends to do a soft block for generation of E-waybill through Sales Credit Note task-4441603 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192090
Before this patch, if a billing user (without any administration settings level) tried to cancel a posted invoice and clicked on the "Process now" button, they got an exception. In particular, it happened because those users shouldn't have access to stuff such as the certificate, its password or the contents of the sent EDI attachment. However, they should be able to post the documents using whatever configuration the sysadmin saved. Thus, I use some `sudo()` calls and add a test to assert
Original PR description
Before this patch, if a billing user (without any administration settings level) tried to cancel a posted invoice and clicked on the "Process now" button, they got an exception. In particular, it…
Before this patch, if a billing user (without any administration settings level) tried to cancel a posted invoice and clicked on the "Process now" button, they got an exception. In particular, it happened because those users shouldn't have access to stuff such as the certificate, its password or the contents of the sent EDI attachment. However, they should be able to post the documents using whatever configuration the sysadmin saved. Thus, I use some `sudo()` calls and add a test to assert it won't break anymore. **How to test functionally:** 1. Configure a Spanish company. 2. Install `l10n_es_edi_tbai` and configure it. 3. Switch to a user that only has "Invoicing / Billing" permissions. 4. Post an invoice. 5. Send it to tbai. 6. Request EDI cancellation. 7. Send it to tbai. 8. It should work now. @moduon MT-8894 OPW-4535149 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196086 Forward-Port-Of: odoo/odoo#195981
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#199825 Forward-Port-Of: odoo/odoo#199734
Issue: When archiving a contract the employee form view does not update the first contract. Cause: The first contract computation is not trigger when archiving a contract. expected behavior: When archiving a contract the first contract should be recomputed. Fix: Add the active field to the depends method of the contract. task-3745594 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164381 Forward-Port-Of: odo
Original PR description
Issue: When archiving a contract the employee form view does not update the first contract. Cause: The first contract computation is not trigger when archiving a contract. expected behavior: When archiving a contract the first contract should be recomputed. Fix: Add the active field to the depends method of the contract. task-3745594 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164381 Forward-Port-Of: odoo/odoo#158366
This commit will set the company_id from partner party legal entity when the partner is not from SA task: 4531706 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196757
Original PR description
This commit will set the company_id from partner party legal entity when the partner is not from SA task: 4531706 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196757
Description of the issue/feature this PR addresses: Cannot search by analytic because analytic_distribution is a non-store compute field, we need to pass the domain through the method _apply_analytic_distribution_domain to reprocess the domain so we can find the correct data. Current behavior before PR: Cannot search by analytic Desired behavior after PR is merged: Can search by analytic --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Fo
Original PR description
Description of the issue/feature this PR addresses: Cannot search by analytic because analytic_distribution is a non-store compute field, we need to pass the domain through the method _apply_analytic_distribution_domain to reprocess the domain so we can find the correct data. Current behavior before PR: Cannot search by analytic Desired behavior after PR is merged: Can search by analytic --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175294
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#199454 Forward-Port-Of: odoo/odoo#199009
When we import an Italian EDI file with a withholding tax line that has a zero amount, we get a division by zero error. This commit fixes this issue by ensuring the import handles zero amounts without raising an error. Steps to reproduce: - Import an XML file containing the following `DettaglioLinee`: ```xml <DettaglioLinee> <NumeroLinea>2</NumeroLinea> <Descrizione>Contributo ENASARCO</Descrizione> <PrezzoUnitario>0.00</PrezzoUnitario> <PrezzoTotale>0.00</PrezzoTotal
Original PR description
When we import an Italian EDI file with a withholding tax line that has a zero amount, we get a division by zero error. This commit fixes this issue by ensuring the import handles zero amounts without raising an error.
Steps to reproduce:
- Import an XML file containing the following `DettaglioLinee`:
```xml
<DettaglioLinee>
<NumeroLinea>2</NumeroLinea>
<Descrizione>Contributo ENASARCO</Descrizione>
<PrezzoUnitario>0.00</PrezzoUnitario>
<PrezzoTotale>0.00</PrezzoTotale>
<AliquotaIVA>22.00</AliquotaIVA>
<AltriDatiGestionali>
<TipoDato>CASSA-PREV</TipoDato>
<RiferimentoTesto>TC07 - ENASARCO</RiferimentoTesto>
<RiferimentoNumero>10.03</RiferimentoNumero>
</AltriDatiGestionali>
</DettaglioLinee>
```
Since PrezzoUnitario is 0, this causes a division by zero error.
Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4555966)
opw-4555966
Forward-Port-Of: odoo/odoo#197456This is a solution for https://github.com/OCA/timesheet/issues/740 Forward-Port-Of: odoo/odoo#199851
Original PR description
This is a solution for https://github.com/OCA/timesheet/issues/740 Forward-Port-Of: odoo/odoo#199851
**Description of the issue/feature this PR addresses:** When computing l10n_in's `res_partner.l10n_in_gst_state_warning` field, we [search](https://github.com/odoo/odoo/blob/f1fb0527f1b29e4b464e13718d6d0edb3b32a114/addons/l10n_in/models/res_partner.py#L45) for a res_country_state whose `l10n_in_tin` is the same as the one encoded in the partner's `vat`; if none is found we warn the user. Since the res_country_state's [`l10n_in_tin`](https://github.com/odoo/odoo/blob/f1fb0527f1b29e4b464e137
Original PR description
**Description of the issue/feature this PR addresses:** When computing l10n_in's `res_partner.l10n_in_gst_state_warning` field, we…
**Description of the issue/feature this PR addresses:**
When computing l10n_in's `res_partner.l10n_in_gst_state_warning` field, we [search](https://github.com/odoo/odoo/blob/f1fb0527f1b29e4b464e13718d6d0edb3b32a114/addons/l10n_in/models/res_partner.py#L45) for a res_country_state whose `l10n_in_tin` is the same as the one encoded in the partner's `vat`; if none is found we warn the user.
Since the res_country_state's [`l10n_in_tin`](https://github.com/odoo/odoo/blob/f1fb0527f1b29e4b464e13718d6d0edb3b32a114/addons/l10n_in/models/res_country_state.py#L10) is not unique though, it is legal for the customer to have multiple res.country.state entries with the same l10n_in_tin (typically one standard plus one custom state):
```sql
> SELECT ARRAY_AGG(id),ARRAY_AGG(country_id),ARRAY_AGG(name),ARRAY_AGG(code),l10n_in_tin FROM res_country_state WHERE l10n_in_tin IS NOT NULL GROUP BY l10n_in_tin HAVING COUNT(*)>1
+-------------+------------+------------------------+--------------+-------------+
| array_agg | array_agg | array_agg | array_agg | l10n_in_tin |
|-------------+------------+------------------------+--------------+-------------|
| [1741, 589] | [104, 104] | ['HARYANA', 'Haryana'] | ['06', 'HR'] | 06 |
+-------------+------------+------------------------+--------------+-------------+
```
If our search passes more than one results to `state_id.name` though, Odoo fails with a ValueError:
```
Traceback (most recent call last):
File "/tmp/tmpdugmps2c/migrations/base/tests/test_mock_crawl.py", line 256, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmpdugmps2c/migrations/base/tests/test_mock_crawl.py", line 269, in mock_action
return self.mock_act_window(action)
File "/tmp/tmpdugmps2c/migrations/base/tests/test_mock_crawl.py", line 429, in mock_act_window
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpdugmps2c/migrations/base/tests/test_mock_crawl.py", line 457, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 3801, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 4032, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 6999, in __getitem__
return self._fields[key].__get__(self)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1291, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1473, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 429, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5238, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 113, in determine
return needle(records, *args)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 710, in _compute_related
record[self.name] = self._process_related(value[self.related_field.name], record.env)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 6999, in __getitem__
return self._fields[key].__get__(self)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1291, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1473, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 429, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5238, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 110, in determine
return needle(*args)
File "/home/odoo/src/odoo/18.0/addons/l10n_in/models/res_partner.py", line 48, in _compute_l10n_in_gst_state_warning
"As per GSTN the state should be %s, so it's recommended to", state_id.name
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1232, in __get__
record.ensure_one()
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 6212, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: res.country.state(1741, 589)
```
**Desired behavior after PR is merged:**
We can avoid this by explicitly limiting the search to a single result.
TBG: https://upgrade.odoo.com/web#cids=1&menu_id=107&action=178&model=upgrade.request.traceback.group&view_type=form&id=1804
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#198388**Description of the issue/feature this PR addresses**: If "Product Price" Decimal Accuracy has more than 2 digits, then the unit price on the printed report has only 2 digits when Argentinean invoice report is printed and this causes that quantity * price on each invoice line does not result the amount shown on the "Amount" column. **Steps to reproduce**: 1) Log ing with admin user on runbot odoo enterprise 16 instance, activate developer mode and install l10n_ar module. 2) Take positio
Original PR description
**Description of the issue/feature this PR addresses**: If "Product Price" Decimal Accuracy has more than 2 digits, then the unit price on the printed report has only 2 digits when Argentinean…
**Description of the issue/feature this PR addresses**: If "Product Price" Decimal Accuracy has more than 2 digits, then the unit price on the printed report has only 2 digits when Argentinean invoice report is printed and this causes that quantity * price on each invoice line does not result the amount shown on the "Amount" column. **Steps to reproduce**: 1) Log ing with admin user on runbot odoo enterprise 16 instance, activate developer mode and install l10n_ar module. 2) Take position on company "Responsable Inscripto", go to menu "Setting / Technical / Database Structure / Decimal Accuracy" and set 4 digits for "Product Price".  3) Create customer invoice to partner "Consumidor Final Anónimo" (if the partner is "Consumidor Final Anónimo" then taxes are not discriminated on the printed invoice report --> document type = "FACTURAS B"). The invoice must have an invoice line with product price with 4 digits, for example: quantity 3000, price 65.3057 and tax "IVA 21%".  4) Confirm and print the invoice  The result of quantity * price is not the amount shown on the printed invoice (3000 * 79.03 != 237059.69) **Current behavior before PR**: If "Product Price" Decimal Accuracy has more than 2 digits, then the unit price on the printed report has only 2 digits when Argentinean invoice report is printed and this causes that quantity * price on each invoice line does not result the amount shown on the amount column. **Desired behavior after PR is merged**: If "Product Price" Decimal Accuracy has more than 2 digits, then the unit price on the printed report has the same quantity of digits set on "Product Price" Decimal Accuracy when Argentinean invoice report is printed. Ticket Adhoc side: 77471 Task latam: 1226 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196256 Forward-Port-Of: odoo/odoo#171131
Recently, the Kenyan support team has been reporting a temporary increase in the number of timeouts when sending invoices to eTIMS, as well as associated issues (e.g. timed-out invoices turning out to be actually registered on eTIMS' side) which warrant further investigation. In order to reduce the number of timeouts and help diagnose (1) which API endpoints are timing out (which can tell us where we should implement retry mechanisms) and (2) whether the timed-out invoices are always or somet
Original PR description
Recently, the Kenyan support team has been reporting a temporary increase in the number of timeouts when sending invoices to eTIMS, as well as associated issues (e.g. timed-out invoices turning out to be actually registered on eTIMS' side) which warrant further investigation. In order to reduce the number of timeouts and help diagnose (1) which API endpoints are timing out (which can tell us where we should implement retry mechanisms) and (2) whether the timed-out invoices are always or sometimes registered on eTIMS' side, we: - Increase the timeout of eTIMS calls to 2 minutes; - Log every timeout in the server logs; and - Log every invoice timeout in the invoice chatter. task-4624257 Forward-Port-Of: odoo/enterprise#80672
### 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#79591This commit is a patch to the following PR: https://github.com/odoo/enterprise/pull/76478#discussion_r1946575309 Steps to reproduce the bug: - Create two storable products “P1” and “P2”: - Tracked by Serial Number - Create a quality control point: - Operation: Receipt - Control per: Quantity - Create a receipt: - 10 units of P1 - 10 units of P2 - Mark it as "To Do." - Open the detailed operation of P1: - Assign two SNs: - SN1 - SN2 - Save. - The “Quantity” f
Original PR description
This commit is a patch to the following PR: https://github.com/odoo/enterprise/pull/76478#discussion_r1946575309 Steps to reproduce the bug:
- Create two storable products “P1” and “P2”:
- Tracked by Serial Number
- Create a quality control point:
- Operation: Receipt
- Control per: Quantity
- Create a receipt:
- 10 units of P1
- 10 units of P2
- Mark it as "To Do."
- Open the detailed operation of P1:
- Assign two SNs: - SN1 - SN2 - Save.
- The “Quantity” field of the P1 move is updated to 2.
- Mark the move of P1 as "Picked."
- Validate the receipt.
- The backorder wizard is triggered → Validate it.
Problem:
A wizard to process the quality check is triggered, but 12 quality checks (2 for P1 and 10 for P2) are loaded instead of only 2 for P1.
Expected Behavior:
Quality checks should only be triggered for picked moves
opw-4442564
Forward-Port-Of: odoo/enterprise#80467There is no reason to not reset the payment exception state if an invoice is in draft and the subscription has not to be paid before the invoice. Also reset the next payment date on reset of the order/subscription and also make it eligible to be invoiced via cron. **Reproduction/Rationale**: - Have a scenario where the invoice of a subscription is proposed to be posted manually instead of automatically posting it - The order might be to be signed but not marked to be paid for acceptanc
Original PR description
There is no reason to not reset the payment exception state if an invoice is in draft and the subscription has not to be paid before the invoice. Also reset the next payment date on reset of the…
There is no reason to not reset the payment exception state if an invoice is in draft and the subscription has not to be paid before the invoice. Also reset the next payment date on reset of the order/subscription and also make it eligible to be invoiced via cron. **Reproduction/Rationale**: - Have a scenario where the invoice of a subscription is proposed to be posted manually instead of automatically posting it - The order might be to be signed but not marked to be paid for acceptance - Therefore the signature will confirm the order and the subscription will be invoiced via cron later - The draft is, as stated, not a failure but the wanted behavior in this scenario and no payment exception is possible because there is no payment related and created on confirmation. As the approach is to automatically put the order into a payment exception it is very important to catch ALL the scenarios where it needs to be removed. (this approach should be reconsidered in master IMO as it is a trap and rabbit hole) Info: @wt-io-it Forward-Port-Of: odoo/enterprise#79391
ASP-ONE.FR is now a brand of Tessi Informatique and we have to update the information passed in the xml. task-4605970 Forward-Port-Of: odoo/enterprise#80219
Original PR description
ASP-ONE.FR is now a brand of Tessi Informatique and we have to update the information passed in the xml. task-4605970 Forward-Port-Of: odoo/enterprise#80219
A non-deterministic behavior resulted in fetching unexpected IDs from the `hr_recruitment_stage_report`. The SQL query is fixed and the non-deterministic behavior is gone now. The non-deterministic behavior was because the view query uses `ROW_NUMBER()` to generate the IDs dynamically in each query before union which results in records with duplicate ids, resulting in non-deterministic behavior. Three CTEs were used. Two CTEs were used to simplify the two queries before the union. A `global_cte
Original PR description
A non-deterministic behavior resulted in fetching unexpected IDs from the `hr_recruitment_stage_report`. The SQL query is fixed and the non-deterministic behavior is gone now. The non-deterministic behavior was because the view query uses `ROW_NUMBER()` to generate the IDs dynamically in each query before union which results in records with duplicate ids, resulting in non-deterministic behavior. Three CTEs were used. Two CTEs were used to simplify the two queries before the union. A `global_cte` is used to union both CTEs. A `ROW_NUMBER() OVER()` is used to assign sequential integers to rows, along with a necessary `ORDER BY` clause to ensure deterministic behavior. task-4440977 Forward-Port-Of: odoo/enterprise#80446
"Customs" was translated to "Pedimiento" instead of "Pedimento". Have also updated / re-exported the po and pot files to keep them in sync. opw-4507567 Forward-Port-Of: odoo/enterprise#79870 Forward-Port-Of: odoo/enterprise#78933
Original PR description
"Customs" was translated to "Pedimiento" instead of "Pedimento". Have also updated / re-exported the po and pot files to keep them in sync. opw-4507567 Forward-Port-Of: odoo/enterprise#79870 Forward-Port-Of: odoo/enterprise#78933
This PR aims to automatically set the status of a “Rejected” document to “Cancelled” while preserving the sequence number assigned by DGI (based on the CAE) to ensure all documents, including rejected ones, remain in the system with their original sequence. This is to maintain proper accounting records and provides visibility of all rejected documents. Forward-Port-Of: odoo/enterprise#76931
Original PR description
This PR aims to automatically set the status of a “Rejected” document to “Cancelled” while preserving the sequence number assigned by DGI (based on the CAE) to ensure all documents, including rejected ones, remain in the system with their original sequence. This is to maintain proper accounting records and provides visibility of all rejected documents. Forward-Port-Of: odoo/enterprise#76931
[FIX] l10n_ar: price unit precision digits on invoice report. This pr was created to adapt l10n_ar_reports/tests/IVA_Ventas.txt and l10n_ar_reports/tests/Ventas.txt files to the changes of https://github.com/odoo/odoo/pull/171131/commits/95bd2d3677f6b534e9eb660e9757e87cf778d7b5 Ticket Adhoc side: 77471 Task latam: 1226 Forward-Port-Of: odoo/enterprise#78415 Forward-Port-Of: odoo/enterprise#77800
Original PR description
[FIX] l10n_ar: price unit precision digits on invoice report. This pr was created to adapt l10n_ar_reports/tests/IVA_Ventas.txt and l10n_ar_reports/tests/Ventas.txt files to the changes of https://github.com/odoo/odoo/pull/171131/commits/95bd2d3677f6b534e9eb660e9757e87cf778d7b5 Ticket Adhoc side: 77471 Task latam: 1226 Forward-Port-Of: odoo/enterprise#78415 Forward-Port-Of: odoo/enterprise#77800