From 20733f427f71696e1ec9800e08942008e6919eb6 Mon Sep 17 00:00:00 2001 From: Jordi Ballester Alomar Date: Fri, 22 Jun 2018 01:49:24 +0200 Subject: [PATCH 1/7] [IMP] Extend customer_activity_statement to display also payables --- customer_activity_statement/README.rst | 16 +++---- customer_activity_statement/__manifest__.py | 4 +- .../report/customer_activity_statement.py | 42 +++++++++++-------- .../static/description/index.html | 10 ++--- .../views/statement.xml | 7 +++- .../customer_activity_statement_wizard.py | 4 ++ .../customer_activity_statement_wizard.xml | 11 +++-- 7 files changed, 56 insertions(+), 38 deletions(-) diff --git a/customer_activity_statement/README.rst b/customer_activity_statement/README.rst index 821c6511..9267fa3e 100644 --- a/customer_activity_statement/README.rst +++ b/customer_activity_statement/README.rst @@ -2,18 +2,18 @@ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -================================= -Print Customer Activity Statement -================================= +================================ +Print Partner Activity Statement +================================ -The activity statement provides details of all activity on the customer receivables +The activity statement provides details of all activity on the partner receivables or payables between two selected dates. This includes all invoices, refunds and payments. Any outstanding balance dated prior to the chosen statement period will appear as a forward balance at the top of the statement. The list is displayed in chronological order and is split by currencies. Aging details can be shown in the report, expressed in aging buckets (30 days -due, ...), so the customer can review how much is open, due or overdue. +due, ...), so the customer or vendor can review how much is open, due or overdue. Configuration ============= @@ -28,9 +28,9 @@ Usage To use this module, you need to: -#. Go to Customers and select one or more -#. Press 'Action > Customer Activity Statement' -#. Indicate if you want to display aging buckets +#. Go to Customers or Vendors and select one or more +#. Press 'Action > Partner Activity Statement' +#. Indicate if you want to display receivables or payables, and if you want to display aging buckets .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas diff --git a/customer_activity_statement/__manifest__.py b/customer_activity_statement/__manifest__.py index 41daefad..edcc8b5a 100644 --- a/customer_activity_statement/__manifest__.py +++ b/customer_activity_statement/__manifest__.py @@ -4,8 +4,8 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'Customer Activity Statement', - 'version': '10.0.1.1.0', + 'name': 'Partner Activity Statement', + 'version': '10.0.2.0.0', 'category': 'Accounting & Finance', 'summary': 'OCA Financial Reports', 'author': "Eficent, Odoo Community Association (OCA)", diff --git a/customer_activity_statement/report/customer_activity_statement.py b/customer_activity_statement/report/customer_activity_statement.py index 5e3a9259..eeb8bb3f 100644 --- a/customer_activity_statement/report/customer_activity_statement.py +++ b/customer_activity_statement/report/customer_activity_statement.py @@ -19,7 +19,7 @@ class CustomerActivityStatement(models.AbstractModel): date = datetime.strptime(str_date, DEFAULT_SERVER_DATE_FORMAT).date() return date.strftime(lang.date_format) - def _initial_balance_sql_q1(self, partners, date_start): + def _initial_balance_sql_q1(self, partners, date_start, account_type): return """ SELECT l.partner_id, l.currency_id, l.company_id, CASE WHEN l.currency_id is not null AND l.amount_currency > 0.0 @@ -33,11 +33,11 @@ class CustomerActivityStatement(models.AbstractModel): FROM account_move_line l JOIN account_account_type at ON (at.id = l.user_type_id) JOIN account_move m ON (l.move_id = m.id) - WHERE l.partner_id IN (%s) AND at.type = 'receivable' + WHERE l.partner_id IN (%s) AND at.type = '%s' AND l.date < '%s' AND not l.blocked GROUP BY l.partner_id, l.currency_id, l.amount_currency, l.company_id - """ % (partners, date_start) + """ % (partners, account_type, date_start) def _initial_balance_sql_q2(self, company_id): return """ @@ -49,7 +49,7 @@ class CustomerActivityStatement(models.AbstractModel): """ % company_id def _get_account_initial_balance(self, company_id, partner_ids, - date_start): + date_start, account_type): res = dict(map(lambda x: (x, []), partner_ids)) partners = ', '.join([str(i) for i in partner_ids]) date_start = datetime.strptime( @@ -57,13 +57,15 @@ class CustomerActivityStatement(models.AbstractModel): # pylint: disable=E8103 self.env.cr.execute("""WITH Q1 AS (%s), Q2 AS (%s) SELECT partner_id, currency_id, balance - FROM Q2""" % (self._initial_balance_sql_q1(partners, date_start), + FROM Q2""" % (self._initial_balance_sql_q1(partners, date_start, + account_type), self._initial_balance_sql_q2(company_id))) for row in self.env.cr.dictfetchall(): res[row.pop('partner_id')].append(row) return res - def _display_lines_sql_q1(self, partners, date_start, date_end): + def _display_lines_sql_q1(self, partners, date_start, date_end, + account_type): return """ SELECT m.name AS move_id, l.partner_id, l.date, l.name, l.ref, l.blocked, l.currency_id, l.company_id, @@ -82,12 +84,12 @@ class CustomerActivityStatement(models.AbstractModel): FROM account_move_line l JOIN account_account_type at ON (at.id = l.user_type_id) JOIN account_move m ON (l.move_id = m.id) - WHERE l.partner_id IN (%s) AND at.type = 'receivable' + WHERE l.partner_id IN (%s) AND at.type = '%s' AND '%s' <= l.date AND l.date <= '%s' GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name, l.ref, l.blocked, l.currency_id, l.amount_currency, l.company_id - """ % (partners, date_start, date_end) + """ % (partners, account_type, date_start, date_end) def _display_lines_sql_q2(self, company_id): return """ @@ -100,7 +102,7 @@ class CustomerActivityStatement(models.AbstractModel): """ % company_id def _get_account_display_lines(self, company_id, partner_ids, date_start, - date_end): + date_end, account_type): # pylint: disable=sql-injection res = dict(map(lambda x: (x, []), partner_ids)) partners = ', '.join([str(i) for i in partner_ids]) @@ -113,7 +115,8 @@ class CustomerActivityStatement(models.AbstractModel): credit, amount, blocked, currency_id FROM Q2 ORDER BY date, date_maturity, move_id""" % ( - self._display_lines_sql_q1(partners, date_start, date_end), + self._display_lines_sql_q1(partners, date_start, date_end, + account_type), self._display_lines_sql_q2(company_id))) for row in self.env.cr.dictfetchall(): res[row.pop('partner_id')].append(row) @@ -176,7 +179,7 @@ class CustomerActivityStatement(models.AbstractModel): """ % (self._get_reconcile_date(), date_end, self._get_reconcile_date(), date_end) - def _show_buckets_sql_q1(self, partners, date_end): + def _show_buckets_sql_q1(self, partners, date_end, account_type): return """ SELECT l.partner_id, l.currency_id, l.company_id, l.move_id, CASE WHEN l.balance > 0.0 @@ -207,14 +210,14 @@ class CustomerActivityStatement(models.AbstractModel): ON pr.debit_move_id = l2.id WHERE l2.date <= '%s' ) as pc ON pc.credit_move_id = l.id - WHERE l.partner_id IN (%s) AND at.type = 'receivable' + WHERE l.partner_id IN (%s) AND at.type = '%s' AND (Q0.reconciled_date is null or Q0.reconciled_date > '%s') AND l.date <= '%s' AND not l.blocked GROUP BY l.partner_id, l.currency_id, l.date, l.date_maturity, l.amount_currency, l.balance, l.move_id, l.company_id - """ % (date_end, date_end, partners, date_end, date_end) + """ % (date_end, date_end, partners, account_type, date_end, date_end) def _show_buckets_sql_q2(self, date_end, minus_30, minus_60, minus_90, minus_120): @@ -306,7 +309,8 @@ class CustomerActivityStatement(models.AbstractModel): 'minus_120': date_end - timedelta(days=120), } - def _get_account_show_buckets(self, company_id, partner_ids, date_end): + def _get_account_show_buckets(self, company_id, partner_ids, date_end, + account_type): res = dict(map(lambda x: (x, []), partner_ids)) partners = ', '.join([str(i) for i in partner_ids]) date_end = datetime.strptime( @@ -323,7 +327,7 @@ class CustomerActivityStatement(models.AbstractModel): GROUP BY partner_id, currency_id, current, b_1_30, b_30_60, b_60_90, b_90_120, b_over_120""" % ( self._show_buckets_sql_q0(date_end), - self._show_buckets_sql_q1(partners, date_end), + self._show_buckets_sql_q1(partners, date_end, account_type), self._show_buckets_sql_q2( full_dates['date_end'], full_dates['minus_30'], @@ -342,6 +346,7 @@ class CustomerActivityStatement(models.AbstractModel): partner_ids = data['partner_ids'] date_start = data['date_start'] date_end = data['date_end'] + account_type = data['account_type'] today = fields.Date.today() balance_start_to_display, buckets_to_display = {}, {} @@ -350,7 +355,7 @@ class CustomerActivityStatement(models.AbstractModel): today_display, date_start_display, date_end_display = {}, {}, {} balance_start = self._get_account_initial_balance( - company_id, partner_ids, date_start) + company_id, partner_ids, date_start, account_type) for partner_id in partner_ids: balance_start_to_display[partner_id] = {} @@ -362,7 +367,7 @@ class CustomerActivityStatement(models.AbstractModel): line['balance'] lines = self._get_account_display_lines( - company_id, partner_ids, date_start, date_end) + company_id, partner_ids, date_start, date_end, account_type) for partner_id in partner_ids: lines_to_display[partner_id], amount_due[partner_id] = {}, {} @@ -394,7 +399,7 @@ class CustomerActivityStatement(models.AbstractModel): if data['show_aging_buckets']: buckets = self._get_account_show_buckets( - company_id, partner_ids, date_end) + company_id, partner_ids, date_end, account_type) for partner_id in partner_ids: buckets_to_display[partner_id] = {} for line in buckets[partner_id]: @@ -418,6 +423,7 @@ class CustomerActivityStatement(models.AbstractModel): 'Date_start': date_start_display, 'Date_end': date_end_display, 'Date': today_display, + 'account_type': account_type, } return self.env['report'].render( 'customer_activity_statement.statement', values=docargs) diff --git a/customer_activity_statement/static/description/index.html b/customer_activity_statement/static/description/index.html index 4d35122d..5d169ece 100644 --- a/customer_activity_statement/static/description/index.html +++ b/customer_activity_statement/static/description/index.html @@ -1,7 +1,7 @@
-

