Friday, February 7, 2025
3 changes · saas-17.4
Resolved issues and error corrections
Point of Sale now correctly links related records that are loaded together with an order, such as accounting records used by localizations. This prevents errors during order capture and payment flows, improving reliability for affected POS users.
Original PR description
Before this commit, if a many2one field was loaded with its data, it would not get connected. For example, in the Chilean localization, the account_move is loaded when capturing an order, but it would not get linked, causing an error. opw-4479284 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix makes Odoo's data loading process return consistent results in edge cases, preventing errors during setup or updates. It particularly helps accounting chart template loading handle duplicate existing records more safely, reducing the risk of failed module initialization or upgrades.
Original PR description
the return value of _load_records is defined as :return: the records corresponding to ``data_list`` which means the len(_load_records(data_list, ..)) == len(data_list) while in some corner cases it…
the return value of _load_records is defined as :return: the records corresponding to ``data_list`` which means the len(_load_records(data_list, ..)) == len(data_list) while in some corner cases it is not satisfied ========================================================= This 1st commit is the first approach to fix the problem (check diff for the first commit) since during `_load_records`, each `data` in `data_list` is modified with key 'records' (fixed: in some corner cases, data['records'] won't be assigned and may case KeyError when return). I think it is OK to add one more key 'state'/'modified' in the data as a hack to identify data for new created records. I personaly think the name `ignore_duplicates` is quite confusing. My gut feeling is either during or after `_load_records` there will be duplicated records or xml_Ids and they are acceptable for sake of `ignore`. But I haven't found a better name. ========================================================= The 2nd commit is the second approach to fix the problem (check diff for the whole PR) This approach uses one extra query per model in `_load_data` for account to filter out data for existing records before `_load_records` to avoid modifying `base`. NOTE: previously `ignore_duplicate` won't update existing records but can update their xml_ids, not sure if it is a side-effect or designed feature. 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
Spanish (LATAM) PDFs for Colombian DIAN supplier bills and supplier credit notes now show the correct official document names. This avoids confusing or incorrect labels on documents shared with suppliers or used for compliance.
Original PR description
**Steps to reproduce:** Use a Colombian company. Configure DIAN / Carvajal (company, product, and supplier) as per documentation. Change the language to Spanish (LATAM). Create a new Purchase Order…
**Steps to reproduce:** Use a Colombian company. Configure DIAN / Carvajal (company, product, and supplier) as per documentation. Change the language to Spanish (LATAM). Create a new Purchase Order using the supplier and the product: - Receive the product. - Create the Vendor Bill: - Change the Journal to the DIAN Support Documents journal and set the date. - Using the actions, print the invoice (even without payment) and look at the document title. [](https://github.com/user-attachments/files/18359586/SEDS_2025_01_0014.pdf) - Create a Credit Note: - Using the actions, print the credit note (even without payment) and look at the document title. [](https://github.com/user-attachments/files/18359584/RSEDS_2025_01_0009.pdf) --- **Issue:** DIAN vendor bills and vendor credit notes display `Factura de proveedor` and `Nota de crédito de proveedor`. --- **Expected:** DIAN vendor bills and vendor credit notes should display `Documento Soporte` and `Nota de Ajuste del Documento Soporte`. --- **Cause:** Vendor bills and credit notes are not managed by Colombian's EDI nor DIAN modules but only by the Account module. --- **Fix:** Add DIAN-specific `Vendor Bill` and `Vendor Credit Note` translations. Manage the title replacement in the generated file if the PDF generation is done by the DIAN module. [](https://github.com/user-attachments/files/18359493/SEDS_2025_01_0013.pdf) [](https://github.com/user-attachments/files/18359499/RSEDS_2025_01_0008.pdf) --- **Task References:** opw-4423439 opw-4433918