Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
2d484a69
Commit
2d484a69
authored
Aug 06, 2012
by
Aurel
Committed by
Jérome Perrin
Apr 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CUSTOM: display donor reference in account statement -done by Jerome
parent
bf872467
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
1 deletion
+88
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml
...ng/AccountModule_getAccountStatementReportSectionList.xml
+2
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReferenceOrExplanationReference.xml
...g/Movement_getSpecificReferenceOrExplanationReference.xml
+86
-0
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml
View file @
2d484a69
...
@@ -155,7 +155,8 @@ selection_columns += analytic_column_list\n
...
@@ -155,7 +155,8 @@ selection_columns += analytic_column_list\n
if not mirror_section:\n
if not mirror_section:\n
selection_columns += ( (\'Movement_getMirrorSectionTitle\', \'Third Party\'), )\n
selection_columns += ( (\'Movement_getMirrorSectionTitle\', \'Third Party\'), )\n
selection_columns += (\n
selection_columns += (\n
(\'Movement_getExplanationReference\', \'Document Reference\'),\n
# XXX Movement_getSpecificReferenceOrExplanationReference is custom code\n
(\'Movement_getSpecificReferenceOrExplanationReference\', \'Document Reference\'),\n
(\'debit_price\', \'Debit\'),\n
(\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'running_total_price\', \'Net\'),)\n
(\'running_total_price\', \'Net\'),)\n
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReferenceOrExplanationReference.xml
0 → 100644
View file @
2d484a69
<?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>
_body
</string>
</key>
<value>
<string>
"""Return the "donor" code of the movement, or the explanation reference.\n
\n
This script is custom code.\n
"""\n
movement = brain.getObject()\n
\n
if not (movement.hasSourceReference() or movement.hasDestinationReference()):\n
return movement.getExplanationValue().getReference()\n
\n
if brain.section_uid != brain.mirror_section_uid:\n
if movement.getSourceSectionUid() == brain.section_uid:\n
return movement.getSourceReference()\n
return movement.getDestinationReference()\n
\n
# If we have a movement which exists for both section uid and mirror section uid,\n
# we can only guess what reference should be used.\n
if round(brain.total_quantity - movement.getQuantity(), 5) == 0:\n
return movement.getDestinationReference()\n
\n
return delivery.getSourceReference()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
brain, selection=None, **kwd
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Movement_getSpecificReferenceOrExplanationReference
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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