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
f134f853
Commit
f134f853
authored
Jan 10, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CUSTOM: display donor reference in account statement -done by Jerome
parent
e144d2af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
0 deletions
+84
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.py
...ing/AccountModule_getAccountStatementReportSectionList.py
+2
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReferenceOrExplanationReference.py
...ng/Movement_getSpecificReferenceOrExplanationReference.py
+20
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReferenceOrExplanationReference.xml
...g/Movement_getSpecificReferenceOrExplanationReference.xml
+62
-0
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.py
View file @
f134f853
...
...
@@ -100,6 +100,8 @@ request.set('analytic_column_list', analytic_column_list) # for Movement_getExpl
selection_columns
=
(
(
'date'
,
'Operation Date'
),
(
'Movement_getSpecificReference'
,
'Transaction Reference'
),
# XXX Movement_getSpecificReferenceOrExplanationReference is custom code
(
'Movement_getSpecificReferenceOrExplanationReference'
,
'Document Reference'
),
(
'mirror_section_title'
,
'Third Party'
),
(
'Movement_getExplanationTitleAndAnalytics'
,
'Title
\
n
Reference and Analytics'
if
analytic_column_list
else
'Title
\
n
Reference'
),
)
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReferenceOrExplanationReference.py
0 → 100644
View file @
f134f853
"""Return the "donor" code of the movement, or the explanation reference.
This script is custom code.
"""
movement
=
brain
.
getObject
()
if
not
(
movement
.
hasSourceReference
()
or
movement
.
hasDestinationReference
()):
return
movement
.
getExplanationValue
().
getReference
()
if
brain
.
section_uid
!=
brain
.
mirror_section_uid
:
if
movement
.
getSourceSectionUid
()
==
brain
.
section_uid
:
return
movement
.
getSourceReference
()
return
movement
.
getDestinationReference
()
# If we have a movement which exists for both section uid and mirror section uid,
# we can only guess what reference should be used.
if
round
(
brain
.
total_quantity
-
movement
.
getQuantity
(),
5
)
==
0
:
return
movement
.
getDestinationReference
()
return
delivery
.
getSourceReference
()
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReferenceOrExplanationReference.xml
0 → 100644
View file @
f134f853
<?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>
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