Customer Activity Statement

+

Partner Activity Statement

@@ -10,12 +10,12 @@

The activity statement provides -details of all activity on the customer receivables between two selected dates. This +details of all activity on the receivables or payables of a partner between two selected dates. This includes all invoices, refunds and payments. Any outstanding balance dated prior to the chosen statement period will appear as a forward balance at the top of the statement. The list is displayed in chronological order and is split by currencies.

Aging details can be shown in the report, expressed in aging buckets (30 days due, ...), -so the customer can review how much is open, due or overdue.

+so the customer or vendor can review how much is open, due or overdue.

@@ -44,8 +44,8 @@ so the customer can review how much is open, due or overdue.

To use this module, you need to:

diff --git a/customer_activity_statement/views/statement.xml b/customer_activity_statement/views/statement.xml index 9172975c..837ff621 100644 --- a/customer_activity_statement/views/statement.xml +++ b/customer_activity_statement/views/statement.xml @@ -21,8 +21,11 @@

-

- Activity Statement between and in : +

+ Customer Activity Statement between and in : +

+

+ Supplier Activity Statement between and in :

diff --git a/customer_activity_statement/wizard/customer_activity_statement_wizard.py b/customer_activity_statement/wizard/customer_activity_statement_wizard.py index 3fb116e4..98e361cd 100644 --- a/customer_activity_statement/wizard/customer_activity_statement_wizard.py +++ b/customer_activity_statement/wizard/customer_activity_statement_wizard.py @@ -31,6 +31,9 @@ class CustomerActivityStatementWizard(models.TransientModel): ) filter_partners_non_due = fields.Boolean( string='Don\'t show partners with no due entries', default=True) + account_type = fields.Selection( + [('receivable', 'Receivable'), + ('payable', 'Payable')], string='Account type', default='receivable') @api.multi def button_export_pdf(self): @@ -46,6 +49,7 @@ class CustomerActivityStatementWizard(models.TransientModel): 'partner_ids': self._context['active_ids'], 'show_aging_buckets': self.show_aging_buckets, 'filter_non_due_partners': self.filter_partners_non_due, + 'account_type': self.account_type, } def _export(self): diff --git a/customer_activity_statement/wizard/customer_activity_statement_wizard.xml b/customer_activity_statement/wizard/customer_activity_statement_wizard.xml index 20b5f145..52bdd9a0 100644 --- a/customer_activity_statement/wizard/customer_activity_statement_wizard.xml +++ b/customer_activity_statement/wizard/customer_activity_statement_wizard.xml @@ -2,7 +2,7 @@

+ + + From f6c66e2566ef5578e39652f25cf4dccc782dd3e7 Mon Sep 17 00:00:00 2001 From: mreficent Date: Fri, 22 Jun 2018 17:23:15 +0200 Subject: [PATCH 2/7] [IMP] Extend customer_outstanding_statement to display also payables --- customer_outstanding_statement/README.rst | 16 +++++------ .../__manifest__.py | 4 +-- .../report/customer_outstanding_statement.py | 28 +++++++++++-------- .../static/description/index.html | 10 +++---- .../views/statement.xml | 7 +++-- .../customer_outstanding_statement_wizard.py | 4 +++ .../customer_outstanding_statement_wizard.xml | 13 ++++++--- 7 files changed, 49 insertions(+), 33 deletions(-) diff --git a/customer_outstanding_statement/README.rst b/customer_outstanding_statement/README.rst index 4455e4bf..efaf4548 100644 --- a/customer_outstanding_statement/README.rst +++ b/customer_outstanding_statement/README.rst @@ -2,16 +2,16 @@ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -==================================== -Print Customer Outstanding Statement -==================================== +=================================== +Print Partner Outstanding Statement +=================================== -The outstanding statement provides details of all outstanding customer receivables +The outstanding statement provides details of all outstanding partner receivables or payables up to a particular date. This includes all unpaid invoices, unclaimed refunds and outstanding payments. The list is displayed in chronological order and is split by currencies. Aging details can be shown in the report, expressed in aging buckets (30 days -due, ...), so the customer can review how much is open, due or overdue. +due, ...), so the customer or vendor can review how much is open, due or overdue. Configuration ============= @@ -26,9 +26,9 @@ Usage To use this module, you need to: -#. Go to Customers and select one or more -#. Press 'Action > Customer Outstanding Statement' -#. Indicate if you want to display aging buckets +#. Go to Customers or Vendors and select one or more +#. Press 'Action > Partner Outstanding Statement' +#. Indicate if you want to display receivables or payables, and if you want to display aging buckets .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas diff --git a/customer_outstanding_statement/__manifest__.py b/customer_outstanding_statement/__manifest__.py index b5e5fdf5..5703d5b2 100644 --- a/customer_outstanding_statement/__manifest__.py +++ b/customer_outstanding_statement/__manifest__.py @@ -4,8 +4,8 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'Customer Outstanding Statement', - 'version': '10.0.1.1.0', + 'name': 'Partner Outstanding Statement', + 'version': '10.0.2.0.0', 'category': 'Accounting & Finance', 'summary': 'OCA Financial Reports', 'author': "Eficent, Odoo Community Association (OCA)", diff --git a/customer_outstanding_statement/report/customer_outstanding_statement.py b/customer_outstanding_statement/report/customer_outstanding_statement.py index 1caae334..6343a6ac 100644 --- a/customer_outstanding_statement/report/customer_outstanding_statement.py +++ b/customer_outstanding_statement/report/customer_outstanding_statement.py @@ -47,7 +47,7 @@ class CustomerOutstandingStatement(models.AbstractModel): """ % (self._get_reconcile_date(), date_end, self._get_reconcile_date(), date_end) - def _display_lines_sql_q1(self, partners, date_end): + def _display_lines_sql_q1(self, partners, date_end, account_type): return """ SELECT m.name as move_id, l.partner_id, l.date, l.name, l.ref, l.blocked, l.currency_id, l.company_id, @@ -87,14 +87,14 @@ class CustomerOutstandingStatement(models.AbstractModel): ON pr.debit_move_id = l2.id WHERE l2.date <= '%s' ) as pc ON pc.credit_move_id = l.id - WHERE l.partner_id IN (%s) AND at.type = 'receivable' + WHERE l.partner_id IN (%s) AND at.type = '%s' AND (Q0.reconciled_date is null or Q0.reconciled_date > '%s') AND l.date <= '%s' GROUP BY l.partner_id, m.name, l.date, l.date_maturity, l.name, l.ref, l.blocked, l.currency_id, l.balance, l.amount_currency, l.company_id - """ % (date_end, date_end, partners, date_end, date_end) + """ % (date_end, date_end, partners, account_type, date_end, date_end) def _display_lines_sql_q2(self): return """ @@ -117,7 +117,8 @@ class CustomerOutstandingStatement(models.AbstractModel): WHERE c.id = %s """ % company_id - def _get_account_display_lines(self, company_id, partner_ids, date_end): + def _get_account_display_lines(self, company_id, partner_ids, date_end, + account_type): res = dict(map(lambda x: (x, []), partner_ids)) partners = ', '.join([str(i) for i in partner_ids]) date_end = datetime.strptime( @@ -130,7 +131,7 @@ class CustomerOutstandingStatement(models.AbstractModel): FROM Q3 ORDER BY date, date_maturity, move_id""" % ( self._display_lines_sql_q0(date_end), - self._display_lines_sql_q1(partners, date_end), + self._display_lines_sql_q1(partners, date_end, account_type), self._display_lines_sql_q2(), self._display_lines_sql_q3(company_id))) for row in self.env.cr.dictfetchall(): @@ -194,7 +195,7 @@ class CustomerOutstandingStatement(models.AbstractModel): """ % (self._get_reconcile_date(), date_end, self._get_reconcile_date(), date_end) - def _show_buckets_sql_q1(self, partners, date_end): + def _show_buckets_sql_q1(self, partners, date_end, account_type): return """ SELECT l.partner_id, l.currency_id, l.company_id, l.move_id, CASE WHEN l.balance > 0.0 @@ -225,14 +226,14 @@ class CustomerOutstandingStatement(models.AbstractModel): ON pr.debit_move_id = l2.id WHERE l2.date <= '%s' ) as pc ON pc.credit_move_id = l.id - WHERE l.partner_id IN (%s) AND at.type = 'receivable' + WHERE l.partner_id IN (%s) AND at.type = '%s' AND (Q0.reconciled_date is null or Q0.reconciled_date > '%s') AND l.date <= '%s' AND not l.blocked GROUP BY l.partner_id, l.currency_id, l.date, l.date_maturity, l.amount_currency, l.balance, l.move_id, l.company_id - """ % (date_end, date_end, partners, date_end, date_end) + """ % (date_end, date_end, partners, account_type, date_end, date_end) def _show_buckets_sql_q2(self, date_end, minus_30, minus_60, minus_90, minus_120): @@ -324,7 +325,8 @@ class CustomerOutstandingStatement(models.AbstractModel): 'minus_120': date_end - timedelta(days=120), } - def _get_account_show_buckets(self, company_id, partner_ids, date_end): + def _get_account_show_buckets(self, company_id, partner_ids, date_end, + account_type): res = dict(map(lambda x: (x, []), partner_ids)) partners = ', '.join([str(i) for i in partner_ids]) date_end = datetime.strptime( @@ -341,7 +343,7 @@ class CustomerOutstandingStatement(models.AbstractModel): GROUP BY partner_id, currency_id, current, b_1_30, b_30_60, b_60_90, b_90_120, b_over_120""" % ( self._show_buckets_sql_q0(date_end), - self._show_buckets_sql_q1(partners, date_end), + self._show_buckets_sql_q1(partners, date_end, account_type), self._show_buckets_sql_q2( full_dates['date_end'], full_dates['minus_30'], @@ -359,6 +361,7 @@ class CustomerOutstandingStatement(models.AbstractModel): company_id = data['company_id'] partner_ids = data['partner_ids'] date_end = data['date_end'] + account_type = data['account_type'] today = fields.Date.today() buckets_to_display = {} @@ -367,7 +370,7 @@ class CustomerOutstandingStatement(models.AbstractModel): today_display, date_end_display = {}, {} lines = self._get_account_display_lines( - company_id, partner_ids, date_end) + company_id, partner_ids, date_end, account_type) for partner_id in partner_ids: lines_to_display[partner_id], amount_due[partner_id] = {}, {} @@ -393,7 +396,7 @@ class CustomerOutstandingStatement(models.AbstractModel): if data['show_aging_buckets']: buckets = self._get_account_show_buckets( - company_id, partner_ids, date_end) + company_id, partner_ids, date_end, account_type) for partner_id in partner_ids: buckets_to_display[partner_id] = {} for line in buckets[partner_id]: @@ -415,6 +418,7 @@ class CustomerOutstandingStatement(models.AbstractModel): 'Filter_non_due_partners': data['filter_non_due_partners'], 'Date_end': date_end_display, 'Date': today_display, + 'account_type': account_type, } return self.env['report'].render( 'customer_outstanding_statement.statement', values=docargs) diff --git a/customer_outstanding_statement/static/description/index.html b/customer_outstanding_statement/static/description/index.html index 9c3d2c94..b0792a47 100644 --- a/customer_outstanding_statement/static/description/index.html +++ b/customer_outstanding_statement/static/description/index.html @@ -1,7 +1,7 @@
-

