Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
fe1e2f5c
Commit
fe1e2f5c
authored
Sep 25, 2015
by
Jérome Perrin
Committed by
Vincent Pelletier
Oct 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: do not pass unhandled catalog parameters to inventory API
parent
be2bf77b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountingTransactionCount.xml
...ccounting/AccountModule_getAccountingTransactionCount.xml
+8
-5
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBalance.xml
...portal_skins/erp5_accounting/AccountModule_getBalance.xml
+4
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_statBalance.xml
...ortal_skins/erp5_accounting/AccountModule_statBalance.xml
+5
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
...rtal_skins/erp5_accounting/Node_statAccountingBalance.xml
+3
-1
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountingTransactionCount.xml
View file @
fe1e2f5c
...
...
@@ -51,6 +51,9 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
kwd = context.ERP5Accounting_getParams(selection_name)\n
# cleanup unsupported catalog parameters\n
kwd.pop(\'period_start_date\', None)\n
kwd.pop(\'detailed_from_date_summary\', None)\n
\n
if kw.get(\'stat\'):\n
selection_params = context.portal_selections.getSelectionParamsFor(selection_name)\n
...
...
@@ -62,15 +65,14 @@ if kw.get(\'stat\'):\n
kwd[\'selection_domain\'] = selection_domain\n
if selection_report:\n
kwd[\'selection_report\'] = selection_report\n
if selection_params.get(\'closed_summary\'):\n
kwd[\'closed_summary\'] = selection_params[\'closed_summary\']\n
if context.portal_selections.getSelectionInvertModeFor(selection_name):\n
kwd[\'stock.node_uid\'] = context.portal_selections.getSelectionInvertModeUidListFor(selection_name)\n
# is list filtered ?\n
elif \'title\' in selection_params or \\\n
\'preferred_gap_id\' in selection_params or\\\n
\'id\' in selection_params or \\\n
\'transalated_validation_state_title\' in selection_params:\n
\'preferred_gap_id\' in selection_params or\\\n
\'id\' in selection_params or \\\n
\'transalated_validation_state_title\' in selection_params:\n
selection_params[\'ignore_unknown_columns\'] = True\n
# if yes, apply the same filter here\n
kwd[\'stock.node_uid\'] = [x.uid for x in\n
context.portal_catalog(**selection_params)]\n
...
...
@@ -79,6 +81,7 @@ if kw.get(\'stat\'):\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
\n
kwd[\'stock.node_uid\'] = brain.uid\n
\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
# vim: syntax=python\n
</string>
</value>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBalance.xml
View file @
fe1e2f5c
...
...
@@ -57,6 +57,10 @@ params[\'omit_asset_decrease\'] = omit_asset_decrease\n
# For now, we omit simulation to be compatible with other reports.\n
params[\'omit_simulation\'] = True\n
\n
# Remove params used internally by ERP5Accounting_getParams before passing to inventory API\n
params.pop("period_start_date", None)\n
params.pop("detailed_from_date_summary", None)\n
\n
return portal.portal_simulation.getInventoryAssetPrice(\n
node_uid=brain.uid,\n
**params )\n
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_statBalance.xml
View file @
fe1e2f5c
...
...
@@ -75,6 +75,7 @@ elif \'title\' in selection_params or \\\n
\'preferred_gap_id\' in selection_params or \\\n
\'id\' in selection_params or \\\n
\'translated_validation_state_title\' in selection_params:\n
selection_params[\'ignore_unknown_columns\'] = True\n
# if list is filtered, apply the same filter here\n
params[\'node_uid\'] = [x.uid for x in\n
portal.portal_catalog(**selection_params)]\n
...
...
@@ -82,6 +83,10 @@ else:\n
# make sure we only have Accounts as nodes\n
params[\'node_category\'] = [\'account_type\',]\n
\n
# Remove params used internally by ERP5Accounting_getParams before passing to inventory API\n
params.pop("period_start_date", None)\n
params.pop("detailed_from_date_summary", None)\n
\n
return portal.portal_simulation.getInventoryAssetPrice( **params )\n
</string>
</value>
</item>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
View file @
fe1e2f5c
...
...
@@ -114,8 +114,10 @@ if kw.get(\'where_expression\'):\n
if not \'parent_portal_type\' in params:\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
\n
period_start_date = params.pop(\'period_start_date\', None)\n
# Remove unsupported inventory API parameters\n
params.pop(\'detailed_from_date_summary\', None)\n
\n
period_start_date = params.pop(\'period_start_date\', None)\n
if period_start_date and params.get(\'node_uid\'):\n
# find the node for this node_uid\n
if context.getUid() == params[\'node_uid\']: # I bet it\'s context\n
...
...
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