Commit fbe309c7 authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branches 'origin/mr/1400' and 'origin/mr/1409' into wip/configurator_trade

Pipeline #15337 passed with stage
in 0 seconds
......@@ -6886,6 +6886,77 @@ class TestBusinessTemplate(BusinessTemplateMixin):
'This path should not be reinstalled during update',
portal_categories.test_category.modified_category.container_in_which_child_is_added.getTitle())
def test_update_business_template_with_recursively_removed_documents(self):
"""Non regression test for a case when a subtree is removed
Updating from:
portal_categories/test_category
portal_categories/test_category/removed_container
portal_categories/test_category/removed_container/removed_document
to:
portal_categories/test_category
was causing error when removed_container was backup by portal trash
"""
portal_categories = self.portal.portal_categories
if 'test_category' in portal_categories.objectIds():
portal_categories.manage_delObjects(['test_category'])
base_category = portal_categories.newContent(portal_type='Base Category', id='test_category')
removed_container = base_category.newContent(portal_type='Category', id='removed_container')
removed_container.newContent(portal_type='Category', id='removed_document')
business_template = self.portal.portal_templates.newContent(
portal_type='Business Template',
title=self.id(),
template_path_list=(
'portal_categories/test_category/**'
),
template_base_category_list=['test_category'],
)
self.tic()
business_template.build()
self.tic()
export_dir = tempfile.mkdtemp()
try:
business_template.export(path=export_dir, local=True)
self.tic()
new_business_template_version_1 = self.portal.portal_templates.download(
url='file://%s' % export_dir)
finally:
shutil.rmtree(export_dir)
# Apply the changes and build a second version of business template
base_category.manage_delObjects(['removed_container'])
business_template.build()
self.tic()
export_dir = tempfile.mkdtemp()
try:
business_template.export(path=export_dir, local=True)
self.tic()
self.portal.portal_categories.manage_delObjects(['test_category'])
self.tic()
new_business_template_version_1.install()
self.portal.portal_categories.test_category.removed_container.setTitle(
'modifications are saved in trash')
self.tic()
self.portal.portal_templates.updateBusinessTemplateFromUrl(
download_url='file://%s' % export_dir
)
finally:
shutil.rmtree(export_dir)
self.tic()
# documents are removed
self.assertEqual(list(self.portal.portal_categories.test_category.objectValues()), [])
# and they are saved in portal trash
trash_bin, = [x for x in self.portal.portal_trash.contentValues() if x.getId().startswith(self.id())]
self.assertEqual(
trash_bin.restrictedTraverse('portal_categories_items/test_category/removed_container').getTitle(),
'modifications are saved in trash')
def test_update_business_template_with_template_keep_path_list_catalog_method(self):
"""Tests for `template_keep_path_list` feature for the special case of catalog methods
"""
......
......@@ -1194,6 +1194,9 @@ msgstr "Produits"
msgid "Income Tax"
msgstr "Impôt Sur Le Revenu"
msgid "Incoming"
msgstr "Entrant"
msgid "India"
msgstr "Inde"
......@@ -1893,6 +1896,9 @@ msgstr "Fabrication d'autres matériels de transport"
msgid "Others Liabilities"
msgstr "Autres dettes"
msgid "Outgoing"
msgstr "Sortant"
msgid "Overtime"
msgstr "Heures supplémentaires"
......
......@@ -5932,6 +5932,9 @@ msgstr "Id du script de générateur de prévision"
msgid "Generate References"
msgstr "Générer les références"
msgid "Generate SEPA Credit Transfer File"
msgstr "Générer un fichier de virements SEPA"
msgid "Generate Web Section Structure from Category"
msgstr "Générer une section web à partir des catégories"
......@@ -7300,9 +7303,15 @@ msgstr "Délai max. (jours)"
msgid "Max. delay (day)"
msgstr "Délai Max (jours)"
msgid "Maximum Date"
msgstr "Date maximale"
msgid "Maximum Delay (Day)"
msgstr "Délai maximum (jours)"
msgid "Maximum Number of Payments"
msgstr "Nombre maximum de règlements"
msgid "Maximum User Inactivity Duration"
msgstr "Durée maximale d'inactivité"
......@@ -7588,6 +7597,9 @@ msgstr "Minimiser le prix"
msgid "Minimize"
msgstr "Minimiser"
msgid "Minimum Date"
msgstr "Date minimale"
msgid "Minimum Delay (Day)"
msgstr "Délai minimum (jours)"
......@@ -8869,6 +8881,9 @@ msgstr "Date d'échéance du paiement"
msgid "Payment Delay (days)"
msgstr "Délai de paiement"
msgid "Payment Group Manager"
msgstr "Responsable du groupe d'écritures de trésorerie"
msgid "Payment Mode"
msgstr "Moyen de paiement"
......@@ -8902,9 +8917,18 @@ msgstr "Groupe d'écritures de trésorerie"
msgid "Payment Transaction Group Type"
msgstr "Type de groupe d'écritures de trésorerie"
msgid "Payment Transaction Group Type must be defined"
msgstr "Le type de groupe d'écritures de trésorerie doit être défini"
msgid "Payment Transaction Group Workflow"
msgstr "Workflow des groupes d'écritures de trésorerie"
msgid "Payment Transaction Groups"
msgstr "Groupes d'écritures de trésorerie"
msgid "Payment Transaction Groups to Open"
msgstr "Groupe d'écritures de trésorerie à ouvrir"
msgid "Payment Transaction Lines"
msgstr "Lignes comptables"
......@@ -8920,6 +8944,9 @@ msgstr "Écritures de trésorerie à l'état brouillard"
msgid "Payment Transaction related to Sale Invoice Transaction."
msgstr "Écriture de paiement liée à l'écriture de vente."
msgid "Payment Transactions"
msgstr "Écritures de trésorerie"
msgid "Payment additional term (day)"
msgstr "le"
......@@ -8938,6 +8965,9 @@ msgstr "Mode de règlement"
msgid "Payment of ${invoice_title}"
msgstr "Paiement de ${invoice_title}"
msgid "Payment selection in progress."
msgstr "Sélection des règlements en cours."
msgid "Payment term (day)"
msgstr "Terme du payement"
......@@ -11086,6 +11116,9 @@ msgstr "Lancer les tests unitaires"
msgid "Running Balance"
msgstr "Net"
msgid "SEPA Credit Transfer File generated."
msgstr "Fichier de virements SEPA généré"
msgid "SQL Cache"
msgstr "Cache SQL"
......@@ -11464,6 +11497,12 @@ msgstr "Sélectionner un module"
msgid "Select Non Reconciled Transactions"
msgstr "Sélectionner les écritures non rapprochées"
msgid "Select Payments"
msgstr "Sélectionner des règlements"
msgid "Select Planned or Confirmed Payments and Post them to General Ledger"
msgstr "Sélectionner des écritures planifiées ou confirmées et les passer au brouillard"
msgid "Select Print"
msgstr "Type d'impression"
......@@ -11479,6 +11518,9 @@ msgstr "Sélectionner un filtre prédéfini"
msgid "Select Variation"
msgstr "Variantes à commander"
msgid "Select already Posted to General Ledger or Closed Payments"
msgstr "Sélectionner des écritures au brouillard validé ou clôturées"
msgid "Select appropriate document in the list."
msgstr "Sélectionnez le document approprié dans la liste."
......@@ -11749,6 +11791,9 @@ msgstr "Montrer les écritures rapprochées"
msgid "Show tabs"
msgstr "Montrer les onglets"
msgid "Sign"
msgstr "Signe"
msgid "Signature Preview"
msgstr "Aperçu de la signature"
......@@ -12047,7 +12092,7 @@ msgid "Source Ref"
msgstr "Réf Fournisseur."
msgid "Source Reference"
msgstr "Référence"
msgstr "Référence de source"
msgid "Source Section"
msgstr "Section Source"
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_onlyxhtml_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_onlyxhtml_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document_list</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>11.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Documents</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewDocumentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_onlyjio_jump</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_onlyjio_jump</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_document</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Documents</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_jumpToRelatedDocumentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:portal.Base_checkPermission(\'document_module\', \'View\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_action</string>
<string>action_type/object_jio_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</string> </value>
<value> <string>object_jio_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransactionGroupConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>payment_mode</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Category\', )</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Payment mode must be defined</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>payment_mode_category_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_category_not_set</string> </key>
<value> <string>Payment Mode must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Existence Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>payment_transaction_group_type</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Category\', )</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Payment Transaction Group Type must be defined</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>payment_transaction_group_type_category_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_category_not_set</string> </key>
<value> <string>Payment Transaction Group Type must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Existence Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>price_currency</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Currency\', )</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Currency must be defined</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>price_currency_category_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_category_not_set</string> </key>
<value> <string>Currency must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Existence Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>source_payment</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: object.getPortalPaymentNodeTypeList()</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Source payment must be defined</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>source_payment_category_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_category_not_set</string> </key>
<value> <string>Section bank account must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Existence Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>source_section</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Organisation\', )</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Source section must be defined</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>source_section_category_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_category_not_set</string> </key>
<value> <string>Section must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Existence Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>stop_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Date must be defined</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>stop_date_constraint</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Date must be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Date must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Message import translateString
portal = context.getPortalObject()
payment_transaction_group = portal.restrictedTraverse(aggregate)
payment_transaction = context.getParentValue()
payment_transaction.setDefaultActivateParameterDict({"activate_kw": activate_kw})
if payment_transaction.getSimulationState() == 'planned':
payment_transaction.Base_workflowStatusModify(
workflow_action='confirm_action',
batch_mode=True,
)
if payment_transaction.getSimulationState() == 'confirmed':
payment_transaction.Base_workflowStatusModify(
workflow_action='start_action',
batch_mode=True,
)
payment_transaction.Base_workflowStatusModify(
workflow_action='stop_action',
comment=translateString(
"Posted automatically with payment transaction group ${payment_transaction_group_reference}",
mapping={'payment_transaction_group_reference': payment_transaction_group.getReference()}),
batch_mode=True,
)
if payment_transaction.getSimulationState() == 'stopped':
context.setAggregateValue(payment_transaction_group)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>aggregate, activate_kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionLine_stopAndSetAggregate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,12 +12,14 @@ except KeyError:
row, = portal.portal_simulation.getInventoryList(
select_dict={'count': 'COUNT(*)'},
ignore_group_by=1,
section_uid=context.getSourceSectionUid(),
section_uid=context.getSourceSection()
and portal.Base_getSectionUidListForSectionCategory(
context.getSourceSectionValue().getGroup(base=True)),
strict_aggregate_uid=context.getUid(),
node_uid=[x.uid for x in portal.portal_catalog(
portal_type='Account',
strict_account_type_uid=portal.portal_categories.account_type.asset.cash.bank.getUid(),
)],
)] or -1,
**params
)
cache[cache_key] = result = (row.count, row.total_quantity)
......
portal = context.getPortalObject()
kw['section_uid'] = context.getSourceSectionUid()
kw['section_uid'] = -1
if context.getSourceSection():
kw['section_uid'] = portal.Base_getSectionUidListForSectionCategory(
context.getSourceSectionValue().getGroup(base=True))
kw['default_aggregate_uid'] = context.getUid()
kw['parent_portal_type'] = ('Payment Transaction', 'Accounting Transaction')
......
portal = context.getPortalObject()
if mode == 'stopped_or_delivered':
simulation_state = ('delivered', 'stopped')
else:
assert mode == 'planned_or_confirmed', "Unknown mode, %r" % mode
simulation_state = ('planned', 'confirmed')
search_kw = dict(
parent_portal_type='Payment Transaction',
limit=None,
simulation_state=('delivered', 'stopped'),
section_uid=context.getSourceSectionUid(),
simulation_state=simulation_state,
section_uid=context.getSourceSection()
and portal.Base_getSectionUidListForSectionCategory(
context.getSourceSectionValue().getGroup(base=True)),
payment_uid=context.getSourcePaymentUid(),
resource_uid=context.getPriceCurrencyUid(),
node_category='account_type/asset/cash/bank',
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, **kw</string> </value>
<value> <string>limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, mode=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -12,6 +12,7 @@ context.activate(tag=tag).PaymentTransactionGroup_selectPaymentTransactionLineLi
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,
mode=mode,
tag=tag)
return context.Base_redirect(form_id,
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'view\', limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, **kw</string> </value>
<value> <string>form_id=\'view\', limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, mode=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -10,7 +10,15 @@ payment_relative_url_list = [brain.relative_url for brain
limit=limit,
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,)]
sign=sign,
mode=mode,)]
if mode == 'stopped_or_delivered':
method_id = 'AccountingTransactionLine_setAggregate'
else:
assert mode == 'planned_or_confirmed', "Unknown mode, %r" % mode
method_id = 'AccountingTransactionLine_stopAndSetAggregate'
object_list_len = len(payment_relative_url_list)
activate = context.getPortalObject().portal_activities.activate
......@@ -18,6 +26,6 @@ for i in xrange(0, object_list_len, batch_size):
current_path_list = payment_relative_url_list[i:i+batch_size]
activate(activity='SQLQueue', activate_kw=activate_kw,).callMethodOnObjectList(
current_path_list,
'AccountingTransactionLine_setAggregate',
method_id,
aggregate=aggregate,
activate_kw=activate_kw)
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, tag=\'\'</string> </value>
<value> <string>limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, mode=None, tag=\'\'</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
......@@ -108,7 +108,7 @@
</tuple>
<tuple>
<string>Movement_getSpecificReference</string>
<string>Specific Reference</string>
<string>Transaction Reference</string>
</tuple>
<tuple>
<string>Movement_getExplanationTitle</string>
......
......@@ -102,6 +102,7 @@
<string>your_start_date_range_min</string>
<string>your_start_date_range_max</string>
<string>your_sign</string>
<string>your_mode</string>
</list>
</value>
</item>
......
......@@ -411,7 +411,7 @@
</tuple>
<tuple>
<string>Movement_getSpecificReference</string>
<string>Specific Reference</string>
<string>Transaction Reference</string>
</tuple>
<tuple>
<string>Movement_getExplanationTitle</string>
......
......@@ -10,6 +10,9 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>end</string>
<string>required</string>
<string>start</string>
<string>title</string>
</list>
......@@ -61,10 +64,18 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>start</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -72,6 +83,14 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>50</string> </value>
</item>
<item>
<key> <string>end</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_integer_value</string> </value>
......@@ -80,6 +99,10 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>start</string> </key>
<value> <int>0</int> </value>
......
......@@ -25,9 +25,13 @@
#
##############################################################################
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from erp5.component.test.testAccounting import AccountingTestCase
class TestPaymentTransactionGroup(ERP5TypeTestCase):
class TestPaymentTransactionGroupReferences(ERP5TypeTestCase):
def test_source_reference_generated(self):
ptg = self.portal.payment_transaction_group_module.newContent(
portal_type='Payment Transaction Group')
......@@ -42,3 +46,196 @@ class TestPaymentTransactionGroup(ERP5TypeTestCase):
# a new source reference
self.assertNotEqual(
ptg.getSourceReference(), cloned_ptg.getSourceReference())
class TestPaymentTransactionGroupConstraint(ERP5TypeTestCase):
def afterSetUp(self):
ti = self.portal.portal_types['Payment Transaction Group']
ti.setTypePropertySheetList(
ti.getTypePropertySheetList() + ['PaymentTransactionGroupConstraint'])
self.commit()
def beforeTearDown(self):
self.abort()
ti = self.portal.portal_types['Payment Transaction Group']
ti.setTypePropertySheetList(
[ps for ps in ti.getTypePropertySheetList() if ps != 'PaymentTransactionGroupConstraint'])
self.commit()
def test_constraints(self):
ptg = self.portal.payment_transaction_group_module.newContent(
portal_type='Payment Transaction Group',
stop_date=None,
)
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[
'Currency must be defined',
'Date must be defined',
'Payment Mode must be defined',
'Payment Transaction Group Type must be defined',
'Section bank account must be defined',
'Section must be defined',
],
)
ptg.setPriceCurrencyValue(
self.portal.currency_module.newContent(portal_type='Currency'))
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[
'Date must be defined',
'Payment Mode must be defined',
'Payment Transaction Group Type must be defined',
'Section bank account must be defined',
'Section must be defined',
],
)
ptg.setStopDate(DateTime(2021, 1, 1))
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[
'Payment Mode must be defined',
'Payment Transaction Group Type must be defined',
'Section bank account must be defined',
'Section must be defined',
],
)
ptg.setPaymentModeValue(
self.portal.portal_categories.payment_mode.newContent(portal_type='Category'))
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[
'Payment Transaction Group Type must be defined',
'Section bank account must be defined',
'Section must be defined',
],
)
ptg.setPaymentTransactionGroupTypeValue(
self.portal.portal_categories.payment_transaction_group_type.incoming)
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[
'Section bank account must be defined',
'Section must be defined',
],
)
section = self.portal.organisation_module.newContent(
portal_type='Organisation'
)
ptg.setSourceSectionValue(section)
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[
'Section bank account must be defined',
],
)
bank_account = section.newContent(
portal_type='Bank Account'
)
ptg.setSourcePaymentValue(bank_account)
self.assertEqual(
sorted([str(m.getMessage()) for m in ptg.checkConsistency()]),
[])
class TestPaymentTransactionGroupPaymentSelection(AccountingTestCase, ERP5TypeTestCase):
def afterSetUp(self):
AccountingTestCase.afterSetUp(self)
self.bank_account = self.main_section.newContent(
portal_type='Bank Account',
price_currency_value=self.portal.currency_module.euro)
self.bank_account.validate()
self.tic()
# TODO: more PaymentTransactionGroup_getGroupablePaymentTransactionLineList test
def test_PaymentTransactionGroup_getGroupablePaymentTransactionLineList_mapping_organisation(self):
account_module = self.account_module
payment_main_section = self._makeOne(
portal_type='Payment Transaction',
simulation_state='delivered',
title='main section',
reference='P1',
source_section_value=self.main_section,
source_payment_value=self.bank_account,
destination_section_value=self.organisation_module.client_1,
start_date=DateTime(2014, 1, 1),
lines=(
dict(
source_value=account_module.bank,
source_debit=100,
id='bank'),
dict(
source_value=account_module.receivable,
source_credit=100)))
payment_section = self._makeOne(
portal_type='Payment Transaction',
simulation_state='delivered',
title='section',
reference='P2',
source_section_value=self.section,
source_payment_value=self.bank_account,
destination_section_value=self.organisation_module.client_2,
start_date=DateTime(2014, 1, 2),
lines=(
dict(
source_value=account_module.bank,
source_debit=200,
id='bank'),
dict(
source_value=account_module.receivable,
source_credit=200)))
ptg = self.portal.payment_transaction_group_module.newContent(
portal_type='Payment Transaction Group',
source_section_value=self.main_section,
source_payment_value=self.bank_account,
stop_date=DateTime(2014, 1, 31),)
self.tic()
line_list = ptg.PaymentTransactionGroup_getGroupablePaymentTransactionLineList(
limit=None,
start_date_range_min=None,
start_date_range_max=None,
sign='incoming',
mode='stopped_or_delivered',
)
self.assertEqual(
sorted([line.getObject().getRelativeUrl() for line in line_list]),
sorted([payment_main_section.bank.getRelativeUrl(), payment_section.bank.getRelativeUrl()]))
# Add a payment to the group
payment_section.bank.setAggregateValue(ptg)
self.tic()
# Now the listbox only remaining transactions
line_list = ptg.PaymentTransactionGroup_getGroupablePaymentTransactionLineList(
limit=None,
start_date_range_min=None,
start_date_range_max=None,
sign='incoming',
mode='stopped_or_delivered',
)
self.assertEqual(
sorted([line.getObject().getRelativeUrl() for line in line_list]),
sorted([payment_main_section.bank.getRelativeUrl()]))
# Add the other payment to the group
payment_main_section.bank.setAggregateValue(ptg)
self.tic()
# the listbox of the payment transaction group correctly show both payments.
line_list = ptg.PaymentTransactionGroup_view.listbox.get_value(
'default',
render_format='list',)
self.assertEqual(
sorted([(line.is_stat_line, line['Movement_getMirrorSectionTitle'], line['total_quantity'])
for line in line_list if not line.is_title_line]),
[(0, 'Client 1', 100.0), (0, 'Client 2', 200.0), (1, None, 300.0)],
)
2021-04-23
* New "Select Planned or Confirmed Payments and Post them to General Ledger" mode to select payments.
2011-07-13 Gabriel:
* Add field on PaymentTransactionGroup_view to display the source_administration property
......
Payment Transaction Group Module | view
Payment Transaction Group | document_list
Payment Transaction Group | jump_to_document
Payment Transaction Group | select_payment_list
Payment Transaction Group | view
Payment Transaction | jump_payment_transaction_group
......
PaymentTransactionGroupConstraint
\ No newline at end of file
erp5_full_text_mroonga_catalog
erp5_accounting_ui_test
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>renderjs_ui_payment_mean_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testPaymentTransactionGroupSelectPaymentsFastInput</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/view_fast_input" />
<tr>
<td>assertSelected</td>
<td>field_your_sign</td>
<td>Outgoing</td>
</tr>
<!-- update dialog -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- choose sign -->
<tr>
<td>select</td>
<td>field_your_sign</td>
<td>Incoming</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- choose limit -->
<tr>
<td>select</td>
<td>field_your_sign</td>
<td>Incoming</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_limit']</td>
<td>1</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- choose dates -->
<tr>
<td>type</td>
<td>//input[@name='field_your_limit']</td>
<td>10</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_start_date_range_min']</td>
<td>2019-10-20</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- select -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Payment selection in progress.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td>${renderjs_url}/payment_transaction_group_module/erp5_payment_mean_ui_test_payment_transaction_group</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testPaymentTransactionGroupSelectPlannedOrConfirmedPaymentsFastInput</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/view_fast_input" />
<tr>
<td>assertSelected</td>
<td>field_your_mode</td>
<td>Select already Posted to General Ledger or Closed Payments</td>
</tr>
<!-- update dialog -->
<tr>
<td>select</td>
<td>field_your_mode</td>
<td>Select Planned or Confirmed Payments and Post them to General Ledger</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<!-- out of the 3, one is not consistent -->
<tal:block tal:define="pagination_configuration python: {'header': '(3)', 'footer': '3 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- select -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Payment selection in progress.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td>${renderjs_url}/payment_transaction_group_module/erp5_payment_mean_ui_test_payment_transaction_group</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<!-- the not consistent transaction was not selected, we selected and validated the two consistent ones -->
<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>assertTextPresent</td>
<td>Posted to General Ledger</td>
<td></td>
</tr>
<!-- XXX we don't really need to wait for activities here, but we need to `open` a different page so that we can
open erp5_payment_mean_ui_test_confirmed_not_consistent_outgoing_payment later.
selenium open command expect that a new page is loaded, without this we would just re-open the same page with
a different fragment and selenium would never notice with open is executed.
-->
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- the not consistent transaction is left separately, there's a note in history explaining why it could not be selected -->
<tr>
<td>open</td>
<td>${renderjs_url}/accounting_module/erp5_payment_mean_ui_test_confirmed_not_consistent_outgoing_payment</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Views'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'History'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertTextPresent</td>
<td>Transaction is not balanced for erp5_payment_mean_ui_test_organisation</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_payment_mean_renderjs_ui_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>description</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>text</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Common Template for PTZuite, it will reuse parts of the Listbox Zuite</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/portal_preferences/ERP5Site_setPaymentMeanUiTestPreference</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Set Payment Mean Preference Successfully.</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>${base_url}/web_site_module/renderjs_runner/#</td>
<td>renderjs_url</td>
</tr>
</tal:block>
<tal:block metal:define-macro="delete_data">
<tr>
<td colspan="3"><b>Delete Payment Mean Test Data</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_deletePaymentMeanUiTestData</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Deleted Successfully.</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="prepare_data">
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanRenderJsUiTest/macros/delete_data" />
<tr>
<td colspan="3"><b>Create Payment Mean Test Data</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_createPaymentMeanUiTestData</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Test Data Created.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="view_fast_input">
<tr>
<td colspan="3"><b>Display the fast input</b></td>
</tr>
<tr>
<td>open</td>
<td>${renderjs_url}/payment_transaction_group_module/erp5_payment_mean_ui_test_payment_transaction_group</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<!-- Wait for gadget to be loaded -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']</td>
<td></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Actions'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_action.html']</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Select Payments</td>
<td></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Select Payments'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Select Payments</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2021 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from Products.ERP5Type.tests import ERP5TypeFunctionalTestCase
class TestFunctionalRenderJSPaymentMean(ERP5TypeFunctionalTestCase.ERP5TypeFunctionalTestCase):
run_only = "renderjs_ui_payment_mean_zuite"
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testFunctionalRJSPaymentMean</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalRJSPaymentMean</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Copyright (C) 2021 Nexedi SA
\ No newline at end of file
erp5_payment_mean_ui_test
erp5_web_renderjs_ui_test
\ No newline at end of file
portal_tests/renderjs_ui_payment_mean_zuite
portal_tests/renderjs_ui_payment_mean_zuite/**
\ No newline at end of file
erp5_payment_mean_renderjs_ui_test
\ No newline at end of file
test.erp5.testFunctionalRJSPaymentMean
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ No newline at end of file
erp5_payment_mean_renderjs_ui_test
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>generate_sepa_credit_transfer</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Generate SEPA Credit Transfer File</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/PaymentTransactionGroup_viewGenerateSEPACreditTransferFileDialog?reset:int=1</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_payment_mean_sepa</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""Return a text to use as Unstructured RemittanceInformation for this payment transaction.
This is used in SEPA Credit Transfer export, 2.90 RemittanceInformation
This script is a customization point.
"""
ptg = context.getAggregateValue(portal_type='Payment Transaction Group')
if ptg.getSourcePayment() == context.getSourcePayment():
third_party = context.getDestinationSectionValue()
else:
third_party = context.getSourceSectionValue()
third_party_name = third_party.getCorporateName() or third_party.getTitle()
return "{invoice_reference} {third_party_name}".format(
invoice_reference=context.getParentValue().getCausalityReference() or '',
third_party_name=third_party_name,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionLine_getSEPACreditTransferRemittanceInformation</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Message import translateString
assert version == 'pain.001.001.02', 'Unsupported version'
portal = context.getPortalObject()
portal.portal_contributions.newContent(
reference=context.getSourceReference(),
data=getattr(context, 'PaymentTransactionGroup_viewAsSEPACreditTransferPain.001.001.02')().encode('utf-8'),
filename=context.getSourceReference() + '.xml',
# XXX we should probably use a dedicated type based method or preference,
# for now we use the same as for *attached* documents.
publication_section=context.getTypeBasedMethod('getPreferredAttachedDocumentPublicationSection')(),
follow_up=context.getRelativeUrl(),
).release()
return context.Base_redirect(form_id, keep_items={
'portal_status_message': translateString('SEPA Credit Transfer File generated.')
})
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>version, form_id=\'\', **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransactionGroup_generateSEPACreditTransferFile</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
section = context.getSourceSectionValue()
section_bank_account = context.getSourcePaymentValue()
assert section_bank_account.getValidationState() == 'validated'
currency = context.getPriceCurrencyReference() or context.getPriceCurrencyTitle()
assert currency.upper() == 'EUR', 'Wrong currency %s' % currency
data_dict = {
'GrpHdr': {
'MsgId': context.getSourceReference(),
'CreDtTm': context.getStopDate().toZone('UTC').asdatetime().isoformat(),
'InitgPty': {
'Nm': section.getCorporateName() or section.getTitle(),
'Id': {
'OrgId': {
'PrtryId': {
'Id': None, # TODO is this really required ?
}
}
}
}
},
'PmtInf': {
'PmtInfId': context.getReference() or context.getSourceReference(),
'ReqdExctnDt':context.getStopDate().toZone('UTC').asdatetime().strftime('%Y-%m-%d'),
'Dbtr': {
'Nm': section.getCorporateName() or section.getTitle(),
},
'DbtrAcct': {
'Id': {
'IBAN': section_bank_account.getIban().replace(' ', '').replace('\t', ''),
}
},
'DbtrAgt': {
'FinInstnId': {
'BIC': section_bank_account.getBicCode().strip(),
}
}
},
}
# This does not support payment transactions with multiple lines.
# To prevent generating a file where the same end to end id exists twice,
# we just check that EndToEndId are unique in this file.
end_to_end_id_set = set([])
transaction_list = []
total = 0
for brain in context.PaymentTransactionGroup_getAccountingTransactionLineList():
amount = round(-brain.total_quantity, 2)
assert amount > 0
total += amount
transaction_line = brain.getObject()
transaction = transaction_line.getExplanationValue()
if brain.payment_uid == transaction_line.getSourcePaymentUid():
creditor_entity = transaction_line.getDestinationSectionValue()
creditor_bank_account = transaction_line.getDestinationPaymentValue()
else:
assert brain.payment_uid == transaction_line.getDestinationPaymentUid()
creditor_entity = transaction_line.getSourceSectionValue()
creditor_bank_account = transaction_line.getSourcePaymentValue()
assert creditor_bank_account.getValidationState() == 'validated', \
'%s is not validated' % creditor_bank_account.getRelativeUrl()
end_to_end_id = transaction.PaymentTransaction_getOrGenerateReference()
assert end_to_end_id not in end_to_end_id_set
end_to_end_id_set.add(end_to_end_id)
transaction_list.append(
{
'PmtId': {
'EndToEndId': end_to_end_id,
},
'RmtInf': {
'Ustrd': transaction_line.AccountingTransactionLine_getSEPACreditTransferRemittanceInformation(),
},
'Cdtr': {
'Nm': creditor_entity.getCorporateName() or creditor_entity.getTitle(),
'PstlAdr': (creditor_entity.getDefaultAddressText() or '').splitlines(),
'Ctry': creditor_entity.getDefaultAddressRegion() and creditor_entity.getDefaultAddressValue().getRegionReference(),
},
'Amt': {
'InstdAmt': '%0.2f' % amount
},
'CdtrAcct': {
'Id': {
'IBAN': creditor_bank_account.getIban().replace(' ', '').replace('\t', ''),
}
},
'CdtrAgt': {
'FinInstnId': {
'BIC': section_bank_account.getBicCode().strip(),
}
}
}
)
data_dict['GrpHdr']['NbOfTxs'] = len(transaction_list)
data_dict['GrpHdr']['CtrlSum'] = '%0.2f' % total
data_dict['transaction_list'] = transaction_list
return data_dict
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransactionGroup_getSEPACreditTransferDataDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransactionGroup_viewAsSEPACreditTransferPain.001.001.02</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Document
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02"
tal:define="data context/PaymentTransactionGroup_getSEPACreditTransferDataDict">
<pain.001.001.02>
<GrpHdr>
<MsgId tal:content="data/GrpHdr/MsgId"></MsgId>
<CreDtTm tal:content="data/GrpHdr/CreDtTm">2001-02-03T04:05:06</CreDtTm>
<BtchBookg>true</BtchBookg>
<NbOfTxs tal:content="data/GrpHdr/NbOfTxs">1</NbOfTxs>
<CtrlSum tal:content="data/GrpHdr/CtrlSum">1000</CtrlSum>
<Grpg>MIXD</Grpg>
<InitgPty>
<Nm tal:content="data/GrpHdr/InitgPty/Nm"></Nm>
<Id tal:condition="data/GrpHdr/InitgPty/Id/OrgId/PrtryId/Id">
<OrgId>
<PrtryId>
<Id tal:content="data/GrpHdr/InitgPty/Id/OrgId/PrtryId/Id">???</Id>
</PrtryId>
</OrgId>
</Id>
</InitgPty>
</GrpHdr>
<PmtInf>
<PmtInfId tal:content="data/PmtInf/PmtInfId"></PmtInfId>
<PmtMtd>TRF</PmtMtd>
<PmtTpInf>
<SvcLvl>
<Cd>SEPA</Cd>
</SvcLvl>
</PmtTpInf>
<ReqdExctnDt tal:content="data/PmtInf/ReqdExctnDt">1970-01-01</ReqdExctnDt>
<Dbtr>
<Nm tal:content="data/PmtInf/Dbtr/Nm"></Nm>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN tal:content="data/PmtInf/DbtrAcct/Id/IBAN"></IBAN>
</Id>
<Ccy>EUR</Ccy>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<BIC tal:content="data/PmtInf/DbtrAgt/FinInstnId/BIC"></BIC>
</FinInstnId>
</DbtrAgt>
<CdtTrfTxInf tal:repeat="transaction data/transaction_list">
<PmtId>
<EndToEndId tal:content="transaction/PmtId/EndToEndId"></EndToEndId>
</PmtId>
<Amt>
<InstdAmt Ccy="EUR" tal:content="transaction/Amt/InstdAmt">123.45</InstdAmt>
</Amt>
<CdtrAgt>
<FinInstnId>
<BIC tal:content="transaction/CdtrAgt/FinInstnId/BIC">XXX</BIC>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm tal:content="transaction/Cdtr/Nm"></Nm>
<PstlAdr tal:condition="transaction/Cdtr/Ctry">
<tal:block tal:repeat="line transaction/Cdtr/PstlAdr">
<AdrLine tal:content="line"></AdrLine>
</tal:block>
<Ctry tal:content="transaction/Cdtr/Ctry"></Ctry>
</PstlAdr>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN tal:content="transaction/CdtrAcct/Id/IBAN">FR76...</IBAN>
</Id>
</CdtrAcct>
<RmtInf>
<Ustrd tal:content="transaction/RmtInf/Ustrd"></Ustrd>
</RmtInf>
</CdtTrfTxInf>
</PmtInf>
</pain.001.001.02>
</Document>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>PaymentTransactionGroup_generateSEPACreditTransferFile</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>your_version</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransactionGroup_viewGenerateSEPACreditTransferFileDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Generate SEPA Credit Transfer File</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""Returns an unique reference for this payment transaction. If it does not already have a reference, a new one is generated.
"""
context.getTypeBasedMethod('generateReference')()
return context.getReference()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransaction_getOrGenerateReference</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>pain.001.001.02.xsd</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/xml</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>pain.001.001.02.xsd</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
##############################################################################
# coding: utf-8
# Copyright (c) 2021 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import urlparse
import lxml.etree
from DateTime import DateTime
from erp5.component.test.testAccounting import AccountingTestCase
class TestPaymentTransactionGroupPaymentSEPA(AccountingTestCase):
def afterSetUp(self):
AccountingTestCase.afterSetUp(self)
self.login()
self.bank_account = self.section.newContent(
portal_type='Bank Account',
iban='FR76 3000 6000 0112 3456 7890 189',
bic_code='TESTXXXX',
price_currency_value=self.portal.currency_module.euro)
self.bank_account.validate()
if 'FR' not in self.portal.portal_categories.region.objectIds():
self.portal.portal_categories.region.newContent(
portal_type='Category',
id='FR',
title='France',
reference='FR',
)
self.tic()
def _createPaymentsAndPTG(self):
ptg = self.portal.payment_transaction_group_module.newContent(
portal_type='Payment Transaction Group',
source_section_value=self.section,
source_payment_value=self.bank_account,
price_currency_value=self.portal.currency_module.euro,
stop_date=DateTime('2021/01/02 03:04:05 Europe/Paris'),
)
ptg.open()
account_module = self.account_module
invoice_1 = self._makeOne(
portal_type='Sale Invoice Transaction',
reference='INVOICE1'
)
supplier1 = self.portal.organisation_module.newContent(
portal_type='Organisation',
title='Supplier1',
default_address_street_address='1 rue des pommes\n3ème étage',
default_address_city='LILLE',
default_address_zip_code='59000',
default_address_region='FR',
)
bank_account_supplier1 = supplier1.newContent(
portal_type='Bank Account',
iban='FI1410093000123458',
bic_code='TESTXXXX'
)
bank_account_supplier1.validate()
payment_1 = self._makeOne(
portal_type='Payment Transaction',
simulation_state='delivered',
title='one',
causality_value=invoice_1,
source_section_value=self.section,
source_payment_value=self.bank_account,
destination_section_value=supplier1,
destination_payment_value=bank_account_supplier1,
start_date=DateTime(2021, 1, 1),
lines=(
dict(
source_value=account_module.payable,
source_debit=100),
dict(
source_value=account_module.bank,
source_credit=100,
aggregate_value=ptg)))
supplier2 = self.portal.organisation_module.newContent(
portal_type='Organisation',
title='Supplier2'
)
bank_account_supplier2 = supplier2.newContent(
portal_type='Bank Account',
iban='CY21002001950000357001234567',
bic_code='TESTXXXX'
)
bank_account_supplier2.validate()
payment_2 = self._makeOne(
portal_type='Payment Transaction',
simulation_state='delivered',
title='two',
destination_section_value=self.section,
destination_payment_value=self.bank_account,
source_section_value=supplier2,
source_payment_value=bank_account_supplier2,
start_date=DateTime(2021, 1, 1),
lines=(
dict(
destination_value=account_module.payable,
destination_debit=200),
dict(
destination_value=account_module.bank,
destination_credit=200,
aggregate_value=ptg)))
self.tic()
return payment_1, payment_2, ptg
def test_PaymentTransactionGroup_viewAsSEPACreditTransferPain_001_001_02(self):
payment_1, payment_2, ptg = self._createPaymentsAndPTG()
pain = lxml.etree.fromstring(
getattr(ptg, 'PaymentTransactionGroup_viewAsSEPACreditTransferPain.001.001.02')().encode('utf-8'))
# this XML validates against the schema
xmlschema = lxml.etree.XMLSchema(
lxml.etree.fromstring(str(getattr(self.portal, 'pain.001.001.02.xsd').data)))
xmlschema.assertValid(pain)
self.assertEqual(
[node.text for node in pain.findall('.//{*}GrpHdr/{*}MsgId')],
[ptg.getSourceReference()]
)
self.assertEqual(
[node.text for node in pain.findall('.//{*}GrpHdr/{*}NbOfTxs')],
['2']
)
self.assertEqual(
[node.text for node in pain.findall('.//{*}GrpHdr/{*}CtrlSum')],
['300.00']
)
self.assertEqual(
[node.text for node in pain.findall('.//{*}CreDtTm')],
['2021-01-02T02:04:05+00:00']
)
self.assertEqual(
[node.text for node in pain.findall('.//{*}InitgPty/{*}Nm')],
['My Organisation Inc.']
)
self.assertEqual(
[node.text for node in pain.findall('.//{*}DbtrAcct/{*}Id/{*}IBAN')],
['FR7630006000011234567890189']
)
self.assertEqual(
sorted([node.text for node in pain.findall('.//{*}CdtTrfTxInf/{*}CdtrAcct/{*}Id/{*}IBAN')]),
['CY21002001950000357001234567', 'FI1410093000123458']
)
self.assertEqual(
sorted([node.text for node in pain.findall('.//{*}CdtTrfTxInf/{*}Amt/{*}InstdAmt')]),
['100.00', '200.00']
)
self.assertEqual(
sorted([node.text for node in pain.findall('.//{*}CdtTrfTxInf/{*}Cdtr/{*}Nm')]),
['Supplier1', 'Supplier2']
)
self.assertEqual(
[node.text for node in pain.findall('.//{*}CdtTrfTxInf/{*}Cdtr/{*}PstlAdr/{*}AdrLine')],
[u'1 rue des pommes', u'3ème étage', u'59000 LILLE']
)
self.assertEqual(
sorted([node.text for node in pain.findall('.//{*}CdtTrfTxInf/{*}RmtInf/{*}Ustrd')]),
[' Supplier2', 'INVOICE1 Supplier1']
)
# generating the XML file set reference on payment transactions
self.assertTrue(payment_1.getReference())
self.assertTrue(payment_2.getReference())
self.assertEqual(
sorted([node.text for node in pain.findall('.//{*}CdtTrfTxInf/{*}PmtId/{*}EndToEndId')]),
sorted([payment_1.getReference(), payment_2.getReference()]),
)
def test_generate_sepa_credit_transfer_action(self):
_, _, ptg = self._createPaymentsAndPTG()
ret = ptg.PaymentTransactionGroup_generateSEPACreditTransferFile(
version='pain.001.001.02')
self.assertEqual(
urlparse.parse_qs(urlparse.urlparse(ret).query)['portal_status_message'],
['SEPA Credit Transfer File generated.'])
self.tic()
f, = ptg.getFollowUpRelatedValueList(
portal_type='File',
)
self.assertEqual(f.getReference(), ptg.getSourceReference())
pain = lxml.etree.fromstring(f.getData())
xmlschema = lxml.etree.XMLSchema(
lxml.etree.fromstring(str(getattr(self.portal, 'pain.001.001.02.xsd').data)))
xmlschema.assertValid(pain)
self.assertEqual(
[node.text for node in pain.findall('.//{*}GrpHdr/{*}CtrlSum')],
['300.00']
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testPaymentTransactionGroupSEPA</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testPaymentTransactionGroupSEPA</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_payment_mean
\ No newline at end of file
Single Euro Payments Area (SEPA) support for payment transactions.
\ No newline at end of file
Payment Transaction Group | generate_sepa_credit_transfer
\ No newline at end of file
erp5_payment_mean_sepa
\ No newline at end of file
test.erp5.testPaymentTransactionGroupSEPA
\ No newline at end of file
erp5_full_text_mroonga_catalog
erp5_accounting_ui_test
\ No newline at end of file
erp5_payment_mean_sepa
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>payment_mean_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testPaymentTransactionGroupSelectPlannedOrConfirmedPaymentsFastInput</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_viewCommonTemplatePaymentMeanUiTest/macros/view_fast_input" />
<tr>
<td>assertSelected</td>
<td>field_your_mode</td>
<td>Select already Posted to General Ledger or Closed Payments</td>
</tr>
<!-- update dialog -->
<tr>
<td>select</td>
<td>field_your_mode</td>
<td>Select Planned or Confirmed Payments and Post them to General Ledger</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>dialog_update_button</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<!-- out of the 3, one is not consistent -->
<td>3 records</td>
</tr>
<!-- select -->
<tr>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Payment selection in progress.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td>${base_url}/payment_transaction_group_module/erp5_payment_mean_ui_test_payment_transaction_group</td>
<td></td>
</tr>
<!-- the not consistent transaction was not selected, we selected and validated the two consistent ones -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td>2 records</td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Posted to General Ledger</td>
<td></td>
</tr>
<!-- the not consistent transaction is left separately, there's a note in history explaining why it could not be selected -->
<tr>
<td>open</td>
<td>${base_url}/accounting_module/erp5_payment_mean_ui_test_confirmed_not_consistent_outgoing_payment/Base_viewHistory</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Transaction is not balanced for erp5_payment_mean_ui_test_organisation</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
Copyright (C) 2021 Nexedi SA
\ No newline at end of file
This diff is collapsed.
GPL
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment