From 54b59a9254e5c3253fac9e064c3a1dae7ece2452 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Mon, 15 Dec 2014 13:37:32 +0100 Subject: [PATCH 01/12] Correct the credit control page in the invoice view * Put the policy field in a * Hide the policy field when empty (irrelevant if empty) * Use a correct label for the policy field * Remove useless fields from the tree view for the lines: it was overflowing from the sheet view --- account_credit_control/account_view.xml | 27 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/account_credit_control/account_view.xml b/account_credit_control/account_view.xml index d70ebcf7e..5873e8ce3 100644 --- a/account_credit_control/account_view.xml +++ b/account_credit_control/account_view.xml @@ -15,14 +15,27 @@ - - From 7eac11eb4ef39616cfabe1b936355f0d0db48e65 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Mon, 15 Dec 2014 13:59:17 +0100 Subject: [PATCH 02/12] The report is displayed on the first page Otherwise one needs to switch page every time. Use a field.Html for the report so we can emphasise the main information. The page where the report was should be displayed only for technical users, it is meaningless for normal users. --- account_credit_control/run.py | 10 +++++----- account_credit_control/run_view.xml | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/account_credit_control/run.py b/account_credit_control/run.py index aaa443d17..417af2839 100644 --- a/account_credit_control/run.py +++ b/account_credit_control/run.py @@ -49,7 +49,7 @@ class CreditControlRun(models.Model): states={'draft': [('readonly', False)]}, default=_get_policies, ) - report = fields.Text(string='Report', readonly=True, copy=False) + report = fields.Html(string='Report', readonly=True, copy=False) state = fields.Selection([('draft', 'Draft'), ('done', 'Done')], string='State', @@ -123,13 +123,13 @@ class CreditControlRun(models.Model): self.date) generated |= policy_lines_generated if policy_lines_generated: - report += (_("Policy \"%s\" has generated %d Credit " - "Control Lines.\n") % + report += (_("Policy \"%s\" has generated %d Credit " + "Control Lines.
") % (policy.name, len(policy_lines_generated))) else: report += _( - "Policy \"%s\" has not generated any " - "Credit Control Lines.\n" % policy.name + "Policy \"%s\" has not generated any " + "Credit Control Lines.
" % policy.name ) vals = {'state': 'done', diff --git a/account_credit_control/run_view.xml b/account_credit_control/run_view.xml index e10e8c389..2d40c02ab 100644 --- a/account_credit_control/run_view.xml +++ b/account_credit_control/run_view.xml @@ -29,10 +29,12 @@ + + - - - + From cf402156018c86146d8ef4ffd4ebb18aa795a6b3 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Mon, 15 Dec 2014 14:06:09 +0100 Subject: [PATCH 03/12] Move the compute button in the header --- account_credit_control/run_view.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/account_credit_control/run_view.xml b/account_credit_control/run_view.xml index 2d40c02ab..9eee16539 100644 --- a/account_credit_control/run_view.xml +++ b/account_credit_control/run_view.xml @@ -18,6 +18,11 @@
+