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
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
Titouan Soulard
erp5
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 @@
...
@@ -51,6 +51,9 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
kwd = context.ERP5Accounting_getParams(selection_name)\n
<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
\n
if kw.get(\'stat\'):\n
if kw.get(\'stat\'):\n
selection_params = context.portal_selections.getSelectionParamsFor(selection_name)\n
selection_params = context.portal_selections.getSelectionParamsFor(selection_name)\n
...
@@ -62,15 +65,14 @@ if kw.get(\'stat\'):\n
...
@@ -62,15 +65,14 @@ if kw.get(\'stat\'):\n
kwd[\'selection_domain\'] = selection_domain\n
kwd[\'selection_domain\'] = selection_domain\n
if selection_report:\n
if selection_report:\n
kwd[\'selection_report\'] = 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
if context.portal_selections.getSelectionInvertModeFor(selection_name):\n
kwd[\'stock.node_uid\'] = context.portal_selections.getSelectionInvertModeUidListFor(selection_name)\n
kwd[\'stock.node_uid\'] = context.portal_selections.getSelectionInvertModeUidListFor(selection_name)\n
# is list filtered ?\n
# is list filtered ?\n
elif \'title\' in selection_params or \\\n
elif \'title\' in selection_params or \\\n
\'preferred_gap_id\' in selection_params or\\\n
\'preferred_gap_id\' in selection_params or\\\n
\'id\' in selection_params or \\\n
\'id\' in selection_params or \\\n
\'transalated_validation_state_title\' in selection_params:\n
\'transalated_validation_state_title\' in selection_params:\n
selection_params[\'ignore_unknown_columns\'] = True\n
# if yes, apply the same filter here\n
# if yes, apply the same filter here\n
kwd[\'stock.node_uid\'] = [x.uid for x in\n
kwd[\'stock.node_uid\'] = [x.uid for x in\n
context.portal_catalog(**selection_params)]\n
context.portal_catalog(**selection_params)]\n
...
@@ -79,6 +81,7 @@ if kw.get(\'stat\'):\n
...
@@ -79,6 +81,7 @@ if kw.get(\'stat\'):\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
\n
\n
kwd[\'stock.node_uid\'] = brain.uid\n
kwd[\'stock.node_uid\'] = brain.uid\n
\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
return context.portal_simulation.getInventoryStat( **kwd )[0][\'stock_uid\']\n
# vim: syntax=python\n
# vim: syntax=python\n
</string>
</value>
</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
...
@@ -57,6 +57,10 @@ params[\'omit_asset_decrease\'] = omit_asset_decrease\n
# For now, we omit simulation to be compatible with other reports.\n
# For now, we omit simulation to be compatible with other reports.\n
params[\'omit_simulation\'] = True\n
params[\'omit_simulation\'] = True\n
\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
return portal.portal_simulation.getInventoryAssetPrice(\n
node_uid=brain.uid,\n
node_uid=brain.uid,\n
**params )\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
...
@@ -75,6 +75,7 @@ elif \'title\' in selection_params or \\\n
\'preferred_gap_id\' in selection_params or \\\n
\'preferred_gap_id\' in selection_params or \\\n
\'id\' in selection_params or \\\n
\'id\' in selection_params or \\\n
\'translated_validation_state_title\' in selection_params:\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
# if list is filtered, apply the same filter here\n
params[\'node_uid\'] = [x.uid for x in\n
params[\'node_uid\'] = [x.uid for x in\n
portal.portal_catalog(**selection_params)]\n
portal.portal_catalog(**selection_params)]\n
...
@@ -82,6 +83,10 @@ else:\n
...
@@ -82,6 +83,10 @@ else:\n
# make sure we only have Accounts as nodes\n
# make sure we only have Accounts as nodes\n
params[\'node_category\'] = [\'account_type\',]\n
params[\'node_category\'] = [\'account_type\',]\n
\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
return portal.portal_simulation.getInventoryAssetPrice( **params )\n
</string>
</value>
</string>
</value>
</item>
</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
...
@@ -114,8 +114,10 @@ if kw.get(\'where_expression\'):\n
if not \'parent_portal_type\' in params:\n
if not \'parent_portal_type\' in params:\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
\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
\n
period_start_date = params.pop(\'period_start_date\', None)\n
if period_start_date and params.get(\'node_uid\'):\n
if period_start_date and params.get(\'node_uid\'):\n
# find the node for this node_uid\n
# find the node for this node_uid\n
if context.getUid() == params[\'node_uid\']: # I bet it\'s context\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