lase@odoo.com bb77d9e554 [FIX] account: render draft invoice without early payment
Current behaviour:

500: Internal Server Error
Error while rendering the template account.report_invoice_document

Steps to reproduce:

Accounting > Configuration > invoicing > Payment Terms
New > Create and save a payment term with 2 lines
    For example :
        - name 80/20 test
        - line_1 : 80% after 0 days
        - line_2 : 20% after 30 days

Sales > Orders > Quotations
Chose any > use payment terms 80/20 test
Save and create associated invoice > chose regular invoice
> create draft invoice > preview > 500: Internal Server Error

Cause of the issue:

The method _get_amount_due_after_discount() called during the rendering
of the template does not return a value in case self.early_discount is
False.

Fix:

Return total_amount by default since no discount is applied.

opw-3683708

closes odoo/odoo#155080

X-original-commit: c8154b6aa57cc42e352260c7f75e52cd29a2d52d
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Lancelot Semal (lase) <lase@odoo.com>
2024-02-23 08:42:51 +00:00
2024-02-21 11:28:04 +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%