diff --git a/ext/custom-addons/dp_reports_account/models/__init__.py b/ext/custom-addons/dp_reports_account/models/__init__.py index b2b098fa..4c5ec5e1 100644 --- a/ext/custom-addons/dp_reports_account/models/__init__.py +++ b/ext/custom-addons/dp_reports_account/models/__init__.py @@ -2,3 +2,4 @@ from . import report_helper +from . import account_invoice diff --git a/ext/custom-addons/dp_reports_account/models/account_invoice.py b/ext/custom-addons/dp_reports_account/models/account_invoice.py new file mode 100644 index 00000000..91fcacb5 --- /dev/null +++ b/ext/custom-addons/dp_reports_account/models/account_invoice.py @@ -0,0 +1,21 @@ +# Copyright 2018-Today datenpol gmbh () +# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). + +from odoo import api, models + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + @api.multi + def order_lines_layouted(self): + res = super(AccountInvoice, self).order_lines_layouted() + uncategorized = False + # Rechnungszeilen ohne Kategorie löschen und an den Anfang stellen + for idx1, page in enumerate(res): + for idx2, category in enumerate(page): + if category.get('name') == 'Uncategorized': + uncategorized = page.pop(idx2) + if uncategorized: + res[idx1] = [uncategorized] + res[idx1] + return res diff --git a/ext/custom-addons/dp_reports_account/reports/invoice.xml b/ext/custom-addons/dp_reports_account/reports/invoice.xml index 4d039f10..0f667178 100644 --- a/ext/custom-addons/dp_reports_account/reports/invoice.xml +++ b/ext/custom-addons/dp_reports_account/reports/invoice.xml @@ -67,73 +67,83 @@
- - - - - - - - - - - - - - - - - - + +
Pos.AnzahlGewichtArtikelEPRabattGesamtpreis
+ + - - - - - - - - - + + + + + + + + + - - - - - -
- - - - - kg - - - - - - -
-
- - Zolltarif Nr.: - - -
- -
- - - - - - Pos.AnzahlGewichtArtikelEPRabattGesamtpreis
- -
+ + + + + + + + + + + + + + + + + + + + kg + + + + + + + + +
+
+ + Zolltarif Nr.: + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + +