From 37198d9a6f571aceb0403d2df48776abe73544cc Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Fri, 7 Dec 2012 15:50:38 +0100
Subject: [PATCH] Payment created by order builder are handled with payzen

---
 .../category_movement_group_on_delivery.xml                     | 1 +
 .../OrderBuilder_generateUnrelatedInvoiceList.xml               | 1 +
 .../TestTemplateItem/testSlapOSAccountingBuilder.py             | 1 +
 master/bt5/slapos_accounting/bt/revision                        | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/master/bt5/slapos_accounting/PathTemplateItem/portal_orders/slapos_payment_transaction_builder/category_movement_group_on_delivery.xml b/master/bt5/slapos_accounting/PathTemplateItem/portal_orders/slapos_payment_transaction_builder/category_movement_group_on_delivery.xml
index da1887e33..b1643e197 100644
--- a/master/bt5/slapos_accounting/PathTemplateItem/portal_orders/slapos_payment_transaction_builder/category_movement_group_on_delivery.xml
+++ b/master/bt5/slapos_accounting/PathTemplateItem/portal_orders/slapos_payment_transaction_builder/category_movement_group_on_delivery.xml
@@ -44,6 +44,7 @@
                 <string>source_payment</string>
                 <string>source_section</string>
                 <string>specialise</string>
+                <string>payment_mode</string>
               </tuple>
             </value>
         </item>
diff --git a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateUnrelatedInvoiceList.xml b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateUnrelatedInvoiceList.xml
index e84309a3b..e960a5b6c 100644
--- a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateUnrelatedInvoiceList.xml
+++ b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateUnrelatedInvoiceList.xml
@@ -85,6 +85,7 @@ for invoice in portal.portal_catalog(**select_kw):\n
     start_date=invoice.getStartDate(),\n
     stop_date=invoice.getStopDate(),\n
     specialise=invoice.getSpecialise(),\n
+    payment_mode=\'payzen\',\n
     source_payment=\'organisation_module/slapos/bank_account\', # the other place defnied: business process\n
   )\n
   temp_movement_rec = newTempSimulationMovement(\n
diff --git a/master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py b/master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
index af95ee9d9..b73ba3f43 100644
--- a/master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
+++ b/master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
@@ -1235,6 +1235,7 @@ class TestSlapOSPaymentTransactionOrderBuilder(testSlapOSMixin):
       'price_currency/%s' % invoice.getPriceCurrency(),
       'resource/%s' % invoice.getResource(),
       'source_payment/organisation_module/slapos/bank_account',
+      'payment_mode/payzen',
       'source_section/%s' % invoice.getSourceSection(),
     ]
     self.assertSameSet(expected_set, payment.getCategoryList())
diff --git a/master/bt5/slapos_accounting/bt/revision b/master/bt5/slapos_accounting/bt/revision
index 5e78f1eb7..cbd6012bc 100644
--- a/master/bt5/slapos_accounting/bt/revision
+++ b/master/bt5/slapos_accounting/bt/revision
@@ -1 +1 @@
-203
\ No newline at end of file
+204
\ No newline at end of file
-- 
2.30.9