Wednesday, January 28, 2026
22 changes · saas-19.1
New functionality added to Odoo
This update introduces a new module to help companies prepare CSRD and VSME sustainability reports. It leverages existing Odoo data (like emissions and employee information) and AI suggestions to streamline the reporting process, ensuring compliance with EU regulations and providing stakeholders with reliable ESG data.
Original PR description
In this PR, we add the possibility to create and manage a complete CSRD/VSME report, integrated with AI, knowledge, survey and HR. The Corporate Sustainability Reporting Directive (CSRD) is a legal…
In this PR, we add the possibility to create and manage a complete CSRD/VSME report, integrated with AI, knowledge, survey and HR. The Corporate Sustainability Reporting Directive (CSRD) is a legal framework in the EU that requires companies to report on their sustainability performance. It aims to standardize ESG reporting across the EU and make the information more comparable and reliable for investors and other stakeholders. On the other hand, the Voluntary Sustainability Reporting for Micro and Small Enterprises (VSME) is a framework designed to support smaller companies in reporting on their sustainability performance. It encourages clear, comparable, and meaningful ESG disclosures while remaining proportionate to the size and capacity of the business. Our reporting feature facilitates the steps involved in preparing a CSRD/VSME report by using the data we already have in Odoo, such as emissions (Scope 1, 2, 3), employee data, supplier and client information, or fleet metrics. As well as using AI to make suggestions, and integrating knowledge articles and surveys. More precisely, the feature is composed of two main models: - A new model (`esg.metric)` that is only used if the CSRD reporting is enabled (and only used in the context of CSRD reporting). It is linked to an ESRS data point (either Environmental, Social or Governance category) and can be of different types (Positive/Negative Impact, Risk or Opportunity). It is used to assess if a topic is material or not (Double Materiality Assessment), depending on the impact severity and financial severity scores. As well as scores obtained from the stakeholder reviews (we get those scores from surveys that have been completed, the surveys are sent with the action "Stakeholder Review"). To help the user to create relevant metrics, we added an AI feature allowing to generate suggestions of metrics. Provided that the user gives a description of the company (size, revenues, activity, etc) to give as much context as possible to the AI prompt (see action "AI Suggest"). - A new model (`esg.report`) where you can specify the type of the report (CSRD or VSME), the dates (reporting date and base reference date), and additional information about the company. Once created, the report is linked to a knowledge article that contains the template of a complete CSRD/VSME report that you can edit, fold/unfold sections, add content, etc. When printing it to PDF, a lot of information is automatically filled in (data about your employees, accounting data, etc), including the carbon report, dynamic tables. That is done by replacing placeholders from the knowledge article when generating the PDF (an appendix includes all available placeholders with a small explanation for each). For CSRD reports only, there is the ability to automatically fold/unfold the ESRS sections of the articles depending on whether the data points we get from the metrics are material or not (see action "Update Materiality"). For VSME reports only, there is a "Basic Module + Comprehensive Module" type that will include additional sections (C1-C9). Note that you can also load them manually from the root article with the "Load Template" action. task-5172829 Forward-Port-Of: odoo/enterprise#96759
This update introduces a new version of the Partner Ledger report specifically tailored for Indonesia. It now groups transactions by the PAN entity, a key requirement for Indonesian tax reporting. Previous duplicate code has been removed to improve report efficiency and accuracy.
Original PR description
Backport of :- https://github.com/odoo/enterprise/pull/105011 task-4975468
Enhancements to existing features
This update enhances the Point of Sale interface by providing a clear view of LNA permission status. A new button in the navigation bar displays the current status and opens a popup with detailed information, ensuring users understand access rights related to LNA functionality. This improves transparency and operational efficiency.
Original PR description
Before this commit it was not possible to know if LNA permission was granted, denied or not yet granted from the POS interface. This commit adds a button in the navbar to show the current LNA status and open a popup with more information. taskId: 5874947 Forward-Port-Of: odoo/odoo#245668
Resolved issues and error corrections
This update resolves several issues impacting the Point of Sale and Self-Order experiences. Specifically, customers can now successfully scan QR codes and pay orders, and deleting products followed by releasing a table now functions correctly. These fixes improve overall usability and prevent frustrating user experiences.
Original PR description
- FIXED: Scan QR code & pay order. Move to another table, stuck at previous table (client has to clear cache). - FIXED: Bug when you delete a product and click on release table, nothing happens. They have to validate the table with prices at 0. Forward-Port-Of: odoo/odoo#243894
This update resolves an issue where installing a new chart of account would automatically delete existing records. The change now allows for controlled deletion, ensuring data integrity during chart of account updates. This prevents data loss and maintains accurate financial records.
Original PR description
When installing a chart of account, previous records are deleted to be replaced by the one of the installed chart. Since odoo/odoo@4400130eb32, we need to explicitly check for force_delete flag. Use the renamed method _read_group
This update resolves an issue where the undo function in the website translation builder wouldn't work when a color code dialog was open. The fix ensures the dialog appears after hotkeys are bound, allowing the undo action to correctly revert changes. This improves the user experience for website translation editing.
Original PR description
The builder uses `useHotkey` to bind the shortcuts for undo/redo. But when entering translate mode, if the dialog about color code appears, the hotkeys are associated with the active element of the dialog, and thus are skipped on dispatch when in the builder (and the dialog is closed). This commit shows the dialog in `onMounted` of the builder, instead of `onWillStart`, so that the dialog appears just after (instead of just before) the hotkeys are bound to the active element. Steps to reproduce: - On a DB with a website in several languages - Open the website builder in translate mode - Discard the dialog explaining the color code. This is the dialog needed to trigger the bug. If the dialog does not appear, try with a new private window - Do some edits in the page - Click in the sidebar (otherwise keys are handled in the iframe) - Press `ctrl+z` - Bug: it does not "undo" task-5481935 Forward-Port-Of: odoo/odoo#245882 Forward-Port-Of: odoo/odoo#243137
This update resolves an issue where opening the Shop Floor from the replenishment flow caused a JavaScript error. The fix ensures the application name is correctly identified, preventing a 'null' error and ensuring smooth navigation. This improves the user experience when using the Shop Floor feature.
Original PR description
Opening the Shop Floor via the replenishment/forecast flow can raise a js traceback. **Steps to produce:** - Install `mrp` module. - Enable `multi-step routes` from the settings. - Inventory >…
Opening the Shop Floor via the replenishment/forecast flow can raise a js traceback. **Steps to produce:** - Install `mrp` module. - Enable `multi-step routes` from the settings. - Inventory > Configuration > Warehouse Management > Routes. - In Manufacture route, make sure route is Applicable On `products`. - Inventory > Products > Products > New. - Click on forcasted button on product > Click on replenish button > Confirm. - Click the Manufacturing Order shown in the notification. - Confirm the MO and click Shop Floor. **Issue:** A JavaScript error occurs: `TypeError: Cannot read properties of null.` **Root cause:** The Shop Floor view relies on the menu service to determine the current application name by calling `this.menu.getCurrentApp().name`. When the Shop Floor is opened from the replenishment/forecast flow, the navigation occurs through action-based triggers rather than through the main menu. As a result, no menu selection is performed and `setCurrentMenu()`[1] is not executed beforehand.This leaves the current application undefined, causing `menu.getCurrentApp()` to return undefined and leading to a js traceback when `.name` is accessed. [1]: https://github.com/odoo/odoo/blob/c646cb61d0752250b2600413d6d63deabd1d3e6d/addons/web/static/src/webclient/menus/menu_service.js#L57-L64 simillar fix : https://github.com/odoo/enterprise/pull/93043 Note: A tour is possible but unnecessary for this small use-case. opw-5462965 --- Forward-Port-Of: odoo/enterprise#104706
This update fixes a reporting issue where the Delivery Date wasn't displayed on the DIN 5008 sale order report and its preview. The change ensures that users can accurately see the commitment date when generating this report, as confirmed by functional experts. This improves data visibility for compliance reporting.
Original PR description
**Steps to reproduce:** 1. Install modules `sale_management` and `l10n_din5008_sale` 2. Go to Settings, Configure Document Layout and set layout to DIN 5008 3. Create a new Sale Order 4. Set a…
**Steps to reproduce:** 1. Install modules `sale_management` and `l10n_din5008_sale` 2. Go to Settings, Configure Document Layout and set layout to DIN 5008 3. Create a new Sale Order 4. Set a customer, add a product, and fill in the Delivery Date (Other Info) 5. Click on Print and Preview **Issue:** The Delivery Date (commitment_date) is not displayed on: - The DIN 5008 sale order report - The sale order preview (portal view) Functional experts confirmed that the Delivery Date must be visible when using the DIN 5008 layout. **Cause:** The `commitment_date` field was not included in the DIN 5008 sale order report template nor in the preview view. **Solution:** This commit adds the Delivery Date information to: - The DIN 5008 sale order report template - The sale order portal/preview view **opw-5490651** **Before:** <img width="560" height="145" alt="image" src="https://github.com/user-attachments/assets/fb29cda1-d668-4682-aa04-12c613f248d8" /> <img width="861" height="268" alt="image" src="https://github.com/user-attachments/assets/615f259f-e0ff-4fb5-9852-1fdd75cda4c9" /> **After:** <img width="589" height="145" alt="image" src="https://github.com/user-attachments/assets/3f1a8d25-783a-4600-b07e-11b547bb326b" /> <img width="824" height="271" alt="image" src="https://github.com/user-attachments/assets/46b37469-5c72-4556-95e2-eaea0824c166" /> Forward-Port-Of: odoo/odoo#244917
This update corrects an error that occurred when creating invoices with a document number containing non-numeric characters. The fix ensures that document numbers for Chilean invoices (known as 'folios') are strictly numeric, aligning with regulatory requirements. This prevents errors during invoice confirmation and ensures data integrity.
Original PR description
An error currently occurs when a user tries to confirm an account move using a document number that isn’t purely numeric and contains ASCII characters other than digits. Steps to replicate: - Install…
An error currently occurs when a user tries to confirm an account move using a document number that isn’t purely numeric and contains ASCII characters other than digits.
Steps to replicate:
- Install `l10n_cl` with demo and switch to CL company.
- Create a new invoice and add customer as `Andes Innovación SpA`.
- Add a move line > Add a product, price and tax.
- Give Document Number as `11-11`.
- Save and Confirm.
Error:
```
File /home/odoo/odoo18/enterprise/account_accountant/models/account_move.py, line 119, in action_post
res = super().action_post()
File /home/odoo/odoo18/community/addons/account/models/account_move.py, line 5478, in action_post
self._post(soft=False)
File /home/odoo/odoo18/enterprise/l10n_cl_edi/models/account_move.py, line 161, in _post
move._l10n_cl_create_dte()
File /home/odoo/odoo18/enterprise/l10n_cl_edi/models/account_move.py, line 646, in _l10n_cl_create_dte
folio = int(self.l10n_latam_document_number)
ValueError: invalid literal for int() with base 10: '11-11'
```
Cause:
- Trying to convert the document number to integer which includes some characters that are not numeric causes the error.
Solution:
- Specifically for Chile, the document number (folio) cant include anything other than numbers (Check the Sources listed below).
- Added a constraint on the field `l10n_latam_document_number` which only allows numbers using regex.
Sources:
- https://www.sii.cl/pagina/clave/folio.htm : The official Internal Revenue Service website for Chile provides information on the standard folio, along with a sample.
- https://www.sii.cl/factura_electronica/formato_dte.pdf : Refer to PG:11, Sr No:3, which specifies that the Folio should be of type NUM, meaning it must contain only numeric characters.
- The folio is created [here] that will be sent later to the authorities in the form of xml.
[here]: https://github.com/odoo/enterprise/blob/5a8bdb586e2d0bf9948a2d0b4c5e30b3849c0414/l10n_cl_edi/template/dte_template.xml#L8
No ID
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#241505This update resolves a technical issue preventing refunds from printing correctly on Italian fiscal printers. The problem stemmed from a missing method in a component used for invoices. The developers re-introduced this method, ensuring refunds now print accurately after a refund is processed. This ensures accurate reporting for Italian businesses using the POS system.
Original PR description
Step to reproduce: - install `l10n_it_pos` - setup Italian fiscal printer for a pos - refund a order and print receipt Observation: receives a traceback ```js Caused by: TypeError:…
Step to reproduce: - install `l10n_it_pos` - setup Italian fiscal printer for a pos - refund a order and print receipt Observation: receives a traceback ```js Caused by: TypeError: ctx.this.order.getRefundInfo is not a function at Header.template (eval at compile (https://97822380-19-0-design-theme.runbot118.odoo.com/web/assets/debug/point_of_sale.assets_prod.js:16388:20), <anonymous>:11:62) (/web/static/lib/owl/owl.js:5807) at Fiber._render (https://97822380-19-0-design-theme.runbot118.odoo.com/web/assets/debug/point_of_sale.assets_prod.js:12364:38) (/web/static/lib/owl/owl.js:1783) at Fiber.render (https://97822380-19-0-design-theme.runbot118.odoo.com/web/assets/debug/point_of_sale.assets_prod.js:12356:18) (/web/static/lib/owl/owl.js:1775) at ComponentNode.initiateRender (https://97822380-19-0-design-theme.runbot118.odoo.com/web/assets/debug/point_of_sale.assets_prod.js:13036:23) (/web/static/lib/owl/owl.js:2455) ``` Cause: - A <Header/> component is used in invoices, which requires a method `getRefundInfo`. - commit [1] removes <Header> and its related files, - commit [2] removes dead code, hence removed `getRefundInfo` - commit [3] brings back <Header>, but the method was not reintroduced [1] https://github.com/odoo/enterprise/commit/3d532f6ee99884bce58a577eb68464e670fb059a [2] https://github.com/odoo/enterprise/commit/1b03fe15916b7b86f79efcbb63895ae0c4363ef9 [3] https://github.com/odoo/enterprise/commit/d745a72e3f43febb3b39054dc9315eca13d86e36 Fix: - Add the method back After fix: **image from simulator** <img width="600" height="300" alt="image" src="https://github.com/user-attachments/assets/f6caccca-caf6-477f-bf37-f942090535cc" /> opw-5485350 Forward-Port-Of: odoo/enterprise#105048
This update resolves a bug where the 'Not Sent' filter in payment views incorrectly displayed or showed no payments. The fix ensures the filter accurately identifies and displays payments that haven't been processed, providing users with a reliable view of pending actions.
Original PR description
The "Not Sent" filter in Payments list view was not returning the expected records. This was due to an incorrect domain condition in the search view. This commit updates the filter logic to properly…
The "Not Sent" filter in Payments list view was not returning the expected records. This was due to an incorrect domain condition in the search view. This commit updates the filter logic to properly identify payments that haven't been processed or sent, ensuring the filter displays the correct records to the user. **Description of the issue/feature this PR addresses:** This PR fixes a bug in the "Not Sent" search filter within the Payment views (Account Payments). Currently, the filter fails to accurately identify and display records that have not been sent, leading to an empty or incorrect list of results regardless of the sending payment's actual status. **Current behavior before PR:** When a user applies the "Not Sent" filter in the Payments list view (including both Customer and Vendor payments), the system returns incorrect records or no records at all. This is caused by an inconsistent domain definition that doesn't align with the internal field tracking the "sent" status of the payment. **Desired behavior after PR is merged:** The "Not Sent" filter will correctly filter the list to show only those payments where the "Sent" status is not True. This will provide users with an accurate view of pending actions for both Customer and Vendor payments, ensuring consistency across the accounting module. **Steps to reproduce:** 1. Navigate to the Accounting (or Invoicing) module. 2. Go to Vendors > Payments or Customers > Payments (the issue is global). 3. Ensure there are several payments in the list, some marked as "Sent" and others not yet sent. 4. Click on the Filters dropdown menu in the search bar. 5. Select the "Not Sent" filter. 6. Observe the results: Notice that the list either becomes empty or continues to show records that do not match the "Not Sent" criteria, failing to filter the data correctly. **video** https://drive.google.com/file/d/1NTKQ1tHWyZWfs3CPolfDTOMrqaDD9OcN/view --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245487
This update fixes a calculation error in the SYSCOHADA Profit and Loss report. The report was incorrectly adding values instead of subtracting them, leading to inaccurate gross margin figures. This ensures the report aligns with the official SYSCOHADA guidelines and provides correct financial reporting.
Original PR description
The SYSCOHADA gross margin is defined on page 330 - 331 of the document [Guide-d-application-du-SYSCOHADA.pdf](https://www.ohada.com/uploads/actualite/3504/Guide-d-application-du-SYSCOHADA.pdf). It…
The SYSCOHADA gross margin is defined on page 330 - 331 of the document [Guide-d-application-du-SYSCOHADA.pdf](https://www.ohada.com/uploads/actualite/3504/Guide-d-application-du-SYSCOHADA.pdf). It is TA (701) - RA (601) +/- RB (6031). TA and RA should always be positive and negative, respectively.
In the report "Profit and Loss (SYSCOHADA)", the line RA is negated. XA then subtracts this value from TA, adding the two values instead of subtracting them.
Steps to reproduce:
1. Create a new company on runbot.
2. In Accounting > Configuration > Settings, set their Fiscal Localization to Ginea - SYSCOHADA for Companies.
3. Make a MISC journal entry.
1. Set a credit of 110,000,000 on account 701100 and balance it with 411100.
5. Set a debit of 75,000,000 on account 601100 and balance it with 401100.
6. Set a credit of 5,000,000 on account 603100 and balance it with 411100.
7. Post the entry.
8. Navigate to Accounting > Reports > Profit and Loss.
9. Set the l10n version, Profit and Loss (SYSCOHADA).
10. Set the current date.
11. See XA = 110 million + 75 million + 5 million = 190 million; this does not match the example given on pg 357 of Guide-d-application-du-SYSCOHADA.pdf, where XA = 40 million.
[opw-5482300](https://www.odoo.com/odoo/project.task/project.task/5482300)
Forward-Port-Of: odoo/enterprise#104736
Forward-Port-Of: odoo/enterprise#104479This update resolves issues preventing correct SAF-T file generation for Romanian companies when partner information (country or name) is incomplete. The fix ensures accurate invoice exports by correctly formatting registration numbers and handling missing partner details, improving compliance for Romanian businesses.
Original PR description
Fix SAF-T export errors when partners have no country or name. For Romanian companies, the RegistrationNumber should be generated as “04 + partner ID” for customers not subject to VAT and with unknown CNP, without including the country code. Steps to reproduce country issue: - Configure a Romanian company with l10n_ro_saft installed - Create a contact without a country - Create and validate an invoice for this contact - Export the SAF-T file from the General Ledger report You you will get a TypeError because you cant concatenate Bool and String. Steps to reproduce name issue: - Create a main contact - Add a child contact without a name - Change the child type to “Company” - Create and validate an invoice - Export the SAF-T file from the General Ledger report This prevents KeyError when printing the first 70 characters of the partner name in the report. opw-5499918 Forward-Port-Of: odoo/enterprise#105579 Forward-Port-Of: odoo/enterprise#105020
This update resolves an issue where sale orders in Mexico (MX) could fail to process payments due to incomplete customer address information. The fix automatically enables 'CFDI to Public' when the address is missing, ensuring proper payment confirmation and preventing silent transaction errors. This improves the reliability of online payments for Mexican customers.
Original PR description
### Issue: On a Mexican sale order, it was possible to have an invalid partner address while `CFDI to Public` was not enabled In this situation, an online payment could be initiated, but a silent…
### Issue: On a Mexican sale order, it was possible to have an invalid partner address while `CFDI to Public` was not enabled In this situation, an online payment could be initiated, but a silent error occurred during move validation: the transaction was created, but the payment was never recorded, and no error appeared in the portal or the SO chatter ### Cause: The CFDI validation error is raised internally but never surfaced to the user https://github.com/odoo/enterprise/pull/91655 The PO (MIAL) recommended automatically enabling `CFDI to Public` when the partner address is incomplete, forcing the user to complete the data This also ensures that the payment can be confirmed properly ### Steps to reproduce: - Install `l10n_mx_edi_sale` and switch to the MX company - Configure a Payment Provider and Payment Method (e.g., demo) - Create a customer without ZIP or country - Create a Sale Order for that customer - In Other Info, set Online Payment to 100% - Send the quotation and open the link in a private window - Sign and Pay Before the fix: the transaction is created, but no payment is recorded, and no error is shown opw-5023724 Forward-Port-Of: odoo/enterprise#101881
This update corrects a bug where sales orders using multi-step warehouse routes didn't always deliver products to the intended final location. Previously, the system relied solely on push rules, leading to products being delivered to a general location instead of the specified sublocation. This fix ensures accurate delivery based on the configured route steps.
Original PR description
### Issue: Applying a push rule in attempt to reach a precise sublocation will not adapt the destination of the move based on the `final_location_id` but solely base the destination based on the push…
### Issue: Applying a push rule in attempt to reach a precise sublocation will not adapt the destination of the move based on the `final_location_id` but solely base the destination based on the push rule. This is sub-optimal as the existence of an other push rule from this parent location to the sublocation is quite unlikely and validating that new move will therefore not push the product to its `location_final_id`. ### Concrete problematic example: For instance, the `property_stock_customer` (Customer location) provides a precise `final_dest_id` to deliver the customer. While, in one step delivery (not relying on push mechanic), confirming a delivery will generate a delivery with `location_dest` set to the precise Customer location because of pull rules, in two steps, the final delivery ends up targeting the general `Partner/Customer` location. This is particularly impactful in case of automatic batching based on destination location. ### Steps to reproduce: - In the settings enable: Multi-Steps routes - Inventory > Configuration > Warehouse Management > Warehouses - Set your warehouse to delivery in 2 steps - Create a contact say BOB and in the sale & purchase tab of its form set the Customer Location to a sublocation of Partners/Customers say: Partners/Customers/BOB - Create and confirm a sale order for BOB for 1 unit of a any product - Validate the pick #### > The delivery and its move have `Partner/Customer` as `move_dest_id`. ### Cause of the issue: During the `_run_push`, we only adapt the `location_dest_id` to match the `location_final_id` in the case where the new move skip push: https://github.com/odoo/odoo/blob/61d2fb3bb3281f3455490ac6033b95e3c50b4e2b/addons/stock/models/stock_rule.py#L241-L245 However, in the present case where you push to a parent location of `location_final_id` the move does not `skip_push`: https://github.com/odoo/odoo/blob/61d2fb3bb3281f3455490ac6033b95e3c50b4e2b/addons/stock/models/stock_move.py#L2034-L2037 and the `location_dest` is the one of the rule: https://github.com/odoo/odoo/blob/61d2fb3bb3281f3455490ac6033b95e3c50b4e2b/addons/stock/models/stock_rule.py#L241-L242 https://github.com/odoo/odoo/blob/61d2fb3bb3281f3455490ac6033b95e3c50b4e2b/addons/stock/models/stock_rule.py#L266 opw-5070855 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245701 Forward-Port-Of: odoo/odoo#243828
This update resolves an issue where tax reverse charges weren't properly accounted for in BIS3 invoices. The system now correctly identifies and handles these charges as 'Prepaid Amounts,' ensuring accurate tax calculations and compliance. This improves the reliability of invoice generation for international transactions.
Original PR description
There is no WithholdingTaxTotal node in BIS3. You cannot report any negative tax amount as taxes. You can only report VAT taxes but tax reverse charge are not considered as VAT. This commit reports the tax reverse charge amount as a PrepaidAmount instead. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245849 Forward-Port-Of: odoo/odoo#240525
This update resolves a problem where users with custom tax groups (like PPH) would prevent EFaktur printing. The change ensures that only the six standard Odoo tax groups are considered, allowing invoices with custom groups to print correctly. It also corrects how tax values are calculated for invoices with mixed tax groups.
Original PR description
Description of the issue/feature this PR addresses: This issue occured because in the previous update we add a condition to restrict multiple tax groups excluding the STLG. Apparently there is a case…
Description of the issue/feature this PR addresses: This issue occured because in the previous update we add a condition to restrict multiple tax groups excluding the STLG. Apparently there is a case where some users create their own tax groups (for example for PPH) so when they want to print an efaktur it will raise an error. Current behavior before PR: If a user create their own tax with a new tax group (outside of the 6 groups defined in `l10n_id`) and use it in invoice line along with one of the 6 tax groups excluding the STLG then it will blocked the print efaktur because it will raise an error Desired behavior after PR is merged: - The restriction in tax groups only applied for the 6 tax groups in l10n_id so if an invoice line has multiple tax groups as long as there no more than one of the 6 tax groups excluding the STLG then it should be able to print the efaktur. - Also when building the efaktur coretax value, the new tax group should not be included in the regular_tax variable which will cause the value to be 11/12 of the original value. - Add new condition to block the print efaktur if there is a tax inside the invoice but none of it belong to the 6 ppn tax groups (there is already a condition to block if no tax is given, but now since there are cases where they use tax group outside of the defined tax groups then it will print the efaktur) - If an invoice line does not have any ppn_tax_groups but there are other line in the same invoice that has it then it will still be able to print the efaktur, but the line without the ppn tax will have the OtherTaxBase and VATRate set to zero which will calculate the VAT as 0 too. [5434656](https://www.odoo.com/odoo/project.task/5434656) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245951 Forward-Port-Of: odoo/odoo#241979
This update enhances the monitoring of our AI-powered features by changing key logs from 'debug' to 'info' for easier tracking by our team and database administrators. Additionally, the system now accurately reports LLM token usage, providing a more precise understanding of AI service consumption. This improves operational efficiency and cost management.
Original PR description
In this commit we change some important llm api usage logs from debug to info so they can be more easily monitored by us and database admins. We also change the usage reporting from a naive estimation (which greatly under-reported the token usage) to the actual token usage given to us by the LLM prodivers in the response.
This update ensures accurate payslip updates by implementing a necessary security measure – running operations with elevated permissions (sudo). This prevents errors related to users modifying their own payroll information and resolves a technical issue that was previously causing system instability. It improves the reliability of payroll processing.
Original PR description
From a previous PR (103147), the payslip update logic was moved to the write function which gets called when a field is changed. In doing so, a sudo call is necessary to avoid problems with users modifying their own record (and not having access rights to read slip_ids). This also applies to tests and solves the following runbot error: Runbot Error: 237743 Forward-Port-Of: odoo/enterprise#105287
This update resolves an issue where Odoo would crash when receiving Stripe webhook notifications for transactions that didn't exist in the system. Now, Odoo gracefully handles these events, logging a warning and returning a standard response to Stripe, preventing payment disruptions. This ensures continued reliable online payments.
Original PR description
Prior to this commit, receiving a Stripe webhook notification for a transaction that does not exist in Odoo (e.g., Point of Sale "card_present" payments) would cause an Internal Server Error (500). The issue occurred because the controller attempted to call `_verify_signature(tx_sudo)` even when `tx_sudo` was empty. Inside `_verify_signature`, accessing `tx_sudo.provider_id` on an empty record triggered a "ValueError: Expected singleton" crash. Consequently, Stripe would interpret these 500 errors as a server failure and automatically disable the webhook endpoint, breaking online payments. This commit fixes the issue by checking if `tx_sudo` exists before proceeding with signature verification. If no transaction is found, Odoo now logs a warning and returns a 200 OK status to gracefully acknowledge and ignore the extraneous event. opw-5439528 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245777
This update corrects a problem where new work entries didn't properly remove older entries, and incorrectly linked versions. The fix ensures work entries are accurately generated and nullified across different Odoo versions, improving the reliability of the HR work entry process. This resolves inconsistencies in regeneration behavior.
Original PR description
Problem ---------- 3 issues : - If you generate work entries for a new version it will not nullify the already generated work entries for the previous active version. - The version_id on the work entry is not set to the active version at the date of the work entry - The regenerate hasn't the same behavior if you call it from the wizard or from the front. Fix ---------- Remove the skip of versions that ends before the date_start of the generation. To go through the nullify process. Remove the double nullify in the regenerate in the case we have slots (we don't come from the wizard) Correct the `_set_current_contract` to give the good version for the date. Forward-Port-Of: odoo/odoo#245863
This update resolves an issue in the website editor where deleting snippets could cause a selection error, specifically in Chrome. The fix ensures that offsets are validated when retrieving selection data, preventing errors when the selection becomes invalid due to user actions like deleting snippets. This improves the stability and reliability of the website editor.
Original PR description
**Description of the problem** In the website editor, the user can manipulate the page in such a way to generate a problematic `SelectionPlugin.activeSelection`, which still points to an existing…
**Description of the problem** In the website editor, the user can manipulate the page in such a way to generate a problematic `SelectionPlugin.activeSelection`, which still points to an existing `anchorElement`, but has an invalid `offset`. **How to reproduce** This seems to be reproducible only on Chrome. 1. Enter in the website edit mode 2. Drop the `s_newsletter` snippet 3. Drop the `s_popup` snippet 4. Click on the popup, and delete it 5. Click on the blank space inside the `s_newsletter` snippet 6. Delete the `s_newsletter` snippet 7. The error occurs Notes: 1. Snippet different than `s_newsletter` can be used to reproduce the problem, as long as they contain a blank space. 2. It is important to make sure that the movement of the mouse pointer does not trigger any preview when going from step 5 to step 6. **Why the problem happens** On Chrome, clicking on a blank area can cause `document.getSelection()` to return a selection with a null `anchorNode.` When this happens, `SelectionPlugin.getSelectionData()` will use the already existing `activeSelection` if `activeSelection.anchorNode` is still connected. Before this commit, this method only checked that `anchorNode` was connected, without validating offsets. This leads to the following edge case: 1. The user removes the `s_popup` 2. At this point, `document.getSelection()` would point to the `s_newsletter` snippet, so if the user just deletes the snippet nothing bad would happen. But instead, if: 3. The user clicks on a blank area in `s_newsletter`, `document.getSelection()` will now return a null `anchorNode` 4. The user delete the `s_newsletter` snippet, and `SelectionPlugin.getSelectionData()` is called by an handler after the deletion 5. At this point: `document.getSelection()` has a null `anchorNode`, so the method will check if `activeSelection.anchorNode` is still connected, WITHOUT validating the offsets. 6. Since `anchorNode` is still connected, this selection will be used, and an error will be triggered shortly after, because the offset is too high (pointing to `s_popup` which does not exist anymore). **Fix** After this commit, when `SelectionPlugin.getSelectionData()` checks that `activeSelection.anchorNode` is still connected it also checks that the offsets are valid (meaning that they are smaller than the number of nodes). task-5430500 Forward-Port-Of: odoo/odoo#245818 Forward-Port-Of: odoo/odoo#244331