Wednesday, November 20, 2024
3 changes · 17.0
New functionality added to Odoo
This update replaces the outdated FedEx SOAP API with the current REST API offered by FedEx. This ensures continued functionality and access to the latest FedEx shipping features, improving our integration with this key logistics provider.
Original PR description
The existing FedEx implementation used the old FedEx SOAP API which is no longer in development. This new version makes use of the current REST APIs available at developer.fedex.com task-3759206 Forward-Port-Of: odoo/enterprise#73579
Resolved issues and error corrections
This update fixes a rounding issue in the Mexican CFDI invoice generation process. The change ensures that the subtotal and discount values are calculated accurately, aligning with Mexican tax regulations. This improves the reliability of invoices for Mexican customers.
Original PR description
### Steps to reproduce the issue: 1. Activate Mexican Localization 2. With a Mexican Company, create an Invoice and add a Product with a valid UNSPSC code 3. On the Invoice Line, set Price to 1030.17…
### Steps to reproduce the issue:
1. Activate Mexican Localization
2. With a Mexican Company, create an Invoice and add a Product with a valid UNSPSC code
3. On the Invoice Line, set Price to 1030.17 and add a 3% Discount
4. Confirm then Send & Print (with CFDI checked)
5. In the generated XML, the following values are off:
- In node "Comprobante, SubTotal="1030.16" Descuento="30.90"
- In node "Concepto", ValorUnitario="1030.16" Importe="1030.16" Descuento="30.90"
- Expected are 1030.17 and 30.91
### Explanation:
During the calculation of the values for the CFDI, `gross_price_subtotal_before_discount` is calculated using `price_subtotal` in every case where `discount` is not 100%. This is due to other values affecting `price_subtotal` (e.g.: taxes with `price_include=True`), in which case calculating a value related to `price_subtotal` with `price_unit` would give the wrong result.
This calculation method causes rounding issues such as above because `price_subtotal` is rounded before calculating `gross_price_subtotal_before_discount`.
### Fix reasoning:
We need to account for any value that could affect `price_subtotal` and make it different from `price_unit * quantity` except for `discount`, which will be included when comparing both values.
The case `discount == 100.0` is covered by this new condition as well, since `discount_factor` would equal to 0 and `price_subtotal` too.
opw-4183556This update resolves an issue where new states were incorrectly created for Amazon orders, leading to data inconsistencies and confusion. The change now creates an activity for the sales representative to manually set the correct state, ensuring data accuracy and preventing disruptions to related workflows.
Original PR description
Before this commit contact created from amazon order create new state if it does not find matching state in odoo and it was causing issues like having record multiple record for same state and user don't know which one is right with proper code in data. This commit stop creating new state instead create activity on contact for amazon sale person to set proper state on the related contact to not break flows that are related to contact's state. Backport of b327ea1897fca34164a9bbea59a23d34b97e65a2 task-3865454 Forward-Port-Of: odoo/enterprise#74099