Customer Outstanding Statement

+

Partner Outstanding Statement

@@ -10,10 +10,10 @@

The outstanding statement provides details of all outstanding -customer receivables up to a particular date. This includes all unpaid invoices, unclaimed +receivables or payables of a partner up to a particular date. This includes all unpaid invoices, unclaimed refunds and outstanding payments. The list is displayed in chronological order and is split by currencies.

Aging details can be shown in the report, expressed in aging buckets (30 days -due, ...), so the customer can review how much is open, due or overdue.

+due, ...), so the customer or vendor can review how much is open, due or overdue.

@@ -42,8 +42,8 @@ due, ...), so the customer can review how much is open, due or overdue.

To use this module, you need to:

    -
  • Go to Customers and select one or more
  • -
  • Press 'Action > Customer Outstanding Statement'
  • +
  • Go to Customers or Vendors and select one or more
  • +
  • Press 'Action > Partner Outstanding Statement'
  • Indicate if you want to display aging buckets

diff --git a/customer_outstanding_statement/views/statement.xml b/customer_outstanding_statement/views/statement.xml index 07b55ccc..60edeffd 100644 --- a/customer_outstanding_statement/views/statement.xml +++ b/customer_outstanding_statement/views/statement.xml @@ -21,8 +21,11 @@

