Thursday, March 13, 2025
18 changes · master
New functionality added to Odoo
The Planning calendar now supports creating and deleting multiple schedule entries at once, especially in the month view. This helps teams manage larger planning changes faster and with fewer repetitive actions.
Original PR description
task-4510549
Enhancements to existing features
This update aligns several enterprise apps with a newer way of loading messaging session data. It mainly updates automated tests so accounting, knowledge, and Studio workflows continue to work reliably after the underlying loading process changes.
Original PR description
*: account_accountant, web_studio This is the counterpart of the community, this commit adapts tests to support the RPC /mail/data to the lasy_session_info RPC task-4341388
Resolved issues and error corrections
The VoIP systray now honors a user's Do Not Disturb status before triggering ringtone behavior. This prevents unwanted call sounds when users have indicated they should not be interrupted.
Original PR description
Adapt the condition in VoIP systray item code so that it takes into account the Do Not Disturb (DND) status and doesn't play the ringtone when it shouldn't.
Miscellaneous changes
We support sending credit transfers using ISO 20022 to accommodate non SEPA bank transfers (any party having no IBAN number). However when generating the XML file, we assumed that our company always had an IBAN number and put it in an IBAN node. For non IBAN numbers however we need to put it in another node. This commit fixes that. [opw-4585994](https://www.odoo.com/odoo/project.task/4585994) Forward-Port-Of: odoo/enterprise#81102 Forward-Port-Of: odoo/enterprise#80757
Original PR description
We support sending credit transfers using ISO 20022 to accommodate non SEPA bank transfers (any party having no IBAN number). However when generating the XML file, we assumed that our company always had an IBAN number and put it in an IBAN node. For non IBAN numbers however we need to put it in another node. This commit fixes that. [opw-4585994](https://www.odoo.com/odoo/project.task/4585994) Forward-Port-Of: odoo/enterprise#81102 Forward-Port-Of: odoo/enterprise#80757
Field Service users can now see the add stage button directly in the Kanban view when working with a single Field Service project. This makes it easier to create new workflow stages from task and planning views without leaving the current screen.
Original PR description
Before this commit: The add stage button is not visible in the Kanban view of FSM, making it difficult for users to add new stages. This commit makes the add stage button visible in the FSM kanban view when a single FSM project exists, allowing users to add new stages directly from the kanban view. In the 'My Tasks' menu, it is visible when grouped by stage. Affected menus: - My Tasks: Tasks, Map - All Tasks: All Tasks, To Schedule, To Invoice - Planning: By User, By Project, By Worksheet Template, By Location task-4573727
To reproduce: - create two repeating planning.slot records, Shift A and Shift B - delete Shift A and all of its repeats - delete only the last repeat of Shift B - run the "Planning: generate next recurring shifts" scheduled action - Cron fails with "record is missing or deleted" error Problem: The function to create the repeat shifts (planning.recurrency _repeat_slot) iterates over recurrences and deletes them if there are 0 existing shifts linked to them (i.e. Shift A's reccurency). On
Original PR description
To reproduce: - create two repeating planning.slot records, Shift A and Shift B - delete Shift A and all of its repeats - delete only the last repeat of Shift B - run the "Planning: generate next recurring shifts" scheduled action - Cron fails with "record is missing or deleted" error Problem: The function to create the repeat shifts (planning.recurrency _repeat_slot) iterates over recurrences and deletes them if there are 0 existing shifts linked to them (i.e. Shift A's reccurency). On a subsequent loop iteration, an attempt is made to access the company_id field of the recordset (self) which will now contain a deleted planning.recurrency record, causing the missing record error. Solution: Access the company_id field on the current iterated planning.recurrency record instead of the 'self' recordset. opw-4457844 X-original-commit: b3742b576e67f0391db0e5fcf138950c6275e770 Forward-Port-Of: odoo/enterprise#81301
Outgoing emails now contain more message IDs in references to help thread formation. This is notably due to parent_id being the first thread message, hence often technical, and this cause issues in multi odoo communications. This increases a bit query counters when sending emails. Indeed when preparing outgoing emails we now have to search for messages, and check for subtype details, which means additional queries. See community PR for more details. Task-4559249 Forward-Port-Of: odoo/e
Original PR description
Outgoing emails now contain more message IDs in references to help thread formation. This is notably due to parent_id being the first thread message, hence often technical, and this cause issues in multi odoo communications. This increases a bit query counters when sending emails. Indeed when preparing outgoing emails we now have to search for messages, and check for subtype details, which means additional queries. See community PR for more details. Task-4559249 Forward-Port-Of: odoo/enterprise#81104 Forward-Port-Of: odoo/enterprise#79048
In case of having two lines with the same product, the cfdi field `ValorUnitarioAduana` is wrong, it is set as the total of the two lines. With this commit, we set it as the average of the lines. Steps (with demo data, company `ESCUELA ...`): - Partner "Azure Interior" -> change `Tax ID` from `US12345677` to `123456779` - Product `[E-COM06]` -> - `UNSPC Catgegory`: `01010101` - `Tariff Fraction`: `0101290200` - `UMT Aduana`: `Units` - Make an invoice: - Currency: USD - Two lines for pro
Original PR description
In case of having two lines with the same product, the cfdi field `ValorUnitarioAduana` is wrong, it is set as the total of the two lines. With this commit, we set it as the average of the lines. Steps (with demo data, company `ESCUELA ...`): - Partner "Azure Interior" -> change `Tax ID` from `US12345677` to `123456779` - Product `[E-COM06]` -> - `UNSPC Catgegory`: `01010101` - `Tariff Fraction`: `0101290200` - `UMT Aduana`: `Units` - Make an invoice: - Currency: USD - Two lines for product `[E-COM06]` - Incoterm: `[EXW] EX WORKS` - External Trade: `Definitive` - Confirm and sent to cfdi -> Error opw-4596628 Forward-Port-Of: odoo/enterprise#81205 Forward-Port-Of: odoo/enterprise#80660
Before the PR: As could be experienced, the SII sometimes sends responses that are not encoded properly, or instead of responding with an XML, the response is an HTML instead. As a consequence of this, a bug was discovered in the response after uploading an AEC file (stands for electronic yielding file in Spanish). After the PR: We added a special parser method, that before transforming the response to a parsed XML, analyzes the encoding, and concludes in an html parsing and posting it to th
Original PR description
Before the PR: As could be experienced, the SII sometimes sends responses that are not encoded properly, or instead of responding with an XML, the response is an HTML instead. As a consequence of this, a bug was discovered in the response after uploading an AEC file (stands for electronic yielding file in Spanish). After the PR: We added a special parser method, that before transforming the response to a parsed XML, analyzes the encoding, and concludes in an html parsing and posting it to the chatter to inform the user. This is difficult to debug since the possible undocumented responses are not easy to reproduce in an SII test environment, so we applied this method only to a particular case, found in some situations for some users. Forward-Port-Of: odoo/enterprise#80002
When a receipt was generated on a german company the tss information where not displayed on it. Steps to reproduce: ------------------- * Set up fiskaly on german company * Make a sale on the PoS * Go to the receipt screen > Observation: No tss information is displayed opw-4581169 Forward-Port-Of: odoo/enterprise#81070
Original PR description
When a receipt was generated on a german company the tss information where not displayed on it. Steps to reproduce: ------------------- * Set up fiskaly on german company * Make a sale on the PoS * Go to the receipt screen > Observation: No tss information is displayed opw-4581169 Forward-Port-Of: odoo/enterprise#81070
### 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#80244
Forward-Port-Of: odoo/enterprise#76301Enterprise counter-part. task-4637944 https://github.com/odoo/odoo/pull/201228 Forward-Port-Of: odoo/enterprise#81279 Forward-Port-Of: odoo/enterprise#81177
Original PR description
Enterprise counter-part. task-4637944 https://github.com/odoo/odoo/pull/201228 Forward-Port-Of: odoo/enterprise#81279 Forward-Port-Of: odoo/enterprise#81177
A potential access right issue appears in the case a simple HR user accessed the employee view without payroll rights since source-tax mutations are restricted to payroll users. opw-4607112 Forward-Port-Of: odoo/enterprise#81200
Original PR description
A potential access right issue appears in the case a simple HR user accessed the employee view without payroll rights since source-tax mutations are restricted to payroll users. opw-4607112 Forward-Port-Of: odoo/enterprise#81200
Ensure that the correct fiscal position is used in `test_generate_ec_sales_list_activity`. Previously, the search for a fiscal position did not filter by the company where the invoice was created. As a result, it returned the latest "Intra-Community" fiscal position in the database for the allowed companies, potentially leading to incorrect assignments. This commit adds a call to `_check_company_domain` in the search domain, ensuring that the fiscal position is correctly retrieved for the
Original PR description
Ensure that the correct fiscal position is used in `test_generate_ec_sales_list_activity`. Previously, the search for a fiscal position did not filter by the company where the invoice was created. As a result, it returned the latest "Intra-Community" fiscal position in the database for the allowed companies, potentially leading to incorrect assignments. This commit adds a call to `_check_company_domain` in the search domain, ensuring that the fiscal position is correctly retrieved for the intended company. Bug introduced by: https://github.com/odoo/enterprise/commit/d684d074af82fbd0fac6b3a1c56b4e01a17dd74a runbot-145700 Forward-Port-Of: odoo/enterprise#81260
### Steps to reproduce: - install l10n_ec_edi_pos - Create a new POS in the EC Company. - With a use without inventory adminstrator access rights: - Open a pos session, select any product and a custome linked to the EC localisation. - Try to validate the POS order that is invoiced using the cash payment method. #### > An access error is raised with respect to the `stock_valuation_layer_ids` fields of the account.move model ### Cause of the issue: Clicking on validate will launch a
Original PR description
### Steps to reproduce: - install l10n_ec_edi_pos - Create a new POS in the EC Company. - With a use without inventory adminstrator access rights: - Open a pos session, select any product and a…
### Steps to reproduce: - install l10n_ec_edi_pos - Create a new POS in the EC Company. - With a use without inventory adminstrator access rights: - Open a pos session, select any product and a custome linked to the EC localisation. - Try to validate the POS order that is invoiced using the cash payment method. #### > An access error is raised with respect to the `stock_valuation_layer_ids` fields of the account.move model ### Cause of the issue: Clicking on validate will launch a call of the `syncAllOrders` method. During this call, missing records will be fetched recursisvely here: https://github.com/odoo/odoo/blob/2108ad3f7c851eeceb84d7459485a18e1574fa64/addons/point_of_sale/static/src/app/store/pos_store.js#L1271 (Note that this call does not exist prior to 18.0). However, as the data contains a pos order that is related to account moves and since the `account.move` model of the localisation inherit from the `pos.load.mixin`: https://github.com/odoo/enterprise/blob/efa1853cf1f9bbd945a91971ffe40c6906482063/l10n_ec_edi_pos/models/account_move.py#L6-L8 the account move will be fetched as a related record to the pos order and we will launch a `read` for the `fields=[]`: https://github.com/odoo/odoo/blob/2108ad3f7c851eeceb84d7459485a18e1574fa64/addons/point_of_sale/static/src/app/models/data_service.js#L513-L515 https://github.com/odoo/odoo/blob/2108ad3f7c851eeceb84d7459485a18e1574fa64/addons/point_of_sale/models/pos_load_mixin.py#L9-L11 However, a read performed with a false value in the `fields` tries to read the value of each field on the records: https://github.com/odoo/odoo/blob/2108ad3f7c851eeceb84d7459485a18e1574fa64/odoo/models.py#L3792-L3798 This includes protected fields such as the `stock_valuation_layer_ids` that can only be read by user's with administrator stock access rights. opw-4498024 Forward-Port-Of: odoo/enterprise#80156
In this commit: === - Integrated Rappi as a provider in pos_urban_piper. task-4632154 Forward-Port-Of: odoo/enterprise#80923
Original PR description
In this commit: === - Integrated Rappi as a provider in pos_urban_piper. task-4632154 Forward-Port-Of: odoo/enterprise#80923
Create a new module to export payroll data for Acerta. **NOTE during fw port I need to move the test for the other ss to the main test module** task-3750799 Forward-Port-Of: odoo/enterprise#71683
Original PR description
Create a new module to export payroll data for Acerta. **NOTE during fw port I need to move the test for the other ss to the main test module** task-3750799 Forward-Port-Of: odoo/enterprise#71683
Forward-Port-Of: odoo/enterprise#81135
Original PR description
Forward-Port-Of: odoo/enterprise#81135