Print invoices with balance payments
invoice_print_report_balance_payment · OCA/account-invoice-reporting
-
Security10/251 grave, 0 minor
-
Activity0/25Last human commit 121 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Security warnings
res_partner.get_balance_at_date— SQL built by string formatting from caller-controlled input (an RPC-callable method's parameter, the request payload or the context): `cr.execute(sql)`. Pass values as query parameters (`cr.execute(query, params)`, `SQL("... %s", value)`). CWE-89. sql-injection · source
Found by automated static analysis: these patterns are usually risky, but only a manual review of the module can confirm a real issue. Methodology
Migration considerations
account_invoice— Class 'account_invoice' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceaccount_invoice— Class 'account_invoice' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceres_partner— Class 'res_partner' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · source- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.report`) migration-openerp-import · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Print invoices with balance payments
Changes the default invoice layout to add a few things, the main of which is the balance payment fields. Under the Total field, 3 new lines appear:
- Previous balance: The previous balance of the customer at the date of the previous invoice.
- Payments: The amount of payments that have been made between the date of the last invoice and the date of the printed invoice.
- To Pay: The total amount owed by the customer at the date of this invoice.
Also, it changes two minor and unrelated aspects:
- Replaces "Source" by "Contract Number".
- Removes the Tax column in the invoice line table.
Contributors:
- Virgil Dupras (virgil.dupras@savoirfairelinux.com)
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 0
No views found for this module.
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
No new fields.
Public methods (1)-
invoice_print(self, cr, uid, ids, context=None)
No new fields.
Public methods (1)-
get_balance_at_date(self, cr, uid, id, date, context=None)
Loading…
Loading…
Loading…