-

- Outstanding Statement at in : +

++ Customer Outstanding Statement at in : ++

+

++ Supplier Outstanding Statement at in :

diff --git a/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.py b/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.py index 5fd8f468..9d487c31 100644 --- a/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.py +++ b/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.py @@ -28,6 +28,9 @@ class CustomerOutstandingStatementWizard(models.TransientModel): ) filter_partners_non_due = fields.Boolean( string='Don\'t show partners with no due entries', default=True) + account_type = fields.Selection( + [('receivable', 'Receivable'), + ('payable', 'Payable')], string='Account type', default='receivable') @api.multi def button_export_pdf(self): @@ -42,6 +45,7 @@ class CustomerOutstandingStatementWizard(models.TransientModel): 'partner_ids': self._context['active_ids'], 'show_aging_buckets': self.show_aging_buckets, 'filter_non_due_partners': self.filter_partners_non_due, + 'account_type': self.account_type, } def _export(self): diff --git a/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.xml b/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.xml index aac6bc8f..0fc7f451 100644 --- a/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.xml +++ b/customer_outstanding_statement/wizard/customer_outstanding_statement_wizard.xml @@ -2,7 +2,7 @@
-

+ + + From 210687ad6860c7d9788824367a75dba7729a4441 Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Tue, 21 Aug 2018 23:43:39 +1200 Subject: [PATCH 3/7] [IMP] customer_activity_statement: Cleanup --- .../static/src/less/layout_statement.less | 22 ++ .../views/statement.xml | 217 +++++++----------- 2 files changed, 110 insertions(+), 129 deletions(-) create mode 100644 customer_activity_statement/static/src/less/layout_statement.less diff --git a/customer_activity_statement/static/src/less/layout_statement.less b/customer_activity_statement/static/src/less/layout_statement.less new file mode 100644 index 00000000..4a600646 --- /dev/null +++ b/customer_activity_statement/static/src/less/layout_statement.less @@ -0,0 +1,22 @@ +.table-statement { + .amount { + text-align: right !important; + width: 14% //spread 7 columns evenly + } + thead { + border-bottom: solid; // required for clean layout + tr th:first-child { + width: auto !important; // required for clean layout + } + tr th:last-child { + width: 16% !important; // required for boxed layout + } + } +} + +.statement-blocked { + background-color: @gray-lighter-darker !important; + td:last-child { + background-color: @gray-lighter-darker !important; + } +} diff --git a/customer_activity_statement/views/statement.xml b/customer_activity_statement/views/statement.xml index 837ff621..fbdd4c85 100644 --- a/customer_activity_statement/views/statement.xml +++ b/customer_activity_statement/views/statement.xml @@ -1,5 +1,11 @@ + +