From 104006447dd12dd49fdd57ee44d634d0fdce78a6 Mon Sep 17 00:00:00 2001 From: Francesco Apruzzese Date: Thu, 28 Apr 2016 17:08:51 +0200 Subject: [PATCH] [FIX] Open Invoices - Minor improvment [FIX] Wrong css classes in CSS --- .../report/templates/open_invoice_report.xml | 29 ++++++++----------- .../static/src/css/report.css | 5 +--- .../wizard/open_invoice_wizard.py | 17 ++++++----- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/account_financial_report_qweb/report/templates/open_invoice_report.xml b/account_financial_report_qweb/report/templates/open_invoice_report.xml index d5b23070..1144f606 100644 --- a/account_financial_report_qweb/report/templates/open_invoice_report.xml +++ b/account_financial_report_qweb/report/templates/open_invoice_report.xml @@ -36,11 +36,10 @@
-
+
Company
-
Fiscal Year
At Date
Accounts Filter
Target Moves
@@ -49,7 +48,6 @@
-
@@ -73,11 +71,10 @@ -
+
Date
-
Period
Entry
Journal
Partner
@@ -94,7 +91,6 @@
-
@@ -108,9 +104,9 @@ -
-
-
+
+
+
@@ -121,22 +117,21 @@
-
Comulate Balance on Partner
-
-
-
+
+
+
-
+
Comulate Balance
-
-
-
+
+
+
diff --git a/account_financial_report_qweb/static/src/css/report.css b/account_financial_report_qweb/static/src/css/report.css index 88f10d46..96650687 100644 --- a/account_financial_report_qweb/static/src/css/report.css +++ b/account_financial_report_qweb/static/src/css/report.css @@ -18,11 +18,8 @@ body, table, td, span, div { .act_as_tbody { display: table-row-group !important; } -.act_as_caption { - display: table-caption !important; -} .list_table, .data_table { - width: 690px !important; + width: 100% !important; table-layout: fixed !important; } .act_as_row.labels { diff --git a/account_financial_report_qweb/wizard/open_invoice_wizard.py b/account_financial_report_qweb/wizard/open_invoice_wizard.py index 2a1ca8e2..140f173a 100644 --- a/account_financial_report_qweb/wizard/open_invoice_wizard.py +++ b/account_financial_report_qweb/wizard/open_invoice_wizard.py @@ -87,7 +87,6 @@ class OpenInvoiceWizard(models.TransientModel): label=label, inv_nummber=move.invoice_id.number) return { 'date': move.date, - 'period': '', 'entry': move.move_id.name, 'journal': move.move_id.journal_id.code, 'reference': move.ref, @@ -106,11 +105,15 @@ class OpenInvoiceWizard(models.TransientModel): return True # ----- Show a message here datas = {} for move in moves: - if move.account_id.name not in datas: - datas[move.account_id.name] = {} - if move.partner_id.name not in datas[move.account_id.name]: - datas[move.account_id.name][move.partner_id.name] = [] - datas[move.account_id.name][move.partner_id.name].append( + account = '{code} - {name}'.format( + code=move.account_id.code, + name=move.account_id.name) + partner = move.partner_id.name + if account not in datas: + datas[account] = {} + if partner not in datas[account]: + datas[account][partner] = [] + datas[account][partner].append( self._get_move_line_data(move)) generals = { 'company': self.company_id.name, @@ -122,6 +125,6 @@ class OpenInvoiceWizard(models.TransientModel): 'target_moves': dict( self._columns['target_move'].selection)[self.target_move], } - return self.env['report'].with_context(landscape=True).get_action( + return self.env['report'].get_action( self, 'account_financial_report_qweb.open_invoice_report_qweb', data={'data': datas, 'general': generals})