Mattis Megevand (mmeg) 90cd47424a [FIX] l10n_eg_edi_eta: division by zero during computation exchange rate
Steps to reproduce:
- Install modules: 'account_accountant', 'l10n_eg', 'l10n_eg_edi_eta'.
- Switch company to "EG Company".
- Configure "Large Cabinet Accounting" with ETA item code "10001138" and set Customer Taxes to "VAT 14%".
- In "Journal Customer Invoices", disable "Factur-X (FR)" under Advanced Settings -> Electronic invoicing. Also, set Branch to "Deco Addict", ETA Activity Code to "Accounting, auditing, bookkeeping and tax advice activities", and ETA Branch ID to 0.
- Update "Deco Addict" with Tax ID "204899053" and set building number to 2.
- Update "Azure Interior" with Tax ID "204899052" and set building number to 2.
- In Accounting -> Configuration -> Thumb Drive, create a new record using "EG Company" with 123 as both the ETA USB Pin and Access Token.
- Manually set the certificate in the Thumb Drive record.
- Create a new Customer Invoice with Customer set to "Azure Interior", Invoice Date as today, add a line item "Large Cabinet", set the Price to 0, remove "0% taxes" and add "VAT 14%", and set Journal to "Customer invoices in EUR".
- Confirm the invoice and attempt to "Sign Invoice".

Issue:
A traceback occurs with a divide by zero error in the invoice calculation when different currencies are involved.

Solution:
Refined _l10n_eg_edi_exchange_currency_rate function to calculate the currency exchange rate. Now, it ensures the division by amount_currency only occurs when it's not zero, preventing divide by zero errors during currency conversion in invoices.

opw-3580529

closes odoo/odoo#143064

X-original-commit: 14af8243188b86a0d654298feca6dc0980cbebeb
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-11-22 07:43:11 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-11-20 04:58:31 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%