Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos.core
Commits
b834bd14
Commit
b834bd14
authored
Jan 14, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebuild payment if the previous one has been cancelled.
parent
bc1d70f1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
4 deletions
+109
-4
master/bt5/slapos_accounting/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_causality_payment_transaction.catalog_keys.xml
.../z_related_causality_payment_transaction.catalog_keys.xml
+2
-0
master/bt5/slapos_accounting/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_causality_payment_transaction.xml
..._mysql_innodb/z_related_causality_payment_transaction.xml
+79
-0
master/bt5/slapos_accounting/CatalogRelatedKeyTemplateItem/related_key_list.xml
...unting/CatalogRelatedKeyTemplateItem/related_key_list.xml
+1
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateUnrelatedInvoiceList.xml
..._accounting/OrderBuilder_generateUnrelatedInvoiceList.xml
+2
-2
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
...ccounting/TestTemplateItem/testSlapOSAccountingBuilder.py
+21
-0
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
master/bt5/slapos_accounting/bt/template_catalog_method_id_list
.../bt5/slapos_accounting/bt/template_catalog_method_id_list
+1
-0
master/bt5/slapos_accounting/bt/template_catalog_related_key_list
...t5/slapos_accounting/bt/template_catalog_related_key_list
+2
-1
No files found.
master/bt5/slapos_accounting/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_causality_payment_transaction.catalog_keys.xml
0 → 100644
View file @
b834bd14
<catalog_method>
</catalog_method>
master/bt5/slapos_accounting/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_causality_payment_transaction.xml
0 → 100644
View file @
b834bd14
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
table_0\r\n
table_1\r\n
RELATED_QUERY_SEPARATOR=" AND "\r\n
query_table="catalog"
</string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
z_related_causality_payment_transaction
</string>
</value>
</item>
<item>
<key>
<string>
max_cache_
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
<item>
<key>
<string>
max_rows_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
src
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<dtml-var table_0>
.base_category_uid =
<dtml-var
"portal_categories.causality.getUid()"
>
\n
AND
<dtml-var
table_1
>
.uid =
<dtml-var
table_0
>
.uid\n
AND
<dtml-var
table_1
>
.portal_type = \'Payment Transaction\'\n
AND
<dtml-var
table_1
>
.simulation_state not in (\'deleted\', \'cancelled\')\n
\n
<dtml-var
RELATED_QUERY_SEPARATOR
>
\n
<dtml-var
table_0
>
.category_uid =
<dtml-var
query_table
>
.uid\n
\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/CatalogRelatedKeyTemplateItem/related_key_list.xml
View file @
b834bd14
<key_list>
<key>
causality_payment_transaction_related_uid | category,catalog/uid/z_related_causality_payment_transaction
</key>
<key>
children_portal_type | catalog/portal_type/z_related_children
</key>
</key_list>
\ No newline at end of file
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateUnrelatedInvoiceList.xml
View file @
b834bd14
...
...
@@ -53,7 +53,7 @@
<value>
<string>
from Products.ERP5Type.Document import newTempSimulationMovement\n
\n
portal = context.getPortalObject()\n
select_dict = {\'causality_related_uid\': None}\n
select_dict = {\'causality_
payment_transaction_
related_uid\': None}\n
\n
select_kw = kwargs.copy()\n
select_kw.pop(\'portal_type\', None)\n
...
...
@@ -64,7 +64,7 @@ select_kw.update(\n
limit=10, # do only some in one shot\n
select_dict=select_dict,\n
left_join_list=select_dict.keys(),\n
causality_
related_uid=None
\n
causality_
payment_transaction_related_uid=None,
\n
)\n
\n
default_source_uid=portal.restrictedTraverse(\'account_module/receivable\').getUid()\n
...
...
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
View file @
b834bd14
...
...
@@ -1350,6 +1350,27 @@ class TestSlapOSPaymentTransactionOrderBuilder(testSlapOSMixin):
self
.
tic
()
payment
=
payment_list
[
0
].
getObject
()
self
.
assertPayment
(
payment
,
invoice
)
def
test_cancelled_payment
(
self
):
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
invoice
=
self
.
portal
.
accounting_module
.
template_sale_invoice_transaction
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
invoice
.
edit
(
destination_section
=
person
.
getRelativeUrl
())
invoice
.
confirm
()
invoice
.
stop
()
self
.
tic
()
payment_list
=
self
.
fullBuild
(
uid
=
invoice
.
getUid
())
payment_list
[
0
].
cancel
()
self
.
tic
()
payment_list
=
self
.
fullBuild
(
uid
=
invoice
.
getUid
())
self
.
tic
()
self
.
emptyBuild
(
uid
=
invoice
.
getUid
())
self
.
assertEqual
(
1
,
len
(
payment_list
))
payment
=
payment_list
[
0
].
getObject
()
self
.
assertPayment
(
payment
,
invoice
)
...
...
master/bt5/slapos_accounting/bt/revision
View file @
b834bd14
244
\ No newline at end of file
245
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_catalog_method_id_list
0 → 100644
View file @
b834bd14
erp5_mysql_innodb/z_related_causality_payment_transaction
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_catalog_related_key_list
View file @
b834bd14
children_portal_type | catalog/portal_type/z_related_children
\ No newline at end of file
children_portal_type | catalog/portal_type/z_related_children
causality_payment_transaction_related_uid | category,catalog/uid/z_related_causality_payment_transaction
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment