mega-odoo c5290e5427 [FIX] l10n_gcc_invoice: prevent trace back while printing an invoice
'ZeroDivisionError: float division by zero' is generated if the user prints
an invoice pdf without including an invoice line or invoice line with the
product price 0.

Steps to Reproduce

- Install the 'l10n_gcc_invoice' modules.
- Go to the current company and change the country to any Gulf nation, such
as Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, or the United Arab Emirates if
it isn't already.
- Go to Accounting > Configuration > Accounting > Currencies
- Activate another currency.
- Open an 'Invoices' module
- Add the 'currency_id' field in the invoice form view.
- Create a new invoice except including the invoice line or invoice line with
 product price 0 and select a currency that does not equal the current company
currency.
- And print this invoice.

Applying this commit will resolve this issue.

sentry-4210558233

closes odoo/odoo#125502

X-original-commit: ae9de44b91b7e80b4a44d69afa69ca95d8f528fe
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-22 15:41:03 +02:00
2023-06-19 10:40:51 +02: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%