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
Yusei Tahara
erp5
Commits
c26a4650
Commit
c26a4650
authored
Dec 07, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't pass period_start_date to getInventory to prevent a catalog warning
parent
59e75401
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
...ins/erp5_accounting/Node_getAccountingTransactionList.xml
+3
-5
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
...rtal_skins/erp5_accounting/Node_statAccountingBalance.xml
+5
-3
bt5/erp5_accounting/bt/revision
bt5/erp5_accounting/bt/revision
+1
-1
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
View file @
c26a4650
...
...
@@ -137,11 +137,11 @@ if params.get(\'node_uid\'):\n
or node.isMemberOf(\'account_type/income\')\n
\n
\n
period_start_date = params.pop(\'period_start_date\', None)\n
if is_pl_account and not from_date:\n
from_date = p
arams.get(\'period_start_date\')
\n
from_date = p
eriod_start_date
\n
\n
if from_date or is_pl_account:\n
period_start_date = None\n
# Create a new parameter list to get the previous balance\n
get_inventory_kw = params.copy()\n
\n
...
...
@@ -150,11 +150,10 @@ if from_date or is_pl_account:\n
# ignore any at_date that could lay in params\n
get_inventory_kw.pop(\'at_date\', None)\n
\n
if p
arams.has_key(\'period_start_date\')
:\n
if p
eriod_start_date
:\n
if is_pl_account:\n
# if we have on an expense / income account, only take into account\n
# movements from the current period.\n
period_start_date = params[\'period_start_date\']\n
if initial_balance_from_date:\n
initial_balance_from_date = max(period_start_date,\n
initial_balance_from_date)\n
...
...
@@ -162,7 +161,6 @@ if from_date or is_pl_account:\n
initial_balance_from_date = period_start_date\n
else:\n
# for all other accounts, we calculate initial balance\n
period_start_date = params[\'period_start_date\']\n
if not initial_balance_from_date:\n
# I don\'t think this should happen\n
log(\'from_date not passed, defaulting to period_start_date\')\n
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
View file @
c26a4650
...
...
@@ -52,6 +52,7 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query\n
portal = context.getPortalObject()\n
\n
params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n
getInventoryAssetPrice = portal.portal_simulation.getInventoryAssetPrice\n
getSelectionDomainDictFor = context.portal_selections.getSelectionDomainDictFor\n
...
...
@@ -116,7 +117,9 @@ if kw.get(\'where_expression\'):\n
if not \'parent_portal_type\' in params:\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
\n
if params.get(\'period_start_date\', 0) and params.get(\'node_uid\'):\n
period_start_date = params.pop(\'period_start_date\', None)\n
\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
node = context\n
...
...
@@ -129,12 +132,11 @@ if params.get(\'period_start_date\', 0) and params.get(\'node_uid\'):\n
# beginning is passed explicitly.\n
# if we are in the regular user interface, we only limit\n
if \'from_date\' in kw:\n
params[\'from_date\'] = min(kw[\'from_date\'], p
arams[\'period_start_date\']
)\n
params[\'from_date\'] = min(kw[\'from_date\'], p
eriod_start_date
)\n
else:\n
# for other account, we calculate the initial balance as the "absolute"\n
# balance at the beginning of the period, plus debit or credit from this\n
# beginning of period to the from_date\n
period_start_date = params[\'period_start_date\']\n
at_date = params.pop(\'at_date\', None)\n
period_openning_balance = getInventoryAssetPrice(\n
selection_domain=getSelectionDomainDictFor(selection_name),\n
...
...
bt5/erp5_accounting/bt/revision
View file @
c26a4650
1502
\ No newline at end of file
1503
\ 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