Commit 1dbc9196 authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branches 'origin/mr/1420', 'origin/mr/1400',...

Merge remote-tracking branches 'origin/mr/1420', 'origin/mr/1400', 'origin/mr/1428' and 'origin/mr/1430' into wip/configurator_trade
Pipeline #15747 passed with stage
in 0 seconds
......@@ -175,7 +175,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: list(context.getPortalItemTypeList()) + [\'Payment Transaction Group\', ]</string> </value>
<value> <string>python: [(x, x) for x in list(context.getPortalItemTypeList()) + [\'Payment Transaction Group\', ]]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -175,7 +175,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: list(context.getPortalItemTypeList()) + (\'Payment Transaction Group\', )</string> </value>
<value> <string>python: [(x, x) for x in list(context.getPortalItemTypeList()) + [\'Payment Transaction Group\', ]]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -165,21 +165,65 @@ class PDFDocument(Image):
security.declarePrivate('_convertToText')
def _convertToText(self, format='txt'): # pylint: disable=redefined-builtin
"""
Convert the PDF text content to text with pdftotext
"""Convert the PDF to text
If the PDF have text, return the text, otherwise try to do OCR using
tesseract.
"""
if not self.hasData():
return ''
data = str(self.getData())
try:
from PyPDF2 import PdfFileReader
from PyPDF2.utils import PdfReadError
except ImportError:
pass
else:
try:
if PdfFileReader(StringIO(data)).isEncrypted:
return ''
except PdfReadError:
return ''
mime_type = 'text/plain'
portal_transforms = self.getPortalObject().portal_transforms
filename = self.getFilename()
result = portal_transforms.convertToData(mime_type, str(self.getData()),
result = portal_transforms.convertToData(mime_type, data,
context=self, filename=filename,
mimetype=self.getContentType())
if result:
return result
else:
# Try to use OCR
# Try to use OCR from ghostscript, but tolerate that the command might
# not be available.
process = None
command = [
'gs', '-q', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE',
'-dNOPROMPT', '-sDEVICE=ocr', '-r300x300', '-o', '-', '-f', '-'
]
try:
process = Popen(
command,
stdin=PIPE,
stdout=PIPE,
stderr=PIPE,
close_fds=True,
)
output = process.communicate(data)[0]
if process.returncode:
raise ConversionError("Error invoking ghostscript:" + output)
return output.strip()
except OSError as e:
if e.errno != errno.ENOENT:
raise
finally:
del process
# We don't have ghostscript, fallback to the expensive pipeline using:
# pdf -- (Image._convert imagemagick) --> png
# -- (PortalTransforms.png_to_tiff imagemagick) --> tiff
# -- (PortalTransforms.tiff_to_text tesseract) --> text
#
# As high dpi images are required, it may take some times to convert the
# pdf.
# It may be required to use activities to fill the cache and at the end,
......
content_information = context.getContentInformation()
page_number = int(content_information.get('Pages', 0))
return [[page_number]]
content_information = context.getContentInformation()
number_of_pages = int(content_information.get('Pages', 1))
max_ = number_of_pages - 1
selection_index = int(selection_index)
if selection_index > max_:
return max_
elif -max_ > selection_index:
return 0
elif selection_index < 0:
return max_ + selection_index + 1
else:
return selection_index
"""
THis script returns a suitable slide list of PDF thumbnails
for current form selection.
It's to be used in a listbox.
"""
from Products.ERP5Type.Document import newTempBase
content_information = context.getContentInformation()
page_number = int(content_information.get('Pages', 0))
limit = kw.get('limit', (0, 0))
list_start = int(kw.get('list_start', 0))
list_lines = int(kw.get('list_lines', 0))
size = list_lines or limit[1]
list_end = list_start + size
page_list = range(page_number)
result = []
for i in page_list[list_start:list_end]:
x = {'title': '%s' %i,
'frame':'%s' %i} # frame is used by listbox render field
temp_object = newTempBase(context, x['title'], **x)
result.append(temp_object)
return result
<div class="pdf-preview-content"
tal:define="frame request/frame|
python:here.PDF_getPageNumberFromSelectionIndex(request.get('selection_index', 0));
display python: request.get('display', context.portal_preferences.getPreference('preferred_image_size', 'large'));
format python: request.get('format', context.portal_preferences.getPreference('preferred_image_format', 'png'))">
<img src="" alt="" style="background-color:white;"
tal:attributes="src
string:${here/absolute_url}/index_html?display=${display}&format=${format}&frame=${frame}"/>
</div>
\ No newline at end of file
<tal:block tal:replace="nothing">
<!--
XXX: PDF pagination should be similar to OOo one (using iframe). This part should also be async ideally
-->
</tal:block>
<tal:block tal:define="current_thumbnail_index
request/frame|
python:here.PDF_getPageNumberFromSelectionIndex(request.get('selection_index', 0));
all_thunmbnails python: here.PDF_countThumbnailList()[0][0];
next_thunmbnail_index python: current_thumbnail_index + 1;
previous_thunmbnail_index python: current_thumbnail_index - 1;
parent_doc_url here/absolute_url;
base_url python: '%s/%s' % (parent_doc_url, request.get('current_form_id', 'view'));
hide_left_side_links python: not current_thumbnail_index >= 1;
hide_right_side_links python: not all_thunmbnails > next_thunmbnail_index;">
<div class="pdf-preview-navigation">
<a tal:omit-tag="hide_left_side_links"
tal:attributes="href string:${base_url}?selection_index=0">
<img src="images/transparent-image.gif"
i18n:attributes="alt; title"
i18n:domain="ui"
alt="First"
title="First"
class="first"
tal:attributes="class python: test(hide_left_side_links, 'first shaded', 'first')"/>
</a>
<a tal:omit-tag="hide_left_side_links"
tal:attributes="href string:${base_url}?selection_index=${previous_thunmbnail_index}">
<img src="images/transparent-image.gif"
i18n:attributes="alt; title"
i18n:domain="ui"
alt="Previous"
title="Previous"
class="previous"
tal:attributes="class python: test(hide_left_side_links, 'previous shaded', 'previous')"/>
</a>
<!-- Current Thumbnail / Total Thumbnails -->
<input name="pdf_selection_index"
size="1"
tal:attributes="value python:current_thumbnail_index+1"
onkeypress="return redirectPDFPage(event, this)"/>
/ <span tal:content="all_thunmbnails"/>
<a tal:omit-tag="hide_right_side_links"
tal:attributes="href string:${base_url}?selection_index=${next_thunmbnail_index}">
<img src="images/transparent-image.gif"
i18n:attributes="alt; title"
i18n:domain="ui"
alt="Next"
title="Next"
class="next"
tal:attributes="class python: test(hide_right_side_links, 'next shaded', 'next')"/>
</a>
<a tal:omit-tag="hide_right_side_links"
tal:attributes="href string:${base_url}?selection_index=${all_thunmbnails}">
<img src="images/transparent-image.gif"
i18n:attributes="alt; title"
i18n:domain="ui"
alt="Last"
title="Last"
class="last"
tal:attributes="class python: test(hide_right_side_links, 'last shaded', 'last')"/>
</a>
</div>
</tal:block>
\ No newline at end of file
<tal:block
tal:define="cell python: request.get('cell');
frame python: cell.frame;
display python: request.get('display', 'thumbnail');
format python: request.get('format',
context.portal_preferences.getPreference('preferred_image_format', 'png'))">
<a tal:attributes="href string:PDF_viewHTMLPreviewAsImage?selection_index=${frame}">
<img title="Thumbnail" style="background-color:white;"
i18n:attributes="title" i18n:domain="ui"
tal:attributes="src string:index_html?display=${display}&format=${format}&frame=${frame}"/>
</a>
</tal:block>
\ No newline at end of file
......@@ -71,6 +71,7 @@ from AccessControl import Unauthorized
from Products.ERP5Type import Permissions
from DateTime import DateTime
from ZTUtils import make_query
import PyPDF2
QUIET = 0
......@@ -1946,13 +1947,34 @@ document.write('<sc'+'ript type="text/javascript" src="http://somosite.bg/utb.ph
def test_PDFDocument_asTextConversion(self):
"""Test a PDF document with embedded images
To force usage of Ocropus portal_transform chain
To force usage of ghostscript with embedded tesseract OCR device
"""
portal_type = 'PDF'
module = self.portal.getDefaultModule(portal_type)
upload_file = makeFileUpload('TEST.Embedded.Image.pdf')
document = module.newContent(portal_type=portal_type, file=upload_file)
self.assertEqual('ERP5 is a free software.', document.asText())
document = self.portal.document_module.newContent(
portal_type='PDF',
file=makeFileUpload('TEST.Embedded.Image.pdf'))
self.assertEqual(document.asText(), 'ERP5 is a free software.')
def test_broken_pdf_asText(self):
class StringIOWithFilename(StringIO.StringIO):
filename = 'broken.pdf'
document = self.portal.document_module.newContent(
portal_type='PDF',
file=StringIOWithFilename('broken'))
self.assertEqual(document.asText(), '')
self.tic() # no activity failure
def test_password_protected_pdf_asText(self):
pdf_reader = PyPDF2.PdfFileReader(makeFileUpload('TEST.Embedded.Image.pdf'))
pdf_writer = PyPDF2.PdfFileWriter()
pdf_writer.addPage(pdf_reader.getPage(0))
pdf_writer.encrypt('secret')
encrypted_pdf_stream = StringIO.StringIO()
pdf_writer.write(encrypted_pdf_stream)
document = self.portal.document_module.newContent(
portal_type='PDF',
file=encrypted_pdf_stream)
self.assertEqual(document.asText(), '')
self.tic() # no activity failure
def createRestrictedSecurityHelperScript(self):
script_content_list = ['format=None, **kw', """
......
......@@ -53,7 +53,6 @@ Image | related_document
Image | version_view
PDF | download
PDF | file_upload
PDF | html_view
PDF | jump_to_all_related
PDF | jump_to_predecessor
PDF | jump_to_similar
......
<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>testCheckPDFThumbnail</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">testCheckPDFThumbnail</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/KMZuite_CommonTemplate/macros/createKMWebSite" />
<tr>
<td>openAndWait</td>
<td>${base_url}/web_site_module/km_test_web_site</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=New Document</td>
<td></td>
</tr>
<tr>
<td>setFile</td>
<td>field_your_file</td>
<td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive.MultiplePages.PDF-001-en.pdf tiolive-ERP5.Freedom.TioLive.MultiplePages.PDF-001-en.pdf</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>successfully</td>
<td></td>
</tr>
<tr>
<td>storeAttribute</td>
<td>//ul[@class="breadcrumb"]//li[3]/a@href</td>
<td>file_url</td>
</tr>
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities"> Wait for activities</span>
<tr>
<td>openAndWait</td>
<td>${file_url}?editable_mode:int=1</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>PDF</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_title</td>
<td>TioLive, ERP5, Freedom</td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_reference</td>
<td>tiolive-ERP5.Freedom.TioLive.MultiplePages.PDF</td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_version</td>
<td>001</td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_language</td>
<td>en</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>tiolive-ERP5.Freedom.TioLive.MultiplePages.PDF-001-en.pdf</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>PDF</td>
<td></td>
</tr>
<!-- Check PDF thumbnail preview works -->
<tr>
<td>clickAndWait</td>
<td>link=Thumbnails</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-start-number"]</td>
<td>1</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-stop-number"]</td>
<td>10</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td>16 records</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@title='Thumbnail']</td>
<td></td>
</tr>
<!-- Check PDF thumbnail preview navigation-->
<tr>
<td>clickAndWait</td>
<td>//button[@class="listbox_next_page"]</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-start-number"]</td>
<td>11</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-stop-number"]</td>
<td>16</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td>16 records</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@title='Thumbnail']</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="listbox_previous_page"]</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-start-number"]</td>
<td>1</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-stop-number"]</td>
<td>10</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td>16 records</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@title='Thumbnail']</td>
<td></td>
</tr>
<!-- Go to PDF default big preview -->
<tr>
<td>clickAndWait</td>
<td>//tr[@class="listbox-data-line-1 DataB"]/td/div/a/img[@title='Thumbnail']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>2</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='First']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Previous']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Next']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[@alt='Last']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class='pdf-preview-content']/img</td>
<td></td>
</tr>
<!-- Check if PDF thumbnail navigation works -->
<tr>
<td>clickAndWait</td>
<td>//img[@alt='Next']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>3</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//img[@alt='First']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//img[@alt='Last']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>16</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//img[@alt='First']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>1</td>
</tr>
<!-- Type in test -->
<tr>
<td>type</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>5</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>\13</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="pdf_selection_index"]</td>
<td>5</td>
</tr>
<tal:block metal:use-macro="here/KMZuite_CommonTemplate/macros/deleteKMWebSite" />
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -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"
......
......@@ -1531,9 +1531,18 @@ msgstr "Domiciliation bancaire"
msgid "Bank Account Type"
msgstr "Type de compte en banque"
msgid "Bank Account must belong to Section"
msgstr "Le compte en banque doit appartenir à la section"
msgid "Bank Accounts"
msgstr "Comptes bancaires"
msgid "Bank Accounts must be validated"
msgstr "Les comptes en banque doivent être validés"
msgid "Bank Accounts must have IBAN and BIC"
msgstr "Les comptes en banque doivent avoir un IBAN et un BIC"
msgid "Bank Branch"
msgstr "Code guichet"
......@@ -5575,6 +5584,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"
......@@ -6871,9 +6883,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é"
......@@ -7159,6 +7177,9 @@ msgstr "Minimiser le prix"
msgid "Minimize"
msgstr "Minimiser"
msgid "Minimum Date"
msgstr "Date minimale"
msgid "Minimum Delay (Day)"
msgstr "Délai minimum (jours)"
......@@ -7570,6 +7591,9 @@ msgstr "Aucun document correspondant n'a été trouvé."
msgid "No trade condition."
msgstr "Pas de condition commerciale trouvée."
msgid "No valid payment transaction group found"
msgstr "Pas de groupe d'écritures de trésorerie valide trouvé"
msgid "No valid transaction in your selection."
msgstr "Pas d'écritures valides dans votre sélection."
......@@ -8431,6 +8455,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"
......@@ -8464,9 +8491,21 @@ 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 Close"
msgstr "Groupe d'écritures de trésorerie à clôturer"
msgid "Payment Transaction Groups to Open"
msgstr "Groupe d'écritures de trésorerie à ouvrir"
msgid "Payment Transaction Lines"
msgstr "Lignes comptables"
......@@ -8482,6 +8521,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"
......@@ -8500,6 +8542,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"
......@@ -8857,6 +8902,9 @@ msgstr "Posté"
msgid "Posted [state in query_workflow]"
msgstr "Posté"
msgid "Posted automatically with payment transaction group ${payment_transaction_group_reference}"
msgstr "Brouillard validé automatiquement depuis le groupe d'écritures de trésorerie ${payment_transaction_group_reference}"
msgid "Posted to General Ledger"
msgstr "Brouillard validé"
......@@ -9973,6 +10021,9 @@ msgstr "Écriture de trésorerie correspondante créée"
msgid "Related Payment Transaction"
msgstr "Écriture de trésorerie correspondante"
msgid "Related Payment Transaction Group"
msgstr "Groupe d'écritures de trésorerie lié"
msgid "Related Person"
msgstr "Personne liée"
......@@ -10075,6 +10126,12 @@ msgstr "Mémoriser mon nom"
msgid "Remove"
msgstr "Enlever"
msgid "Remove from Payment Transaction Group"
msgstr "Supprimer du groupe d'écritures de trésorerie"
msgid "Removed from payment transaction group"
msgstr "Supprimé du groupe d'écritures de trésorerie"
msgid "Rename"
msgstr "Renommer"
......@@ -10432,6 +10489,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"
......@@ -10810,6 +10870,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"
......@@ -10825,6 +10891,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."
......@@ -11059,6 +11128,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"
......@@ -11351,7 +11423,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>
......
......@@ -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>
......
<workflow_chain>
<chain>
<type>Payment Transaction Group</type>
<workflow>edit_workflow, payment_transaction_group_validation_workflow</workflow>
<workflow>edit_workflow, payment_transaction_group_delivering_interaction_workflow, payment_transaction_group_validation_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
<?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>
"""Adds the payment transaction group to the already aggregated items on this line.
Also ensures that the payment transaction has a reference.
This script has a proxy role to be able to modify delivered lines and to call generateReference.
"""
portal = context.getPortalObject()
assert context.getPortalType() in portal.getPortalAccountingMovementTypeList()
context.setDefaultActivateParameterDict({"activate_kw": activate_kw})
context.setAggregate(aggregate, portal_type='Payment Transaction Group')
context.getParentValue().getTypeBasedMethod('generateReference')()
......@@ -57,12 +57,13 @@
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionLine_setAggregate</string> </value>
<value> <string>AccountingTransactionLine_addPaymentTransactionGroup</string> </value>
</item>
</dictionary>
</pickle>
......
context.setDefaultActivateParameterDict({"activate_kw": activate_kw})
context.setAggregate(aggregate)
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.getSourceReference()
or payment_transaction_group.getReference()}),
batch_mode=True,
)
if payment_transaction.getSimulationState() == 'stopped':
context.AccountingTransactionLine_addPaymentTransactionGroup(
aggregate=aggregate,
activate_kw=activate_kw,
)
<?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>id</string> </key>
<value> <string>AccountingTransactionLine_stopAndAddPaymentTransactionGroup</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,6 +14,7 @@
<string>columns</string>
<string>domain_root_list</string>
<string>domain_tree</string>
<string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list>
......@@ -201,6 +202,17 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Payment Transaction Group</string>
<string>Payment Transaction Group</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>payment_transaction_group_module_selection</string> </value>
......
......@@ -3,4 +3,4 @@ if REQUEST is not None:
for payment_transaction_line in context.getAggregateRelatedValueList():
payment_transaction_line.setDefaultActivateParameterDict({"tag": tag})
payment_transaction_line.setAggregate(None)
payment_transaction_line.setAggregate(None, portal_type=context.getPortalType())
......@@ -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 select_mode is None:
# To show an empty listbox the first time the dialog is open
return []
elif select_mode == 'stopped_or_delivered':
simulation_state = ('delivered', 'stopped')
else:
assert select_mode == 'planned_or_confirmed', "Unknown select_mode, %r" % select_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',
......@@ -17,14 +28,17 @@ search_kw = dict(
if context.getPaymentMode():
search_kw['payment_transaction_line_payment_mode_uid'] = context.getPaymentModeUid()
if limit:
search_kw['limit'] = limit
if select_limit:
search_kw['limit'] = select_limit
if start_date_range_max:
search_kw['at_date'] = start_date_range_max.latestTime()
if start_date_range_min:
search_kw['from_date'] = start_date_range_min
if Movement_getMirrorSectionTitle:
search_kw['stock_mirror_section_title'] = Movement_getMirrorSectionTitle
if sign in ('outgoing', 'out'):
search_kw['omit_asset_increase'] = True
elif sign in ('incoming', 'in'):
......
......@@ -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>select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, select_mode=None, Movement_getMirrorSectionTitle=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -8,10 +8,13 @@ if context.getPortalObject().portal_activities.countMessageWithTag(tag,):
"Some payments are still beeing processed in the background, please retry later")))
context.activate(tag=tag).PaymentTransactionGroup_selectPaymentTransactionLineListActive(
limit=limit,
uids=uids,
select_limit=select_limit,
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,
select_mode=select_mode,
Movement_getMirrorSectionTitle=listbox_Movement_getMirrorSectionTitle,
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>uids=(), form_id=\'view\', select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, select_mode=None, listbox_Movement_getMirrorSectionTitle=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
portal = context.getPortalObject()
batch_size = 100
priority = 1
......@@ -5,19 +6,32 @@ activate_kw = dict(tag=tag, priority=priority)
aggregate = context.getRelativeUrl()
payment_relative_url_list = [brain.relative_url for brain
in context.PaymentTransactionGroup_getGroupablePaymentTransactionLineList(
limit=limit,
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,)]
if uids:
payment_relative_url_list = [brain.relative_url for brain
in portal.portal_catalog(uid=uids, select_dict={'relative_url': None})]
else:
payment_relative_url_list = [brain.relative_url for brain
in context.PaymentTransactionGroup_getGroupablePaymentTransactionLineList(
select_limit=select_limit,
start_date_range_min=start_date_range_min,
start_date_range_max=start_date_range_max,
sign=sign,
select_mode=select_mode,
Movement_getMirrorSectionTitle=Movement_getMirrorSectionTitle,)]
if select_mode == 'stopped_or_delivered':
method_id = 'AccountingTransactionLine_addPaymentTransactionGroup'
else:
assert select_mode == 'planned_or_confirmed', "Unknown select_mode, %r" % select_mode
method_id = 'AccountingTransactionLine_stopAndAddPaymentTransactionGroup'
object_list_len = len(payment_relative_url_list)
activate = context.getPortalObject().portal_activities.activate
activate = portal.portal_activities.activate
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>uids=(), select_limit=None, start_date_range_min=None, start_date_range_max=None, sign=None, select_mode=None, Movement_getMirrorSectionTitle=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>
......
......@@ -98,10 +98,11 @@
<key> <string>left</string> </key>
<value>
<list>
<string>your_limit</string>
<string>your_select_limit</string>
<string>your_start_date_range_min</string>
<string>your_start_date_range_max</string>
<string>your_sign</string>
<string>your_select_mode</string>
</list>
</value>
</item>
......
......@@ -262,9 +262,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -289,13 +287,13 @@
<item>
<key> <string>lines</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>list_action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
......@@ -345,7 +343,7 @@
<item>
<key> <string>selection_name</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
......@@ -411,7 +409,7 @@
</tuple>
<tuple>
<string>Movement_getSpecificReference</string>
<string>Specific Reference</string>
<string>Transaction Reference</string>
</tuple>
<tuple>
<string>Movement_getExplanationTitle</string>
......@@ -543,7 +541,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
......@@ -582,17 +580,22 @@
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>Movement_getMirrorSectionTitle</string>
<string>Third Party</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
......@@ -607,7 +610,12 @@
<item>
<key> <string>sort_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>none</string>
<string>sort disabled</string>
</tuple>
</list>
</value>
</item>
<item>
......@@ -619,7 +627,7 @@
<item>
<key> <string>stat_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
......@@ -651,19 +659,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:request.form.get(\'sign\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
......@@ -676,7 +671,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
......@@ -693,7 +688,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
......@@ -706,7 +701,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
......@@ -719,7 +714,7 @@ string:Base_viewListMode?proxy_form_id=${form/getId}&proxy_field_id=${field/getI
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
......
......@@ -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>
......@@ -17,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_limit</string> </value>
<value> <string>your_select_limit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -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>
......
......@@ -8,7 +8,7 @@ for line in context.getMovementList(
payment_transaction_group = line.getAggregateValue(portal_type=portal_type)
if payment_transaction_group is not None and \
payment_transaction_group.getValidationState() not in ('delivered',):
line.setAggregateValue(None)
line.setAggregateValue(None, portal_type=portal_type)
removed = True
message = translateString('No valid payment transaction group found')
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction Workflow" 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>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Directly deliver the payment transaction groups at the beginning of delivery.\n
\n
This workflow is meant to be replaced by interaction workflow doing more complex interactions, like using a banking interface.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>payment_transaction_group_delivering_interaction_workflow</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interaction Workflow</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>payment_transaction_group_delivering_interaction_workflow</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="Interaction Workflow Interaction" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>after_script/portal_workflow/payment_transaction_group_delivering_interaction_workflow/script_Workflow_deliver</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interaction_beginDelivery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interaction Workflow Interaction</string> </value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Begin Delivery</string> </value>
</item>
<item>
<key> <string>trigger_method_id</string> </key>
<value>
<tuple>
<string>beginDelivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>trigger_once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</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>state_change</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_Workflow_deliver</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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
......
Payment Transaction Group | edit_workflow
Payment Transaction Group | payment_transaction_group_delivering_interaction_workflow
Payment Transaction Group | payment_transaction_group_validation_workflow
\ No newline at end of file
PaymentTransactionGroupConstraint
\ No newline at end of file
payment_transaction_group_delivering_interaction_workflow
payment_transaction_group_validation_workflow
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ No newline at end of file
erp5_full_text_mroonga_catalog
erp5_accounting_ui_test
erp5_item
\ 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>
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PDF_renderHTMLPreviewAsImage</string> </value>
<value> <string>testPaymentTransactionGroupSelectPaymentsFastInput</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......
<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 limit -->
<tr>
<td>type</td>
<td>//input[@name='field_your_select_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_select_limit']</td>
<td>10</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_start_date_range_max']</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>
<!-- 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>
<!-- 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
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testCheckPDFThumbnail</string> </value>
<value> <string>testPaymentTransactionGroupSelectPaymentsFastInputSelectLines</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......
<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>
<!-- select one line -->
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//tbody/tr[1]/td[1]/input</td>
<td></td>
</tr>
<!-- 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_select_mode</td>
<td>Select already Posted to General Ledger or Closed Payments</td>
</tr>
<!-- update dialog -->
<tr>
<td>select</td>
<td>field_your_select_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>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</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>4.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>
<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: context.getValidationState() in ( \'open\', \'closed\', \'delivered\') and context.isMemberOf(\'payment_transaction_group_type/outgoing\') and context.isMemberOf(\'payment_mode/%s\' % context.getPortalObject().portal_preferences.getPreferredSepaCreditTransferPaymentMode())</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -40,7 +40,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>html_view</string> </value>
<value> <string>payment_mean_sepa_preference</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
......@@ -52,11 +52,11 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>32.0</float> </value>
<value> <float>11.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Thumbnails</string> </value>
<value> <string>SEPA</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
......@@ -73,7 +73,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/PDF_viewHTMLPreviewAsThumbnailList</string> </value>
<value> <string>string:${object_url}/SystemPreference_viewPaymentMeanSepa</string> </value>
</item>
</dictionary>
</pickle>
......
<?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> <string>Constraints checking that lines of payment transactions satisfy all the requirements to be used in SEPA Credit Transfer</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionLineSEPACreditTransferConstraint</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="TALES 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>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>expression</string> </key>
<value> <string>python: context.AccountingTransactionLine_checkPaymentBelongToSection(source=True) and context.AccountingTransactionLine_checkPaymentBelongToSection(source=False)</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>payment_belong_to_section_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Bank Account must belong to Section</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.isMemberOf(\'payment_mode/%s\' % context.getPortalObject().portal_preferences.getPreferredSepaCreditTransferPaymentMode()) and ((context.getSource(portal_type=\'Account\') and context.getSourceValue(portal_type=\'Account\').isMemberOf(\'account_type/asset/cash/bank\')) or (context.getDestination(portal_type=\'Account\') and context.getDestinationValue(portal_type=\'Account\').isMemberOf(\'account_type/asset/cash/bank\')))\n
</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TALES 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>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>expression</string> </key>
<value> <string>python: context.getDestinationPayment(portal_type=\'Bank Account\') and context.getDestinationPaymentValue(portal_type=\'Bank Account\').getIban() and context.getDestinationPaymentValue(portal_type=\'Bank Account\').getBicCode() and context.getSourcePayment(portal_type=\'Bank Account\') and context.getSourcePaymentValue(portal_type=\'Bank Account\').getIban() and context.getSourcePaymentValue(portal_type=\'Bank Account\').getBicCode()</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>payment_iban_bic_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Bank Accounts must have IBAN and BIC</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.isMemberOf(\'payment_mode/%s\' % context.getPortalObject().portal_preferences.getPreferredSepaCreditTransferPaymentMode()) and ((context.getSource(portal_type=\'Account\') and context.getSourceValue(portal_type=\'Account\').isMemberOf(\'account_type/asset/cash/bank\')) or (context.getDestination(portal_type=\'Account\') and context.getDestinationValue(portal_type=\'Account\').isMemberOf(\'account_type/asset/cash/bank\')))\n
</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Payment Mode category to use for SEPA Credit Transferts</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>preferred_sepa_credit_transfer_payment_mode_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>preference</string> </key>
<value> <int>1</int> </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>
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.
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.
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