Monday, June 9, 2025
3 changes · 17.0
Miscellaneous changes
<b>Steps to reproduce :</b> 1) Install the Purchase module 2) Create and confirm a Purchase Order with a product and quantity 3) From the Purchase Order, open the product and archive it <b>Issue:</b> Before archiving the product, the `Purchased` smart button correctly displays the total purchased quantity. However, after archiving the product template, this smart button displays `0.0`, even though purchases exist. Additionally, clicking the button opens a blank purchase order
Original PR description
<b>Steps to reproduce :</b> 1) Install the Purchase module 2) Create and confirm a Purchase Order with a product and quantity 3) From the Purchase Order, open the product and archive it <b>Issue:</b>…
<b>Steps to reproduce :</b> 1) Install the Purchase module 2) Create and confirm a Purchase Order with a product and quantity 3) From the Purchase Order, open the product and archive it <b>Issue:</b> Before archiving the product, the `Purchased` smart button correctly displays the total purchased quantity. However, after archiving the product template, this smart button displays `0.0`, even though purchases exist. Additionally, clicking the button opens a blank purchase order line view instead of showing related records if the product is archived. <b>Cause:-</b> Archiving a product template sets active=False on the template and its variants. The computed field `purchased_product_qty` relies on the variants to calculate the total. Because the variants are inactive post-archival, the compute method sees no records, resulting in a displayed value of 0.0. Similarly, the smart button action uses the active variants in its domain, so it fails to find any related purchase order lines. <b>Solution:</b> The context is now explicitly set with active_test=False when computing the purchased_product_qty and when generating the domain for the smart button action. This ensures that even inactive variants are included in the calculation and the view logic, preserving the correct purchased quantity and showing the relevant purchase lines after archival. opw-4781578 Forward-Port-Of: odoo/odoo#209955
Currently, the VAT is split into two columns only if the VAT code consists solely of numeric values. However, in practice, VAT code may contain a combination of letters and numbers. **Steps to reproduce :** 1) Install `l10n_de_reports` and switch to the `DE` company 2) Create a partner with VAT as `NL000099998B57` from contacts 3) Now create a confirmed invoice for the above created partner 4) Go to "Accounting / Reporting / Audit Reports / General Ledger" 5) Download "DATEV DATA (Z
Original PR description
Currently, the VAT is split into two columns only if the VAT code consists solely of numeric values. However, in practice, VAT code may contain a combination of letters and numbers. **Steps to…
Currently, the VAT is split into two columns only if the VAT code consists solely of numeric values. However, in practice, VAT code may contain a combination of letters and numbers. **Steps to reproduce :** 1) Install `l10n_de_reports` and switch to the `DE` company 2) Create a partner with VAT as `NL000099998B57` from contacts 3) Now create a confirmed invoice for the above created partner 4) Go to "Accounting / Reporting / Audit Reports / General Ledger" 5) Download "DATEV DATA (ZIP)" and check "EXTF_customer_account.csv" **Issue:** Notice that the VAT was not split into country and VAT code for the above created partner. **Cause:** Previously, the code only split the VAT into country code and VAT code if the first two characters were alphabetic and the remainder was numeric. https://github.com/odoo/enterprise/blob/35944a38d306ea881e08e1d51ca77a3eab3a6e36/l10n_de_reports/models/datev_export_csv.py#L220-L227 This approach is insufficient because many countries have VAT codes that include both letters and numbers. For example vat formats for `NL` and `AT` https://business.gov.nl/finance-and-taxes/vat/numbers-for-vat/ https://ec.europa.eu/taxation_customs/vies/#/faq So by only checking whether the VAT code is numberic is not a valid thing. **Solution:** The code now uses the partner’s `_split_vat` method to separate the country code and VAT code whenever a VAT is provided and has more than two characters. It then validates the split VAT using the `simple_vat_check` helper method. If the VAT is valid, the country code (in uppercase) and the VAT code are output in separate columns; otherwise, the original VAT value is kept. This change ensures that VAT numbers with alphanumeric codes are correctly handled and split into their respective columns. opw-4820929 Forward-Port-Of: odoo/enterprise#86992
The aim of this commit is to provide a NIS code mapping for every country created by default in Odoo. Before this commit: If a 281.50 was created for someone in one of these countries, it would miss the `f2112_buitenlandspostnummer` field in the xml file resulting in the administration rejecting the file. After this commit: A pragmatic completion is made for those countries in `f2112_buitenlandspostnummer`. task: None Forward-Port-Of: odoo/enterprise#87081
Original PR description
The aim of this commit is to provide a NIS code mapping for every country created by default in Odoo. Before this commit: If a 281.50 was created for someone in one of these countries, it would miss the `f2112_buitenlandspostnummer` field in the xml file resulting in the administration rejecting the file. After this commit: A pragmatic completion is made for those countries in `f2112_buitenlandspostnummer`. task: None Forward-Port-Of: odoo/enterprise#87081