From 64a0028eae5934c0e08d86714196eaa39f8ab002 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 5 Mar 2013 13:42:23 +0000
Subject: [PATCH] Show payment request column if set on lines

---
 .../AccountingTransaction_getListBoxColumnList.xml        | 8 ++++++++
 bt5/erp5_accounting/bt/revision                           | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
index 73d54fab05..0844bee261 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
@@ -60,13 +60,16 @@ The same for apply for payment / payment_reference.\n
 """\n
 section_dict = {None: 1}\n
 payment_dict = {None: 1}\n
+payment_request_dict = {None: 1}\n
 for line in context.getMovementList():\n
   if source:\n
     section_dict[line.getDestinationSection()] = 1\n
     payment_dict[line.getSourcePayment()] = 1\n
+    payment_request_dict[line.getSourcePaymentRequest()] = 1\n
   else:\n
     section_dict[line.getSourceSection()] = 1\n
     payment_dict[line.getDestinationPayment()] = 1\n
+    payment_request_dict[line.getDestinationPaymentRequest()] = 1\n
 \n
 if context.getSourcePayment() or context.getDestinationSection():\n
   min_payment_count = 2\n
@@ -107,6 +110,11 @@ if multiple_payment:\n
       a((\'getDestinationPaymentTitle\', \'Bank Account\'))\n
     else:\n
       a((\'getDestinationPaymentReference\', \'Bank Account\'))\n
+if len(payment_request_dict) > 1:\n
+  if source:\n
+    a((\'getSourcePaymentRequestTitle\', \'Payment Request\'))\n
+  else:\n
+    a((\'getDestinationPaymentRequestTitle\', \'Payment Request\'))\n
 if source:\n
   a((\'source_debit\', \'Debit\'))\n
   a((\'source_credit\', \'Credit\'))\n
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 929e30ed99..129f3d6210 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-1519
\ No newline at end of file
+1520
\ No newline at end of file
-- 
2.30.9