Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
a6b4a697
Commit
a6b4a697
authored
Nov 13, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aged balance: do not load objects in summary mode
parent
e369aa7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
17 deletions
+22
-17
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getDetailedAgedBalanceLineList.xml
...ntingTransactionModule_getDetailedAgedBalanceLineList.xml
+20
-15
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getSummaryAgedBalanceLineList.xml
...untingTransactionModule_getSummaryAgedBalanceLineList.xml
+1
-1
bt5/erp5_accounting/bt/revision
bt5/erp5_accounting/bt/revision
+1
-1
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getDetailedAgedBalanceLineList.xml
View file @
a6b4a697
...
...
@@ -108,26 +108,31 @@ for brain in portal.portal_simulation.getMovementHistoryList(\n
total_price = brain.total_price\n
if account_type == \'account_type/liability/payable\':\n
total_price = - total_price\n
\n
\n
line = Object(uid=\'new_\',\n
mirror_section_title=getSectionTitle(brain.mirror_section_uid),\n
mirror_section_uid=brain.mirror_section_uid,\n
explanation_title=movement.hasTitle() and movement.getTitle()\n
or transaction.getTitle(),\n
reference=transaction.getReference(),\n
portal_type=transaction.getTranslatedPortalType(),\n
date=brain.date,\n
total_price=total_price,)\n
\n
if brain.mirror_section_uid == movement.getSourceSectionUid():\n
line[\'specific_reference\'] = transaction.getDestinationReference()\n
line[\'gap_id\'] = getAccountNumber(movement.getDestination())\n
else:\n
line[\'specific_reference\'] = transaction.getSourceReference()\n
line[\'gap_id\'] = getAccountNumber(movement.getSource())\n
assert brain.mirror_section_uid == movement.getDestinationSectionUid()\n
if detail:\n
# Detailed version of the aged balance report needs to get properties from\n
# the movement or transactions, but summary does not. This conditional is\n
# here so that we do not load objects when running in summary mode.\n
line[\'explanation_title\'] = movement.hasTitle() and movement.getTitle() or transaction.getTitle()\n
line[\'reference\'] = transaction.getReference()\n
line[\'portal_type\'] = transaction.getTranslatedPortalType()\n
line[\'date\'] = brain.date\n
if brain.mirror_section_uid == movement.getSourceSectionUid():\n
line[\'specific_reference\'] = transaction.getDestinationReference()\n
line[\'gap_id\'] = getAccountNumber(movement.getDestination())\n
else:\n
line[\'specific_reference\'] = transaction.getSourceReference()\n
line[\'gap_id\'] = getAccountNumber(movement.getSource())\n
assert brain.mirror_section_uid == movement.getDestinationSectionUid()\n
\n
age = int(at_date - brain.date)\n
# Note that we use date_utc because date would load the object and we are just\n
# interested in the difference of days.\n
age = int(at_date - brain.date_utc)\n
line[\'age\'] = age\n
if age < 0:\n
line[\'period_future\'] = total_price\n
...
...
@@ -150,7 +155,7 @@ return line_list\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
at_date, section_category, section_category_strict, simulation_state, period_list, account_type, **kw
</string>
</value>
<value>
<string>
at_date, section_category, section_category_strict, simulation_state, period_list, account_type,
detail=True,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getSummaryAgedBalanceLineList.xml
View file @
a6b4a697
...
...
@@ -57,7 +57,7 @@ line_list = []\n
detail_line_list = portal\\\n
.AccountingTransactionModule_getDetailedAgedBalanceLineList(\n
at_date, section_category, section_category_strict,\n
simulation_state, period_list, account_type, **kw)\n
simulation_state, period_list, account_type,
detail=False,
**kw)\n
\n
period_id_list = [\'period_future\']\n
for idx, period in enumerate(period_list):\n
...
...
bt5/erp5_accounting/bt/revision
View file @
a6b4a697
1556
\ No newline at end of file
1557
\ 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