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
13b8424a
Commit
13b8424a
authored
Dec 05, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_accounting: Stop using AutoQuery.
parent
0a8a2665
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
42 deletions
+42
-42
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.py
...accounting/AccountModule_getAccountListForTrialBalance.py
+5
-5
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAnalyticColumnList.py
...ns/erp5_accounting/AccountModule_getAnalyticColumnList.py
+4
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.py
...unting/AccountModule_getGeneralLedgerReportSectionList.py
+10
-10
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.py
...ounting/Account_getNotGroupedAccountingTransactionList.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.py
...5_accounting/AccountingPeriod_createBalanceTransaction.py
+2
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_checkGroupingReferenceIsValid.py
...ccountingTransactionLine_checkGroupingReferenceIsValid.py
+2
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.py
.../AccountingTransactionModule_getJournalSectionLineList.py
+2
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTransactionLineListForGroupingReference.py
...ctionModule_getTransactionLineListForGroupingReference.py
+4
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py
...kins/erp5_accounting/Node_getAccountingTransactionList.py
+6
-6
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.py
...ortal_skins/erp5_accounting/Node_statAccountingBalance.py
+4
-4
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.py
View file @
13b8424a
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
from
Products.PythonScripts.standard
import
Object
from
Products.PythonScripts.standard
import
Object
from
ZTUtils
import
LazyFilter
from
ZTUtils
import
LazyFilter
...
@@ -67,7 +67,7 @@ if portal_type and set(portal_type) != set(portal.getPortalAccountingTransaction
...
@@ -67,7 +67,7 @@ if portal_type and set(portal_type) != set(portal.getPortalAccountingTransaction
inventory_params
[
'parent_portal_type'
]
=
portal_type
inventory_params
[
'parent_portal_type'
]
=
portal_type
if
function
:
if
function
:
if
function
==
'None'
:
if
function
==
'None'
:
inventory_params
[
'function_uid'
]
=
Query
(
function_uid
=
None
)
inventory_params
[
'function_uid'
]
=
Simple
Query
(
function_uid
=
None
)
else
:
else
:
function_value
=
portal
.
restrictedTraverse
(
function
,
None
)
function_value
=
portal
.
restrictedTraverse
(
function
,
None
)
if
function_value
is
not
None
and
function_value
.
getPortalType
()
!=
'Category'
:
if
function_value
is
not
None
and
function_value
.
getPortalType
()
!=
'Category'
:
...
@@ -76,7 +76,7 @@ if function:
...
@@ -76,7 +76,7 @@ if function:
inventory_params
[
'function_category'
]
=
function
inventory_params
[
'function_category'
]
=
function
if
funding
:
if
funding
:
if
funding
==
'None'
:
if
funding
==
'None'
:
inventory_params
[
'funding_uid'
]
=
Query
(
funding_uid
=
None
)
inventory_params
[
'funding_uid'
]
=
Simple
Query
(
funding_uid
=
None
)
else
:
else
:
funding_value
=
portal
.
restrictedTraverse
(
funding
,
None
)
funding_value
=
portal
.
restrictedTraverse
(
funding
,
None
)
if
funding_value
is
not
None
and
funding_value
.
getPortalType
()
!=
'Category'
:
if
funding_value
is
not
None
and
funding_value
.
getPortalType
()
!=
'Category'
:
...
@@ -85,7 +85,7 @@ if funding:
...
@@ -85,7 +85,7 @@ if funding:
inventory_params
[
'funding_category'
]
=
funding
inventory_params
[
'funding_category'
]
=
funding
if
project
:
if
project
:
if
project
==
'None'
:
if
project
==
'None'
:
inventory_params
[
'project_uid'
]
=
Query
(
project_uid
=
None
)
inventory_params
[
'project_uid'
]
=
Simple
Query
(
project_uid
=
None
)
else
:
else
:
inventory_params
[
'project'
]
=
project
inventory_params
[
'project'
]
=
project
if
mirror_section_category
:
if
mirror_section_category
:
...
@@ -93,7 +93,7 @@ if mirror_section_category:
...
@@ -93,7 +93,7 @@ if mirror_section_category:
if
ledger
:
if
ledger
:
if
ledger
==
'None'
:
if
ledger
==
'None'
:
inventory_params
[
'ledger_uid'
]
=
Query
(
ledger_uid
=
None
)
inventory_params
[
'ledger_uid'
]
=
Simple
Query
(
ledger_uid
=
None
)
else
:
else
:
if
not
isinstance
(
ledger
,
list
):
if
not
isinstance
(
ledger
,
list
):
# Allows the generation of reports on different ledgers as the same time
# Allows the generation of reports on different ledgers as the same time
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAnalyticColumnList.py
View file @
13b8424a
"""Returns the list of columns to use in accounting reports (GL, account statement, journal)
"""Returns the list of columns to use in accounting reports (GL, account statement, journal)
"""
"""
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
Products.ZSQLCatalog.SQLCatalog
import
Base
Query
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
request
=
portal
.
REQUEST
request
=
portal
.
REQUEST
...
@@ -19,7 +19,7 @@ if funding_item_list:
...
@@ -19,7 +19,7 @@ if funding_item_list:
analytic_column_list
+=
((
'funding'
,
context
.
AccountingTransactionLine_getFundingBaseCategoryTitle
()),)
analytic_column_list
+=
((
'funding'
,
context
.
AccountingTransactionLine_getFundingBaseCategoryTitle
()),)
for
v
,
k
in
funding_item_list
:
for
v
,
k
in
funding_item_list
:
if
k
:
if
k
:
if
k
==
'None'
or
isinstance
(
k
,
Query
):
if
k
==
'None'
or
isinstance
(
k
,
Base
Query
):
funding_title_dict
[
None
]
=
''
funding_title_dict
[
None
]
=
''
else
:
else
:
funding_title_dict
[
portal
.
portal_categories
.
restrictedTraverse
(
k
).
getUid
()]
=
v
funding_title_dict
[
portal
.
portal_categories
.
restrictedTraverse
(
k
).
getUid
()]
=
v
...
@@ -29,7 +29,7 @@ if function_item_list:
...
@@ -29,7 +29,7 @@ if function_item_list:
analytic_column_list
+=
((
'function'
,
context
.
AccountingTransactionLine_getFunctionBaseCategoryTitle
()),)
analytic_column_list
+=
((
'function'
,
context
.
AccountingTransactionLine_getFunctionBaseCategoryTitle
()),)
for
v
,
k
in
function_item_list
:
for
v
,
k
in
function_item_list
:
if
k
:
if
k
:
if
k
==
'None'
or
isinstance
(
k
,
Query
):
if
k
==
'None'
or
isinstance
(
k
,
Base
Query
):
function_title_dict
[
None
]
=
''
function_title_dict
[
None
]
=
''
else
:
else
:
function_title_dict
[
portal
.
portal_categories
.
restrictedTraverse
(
k
).
getUid
()]
=
v
function_title_dict
[
portal
.
portal_categories
.
restrictedTraverse
(
k
).
getUid
()]
=
v
...
@@ -39,7 +39,7 @@ if project_item_list:
...
@@ -39,7 +39,7 @@ if project_item_list:
analytic_column_list
+=
((
'project'
,
'Project'
),)
analytic_column_list
+=
((
'project'
,
'Project'
),)
for
v
,
k
in
project_item_list
:
for
v
,
k
in
project_item_list
:
if
k
:
if
k
:
if
k
==
'None'
or
isinstance
(
k
,
Query
):
if
k
==
'None'
or
isinstance
(
k
,
Base
Query
):
project_title_dict
[
None
]
=
''
project_title_dict
[
None
]
=
''
else
:
else
:
project_title_dict
[
portal
.
portal_categories
.
restrictedTraverse
(
k
).
getUid
()]
=
v
project_title_dict
[
portal
.
portal_categories
.
restrictedTraverse
(
k
).
getUid
()]
=
v
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.py
View file @
13b8424a
"""Get the report sections for general ledger
"""Get the report sections for general ledger
"""
"""
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
,
ComplexQuery
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
portal
=
context
.
portal_url
.
getPortalObject
()
portal
=
context
.
portal_url
.
getPortalObject
()
request
=
portal
.
REQUEST
request
=
portal
.
REQUEST
...
@@ -49,14 +49,14 @@ params = dict(precision=precision,
...
@@ -49,14 +49,14 @@ params = dict(precision=precision,
project
=
request
.
get
(
'project'
)
project
=
request
.
get
(
'project'
)
if
project
:
if
project
:
if
project
==
'None'
:
if
project
==
'None'
:
params
[
'project_uid'
]
=
Query
(
project_uid
=
None
)
params
[
'project_uid'
]
=
Simple
Query
(
project_uid
=
None
)
else
:
else
:
params
[
'project_uid'
]
=
portal
.
portal_categories
.
restrictedTraverse
(
project
).
getUid
()
params
[
'project_uid'
]
=
portal
.
portal_categories
.
restrictedTraverse
(
project
).
getUid
()
funding_category
=
request
.
get
(
'funding'
)
funding_category
=
request
.
get
(
'funding'
)
if
funding_category
:
if
funding_category
:
if
funding_category
==
'None'
:
if
funding_category
==
'None'
:
params
[
'funding_uid'
]
=
Query
(
funding_uid
=
None
)
params
[
'funding_uid'
]
=
Simple
Query
(
funding_uid
=
None
)
else
:
else
:
funding_value
=
portal
.
restrictedTraverse
(
funding_category
,
None
)
funding_value
=
portal
.
restrictedTraverse
(
funding_category
,
None
)
if
funding_value
is
not
None
and
funding_value
.
getPortalType
()
!=
'Category'
:
if
funding_value
is
not
None
and
funding_value
.
getPortalType
()
!=
'Category'
:
...
@@ -67,7 +67,7 @@ if funding_category:
...
@@ -67,7 +67,7 @@ if funding_category:
function_category
=
request
.
get
(
'function'
)
function_category
=
request
.
get
(
'function'
)
if
function_category
:
if
function_category
:
if
function_category
==
'None'
:
if
function_category
==
'None'
:
params
[
'function_uid'
]
=
Query
(
function_uid
=
None
)
params
[
'function_uid'
]
=
Simple
Query
(
function_uid
=
None
)
else
:
else
:
function_value
=
portal
.
restrictedTraverse
(
function_category
,
None
)
function_value
=
portal
.
restrictedTraverse
(
function_category
,
None
)
if
function_value
is
not
None
and
function_value
.
getPortalType
()
!=
'Category'
:
if
function_value
is
not
None
and
function_value
.
getPortalType
()
!=
'Category'
:
...
@@ -99,8 +99,8 @@ default_selection_params['no_mirror_section_uid_cache'] = 1
...
@@ -99,8 +99,8 @@ default_selection_params['no_mirror_section_uid_cache'] = 1
if
request
.
get
(
'omit_grouping_reference'
,
False
):
if
request
.
get
(
'omit_grouping_reference'
,
False
):
if
at_date
:
if
at_date
:
params
[
'grouping_query'
]
=
ComplexQuery
(
params
[
'grouping_query'
]
=
ComplexQuery
(
Query
(
grouping_reference
=
None
),
Simple
Query
(
grouping_reference
=
None
),
Query
(
grouping_date
=
at_date
,
range
=
"min
"
),
SimpleQuery
(
grouping_date
=
at_date
,
comparison_operator
=
">=
"
),
logical_operator
=
"OR"
)
logical_operator
=
"OR"
)
else
:
else
:
params
[
'grouping_reference'
]
=
None
params
[
'grouping_reference'
]
=
None
...
@@ -318,7 +318,7 @@ for inventory in portal.portal_simulation.getInventoryList(
...
@@ -318,7 +318,7 @@ for inventory in portal.portal_simulation.getInventoryList(
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'payment_uid'
]
=
None
selection_params
[
'payment_uid'
]
=
None
selection_params
[
'mirror_section_uid'
]
=
inventory
.
mirror_section_uid
or
Query
(
mirror_section_uid
=
None
)
selection_params
[
'mirror_section_uid'
]
=
inventory
.
mirror_section_uid
or
Simple
Query
(
mirror_section_uid
=
None
)
addReportSection
(
path
=
inventory
.
node_relative_url
,
addReportSection
(
path
=
inventory
.
node_relative_url
,
selection_params
=
selection_params
,
selection_params
=
selection_params
,
title
=
getFullAccountName
(
key
))
title
=
getFullAccountName
(
key
))
...
@@ -347,7 +347,7 @@ for inventory in portal.portal_simulation.getInventoryList(
...
@@ -347,7 +347,7 @@ for inventory in portal.portal_simulation.getInventoryList(
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'payment_uid'
]
=
None
selection_params
[
'payment_uid'
]
=
None
selection_params
[
'mirror_section_uid'
]
=
inventory
.
mirror_section_uid
or
Query
(
mirror_section_uid
=
None
)
selection_params
[
'mirror_section_uid'
]
=
inventory
.
mirror_section_uid
or
Simple
Query
(
mirror_section_uid
=
None
)
addReportSection
(
path
=
inventory
.
node_relative_url
,
addReportSection
(
path
=
inventory
.
node_relative_url
,
selection_params
=
selection_params
,
selection_params
=
selection_params
,
title
=
getFullAccountName
(
key
))
title
=
getFullAccountName
(
key
))
...
@@ -372,7 +372,7 @@ for inventory in portal.portal_simulation.getInventoryList(
...
@@ -372,7 +372,7 @@ for inventory in portal.portal_simulation.getInventoryList(
selection_params
[
'from_date'
]
=
from_date
selection_params
[
'from_date'
]
=
from_date
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'payment_uid'
]
=
inventory
.
payment_uid
or
Query
(
payment_uid
=
None
)
selection_params
[
'payment_uid'
]
=
inventory
.
payment_uid
or
Simple
Query
(
payment_uid
=
None
)
selection_params
.
setdefault
(
'mirror_section_uid'
,
None
)
selection_params
.
setdefault
(
'mirror_section_uid'
,
None
)
addReportSection
(
path
=
inventory
.
node_relative_url
,
addReportSection
(
path
=
inventory
.
node_relative_url
,
selection_params
=
selection_params
,
selection_params
=
selection_params
,
...
@@ -400,7 +400,7 @@ for inventory in portal.portal_simulation.getInventoryList(
...
@@ -400,7 +400,7 @@ for inventory in portal.portal_simulation.getInventoryList(
selection_params
[
'from_date'
]
=
from_date
selection_params
[
'from_date'
]
=
from_date
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'at_date'
]
=
at_date
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'node_uid'
]
=
inventory
.
node_uid
selection_params
[
'payment_uid'
]
=
inventory
.
payment_uid
or
Query
(
payment_uid
=
None
)
selection_params
[
'payment_uid'
]
=
inventory
.
payment_uid
or
Simple
Query
(
payment_uid
=
None
)
selection_params
.
setdefault
(
'mirror_section_uid'
,
None
)
selection_params
.
setdefault
(
'mirror_section_uid'
,
None
)
addReportSection
(
path
=
inventory
.
node_relative_url
,
addReportSection
(
path
=
inventory
.
node_relative_url
,
selection_params
=
selection_params
,
selection_params
=
selection_params
,
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.py
View file @
13b8424a
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
,
ComplexQuery
from
Products.PythonScripts.standard
import
Object
from
Products.PythonScripts.standard
import
Object
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
params
=
portal
.
ERP5Site_getAccountingSelectionParameterDict
(
selection_name
)
params
=
portal
.
ERP5Site_getAccountingSelectionParameterDict
(
selection_name
)
...
@@ -15,8 +15,8 @@ at_date = (from_date - 1).latestTime()
...
@@ -15,8 +15,8 @@ at_date = (from_date - 1).latestTime()
inventory_query
=
{
inventory_query
=
{
'at_date'
:
at_date
,
# this is not to_date
'at_date'
:
at_date
,
# this is not to_date
'grouping_query'
:
ComplexQuery
(
'grouping_query'
:
ComplexQuery
(
Query
(
grouping_reference
=
None
),
Simple
Query
(
grouping_reference
=
None
),
Query
(
grouping_date
=
at_date
,
range
=
"min
"
),
SimpleQuery
(
grouping_date
=
at_date
,
comparison_operator
=
">=
"
),
logical_operator
=
"OR"
),
logical_operator
=
"OR"
),
'simulation_state'
:
params
[
'simulation_state'
],
'simulation_state'
:
params
[
'simulation_state'
],
'node_uid'
:
kw
[
'node_uid'
],
'node_uid'
:
kw
[
'node_uid'
],
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.py
View file @
13b8424a
"""Creates a balance transaction to open the next period.
"""Creates a balance transaction to open the next period.
"""
"""
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
...
@@ -102,7 +102,7 @@ with context.defaultActivateParameterDict({'tag': activity_tag}, placeless=True)
...
@@ -102,7 +102,7 @@ with context.defaultActivateParameterDict({'tag': activity_tag}, placeless=True)
ledger_uid
=
ledger
.
getUid
()
ledger_uid
=
ledger
.
getUid
()
ledger_url
=
ledger
.
getCategoryRelativeUrl
()
ledger_url
=
ledger
.
getCategoryRelativeUrl
()
else
:
else
:
ledger_uid
=
Query
(
ledger_uid
=
None
)
ledger_uid
=
Simple
Query
(
ledger_uid
=
None
)
ledger_url
=
''
ledger_url
=
''
for
section
in
section_list
:
for
section
in
section_list
:
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_checkGroupingReferenceIsValid.py
View file @
13b8424a
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
from
Products.CMFActivity.ActiveResult
import
ActiveResult
from
Products.CMFActivity.ActiveResult
import
ActiveResult
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -12,7 +12,7 @@ precision_by_section_uid = {}
...
@@ -12,7 +12,7 @@ precision_by_section_uid = {}
def
check
(
node_uid
,
section_uid
,
mirror_section_uid
):
def
check
(
node_uid
,
section_uid
,
mirror_section_uid
):
precision
=
precision_by_section_uid
[
section_uid
]
precision
=
precision_by_section_uid
[
section_uid
]
if
mirror_section_uid
is
None
:
if
mirror_section_uid
is
None
:
mirror_section_uid
=
Query
(
mirror_section_uid
=
None
)
mirror_section_uid
=
Simple
Query
(
mirror_section_uid
=
None
)
line_list
=
portal
.
portal_simulation
.
getMovementHistoryList
(
line_list
=
portal
.
portal_simulation
.
getMovementHistoryList
(
portal_type
=
portal
.
getPortalAccountingMovementTypeList
(),
portal_type
=
portal
.
getPortalAccountingMovementTypeList
(),
grouping_reference
=
context
.
getGroupingReference
(),
grouping_reference
=
context
.
getGroupingReference
(),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalSectionLineList.py
View file @
13b8424a
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
from
Products.PythonScripts.standard
import
Object
from
Products.PythonScripts.standard
import
Object
request
=
container
.
REQUEST
request
=
container
.
REQUEST
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -15,7 +15,7 @@ if group_by:
...
@@ -15,7 +15,7 @@ if group_by:
if
project_uid
:
if
project_uid
:
if
project_uid
==
'None'
:
if
project_uid
==
'None'
:
extra_kw
[
'project_uid'
]
=
Query
(
project_uid
=
None
)
extra_kw
[
'project_uid'
]
=
Simple
Query
(
project_uid
=
None
)
else
:
else
:
extra_kw
[
'project_uid'
]
=
project_uid
extra_kw
[
'project_uid'
]
=
project_uid
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTransactionLineListForGroupingReference.py
View file @
13b8424a
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
NegatedQuery
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
,
NegatedQuery
,
ComplexQuery
request
=
container
.
REQUEST
request
=
container
.
REQUEST
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -62,11 +62,11 @@ if grouping == 'grouping':
...
@@ -62,11 +62,11 @@ if grouping == 'grouping':
search_kw
[
'grouping_reference'
]
=
None
search_kw
[
'grouping_reference'
]
=
None
else
:
else
:
assert
grouping
==
'ungrouping'
,
grouping
assert
grouping
==
'ungrouping'
,
grouping
search_kw
[
'grouping_reference'
]
=
NegatedQuery
(
Query
(
grouping_reference
=
None
))
search_kw
[
'grouping_reference'
]
=
NegatedQuery
(
Simple
Query
(
grouping_reference
=
None
))
if
title
:
if
title
:
search_kw
[
'title_query'
]
=
ComplexQuery
(
Query
(
title
=
title
),
search_kw
[
'title_query'
]
=
ComplexQuery
(
Simple
Query
(
title
=
title
),
Query
(
parent_title
=
title
),
Simple
Query
(
parent_title
=
title
),
logical_operator
=
'OR'
)
logical_operator
=
'OR'
)
if
delivery_reference
:
if
delivery_reference
:
search_kw
[
'parent_reference'
]
=
delivery_reference
search_kw
[
'parent_reference'
]
=
delivery_reference
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py
View file @
13b8424a
from
Products.ERP5Type.Document
import
newTempBase
from
Products.ERP5Type.Document
import
newTempBase
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
,
ComplexQuery
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Log
import
log
from
Products.ERP5Type.Log
import
log
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -38,20 +38,20 @@ for category_uid in category_uid_list:
...
@@ -38,20 +38,20 @@ for category_uid in category_uid_list:
# that specific project, or select a special value "None" which means
# that specific project, or select a special value "None" which means
# transactions that are not related to a project. For that we need a
# transactions that are not related to a project. For that we need a
# query that will be translated as stock.project_uid IS NULL.
# query that will be translated as stock.project_uid IS NULL.
params
[
category_uid
]
=
Query
(
**
{
category_uid
:
None
})
params
[
category_uid
]
=
Simple
Query
(
**
{
category_uid
:
None
})
else
:
else
:
params
[
category_uid
]
=
category_uid_value
params
[
category_uid
]
=
category_uid_value
funding_category
=
kw
.
get
(
'funding_category'
)
funding_category
=
kw
.
get
(
'funding_category'
)
if
funding_category
:
if
funding_category
:
if
funding_category
==
'None'
:
if
funding_category
==
'None'
:
params
[
'funding_uid'
]
=
Query
(
funding_uid
=
None
)
params
[
'funding_uid'
]
=
Simple
Query
(
funding_uid
=
None
)
else
:
else
:
params
[
'funding_category'
]
=
funding_category
params
[
'funding_category'
]
=
funding_category
function_category
=
kw
.
get
(
'function_category'
)
function_category
=
kw
.
get
(
'function_category'
)
if
function_category
:
if
function_category
:
if
function_category
==
'None'
:
if
function_category
==
'None'
:
params
[
'function_uid'
]
=
Query
(
function_uid
=
None
)
params
[
'function_uid'
]
=
Simple
Query
(
function_uid
=
None
)
else
:
else
:
params
[
'function_category'
]
=
function_category
params
[
'function_category'
]
=
function_category
...
@@ -90,8 +90,8 @@ if is_pl_account and not from_date:
...
@@ -90,8 +90,8 @@ if is_pl_account and not from_date:
if
portal
.
portal_selections
.
getSelectionParamsFor
(
selection_name
).
get
(
'omit_grouping_reference'
):
if
portal
.
portal_selections
.
getSelectionParamsFor
(
selection_name
).
get
(
'omit_grouping_reference'
):
if
params
.
get
(
'at_date'
):
if
params
.
get
(
'at_date'
):
params
[
'grouping_query'
]
=
ComplexQuery
(
params
[
'grouping_query'
]
=
ComplexQuery
(
Query
(
grouping_reference
=
None
),
Simple
Query
(
grouping_reference
=
None
),
Query
(
grouping_date
=
params
[
'at_date'
],
range
=
"min
"
),
SimpleQuery
(
grouping_date
=
params
[
'at_date'
],
comparison_operator
=
">=
"
),
logical_operator
=
"OR"
)
logical_operator
=
"OR"
)
else
:
else
:
params
[
'grouping_reference'
]
=
None
params
[
'grouping_reference'
]
=
None
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.py
View file @
13b8424a
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
Products.ZSQLCatalog.SQLCatalog
import
Simple
Query
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
params
=
portal
.
ERP5Site_getAccountingSelectionParameterDict
(
selection_name
=
selection_name
)
params
=
portal
.
ERP5Site_getAccountingSelectionParameterDict
(
selection_name
=
selection_name
)
...
@@ -28,20 +28,20 @@ for category_uid in category_uid_list:
...
@@ -28,20 +28,20 @@ for category_uid in category_uid_list:
# that specific project, or select a special value "None" which means
# that specific project, or select a special value "None" which means
# transactions that are not related to a project. For that we need a
# transactions that are not related to a project. For that we need a
# query that will be translated as stock.project_uid IS NULL.
# query that will be translated as stock.project_uid IS NULL.
params
[
category_uid
]
=
Query
(
**
{
category_uid
:
None
})
params
[
category_uid
]
=
Simple
Query
(
**
{
category_uid
:
None
})
else
:
else
:
params
[
category_uid
]
=
category_uid_value
params
[
category_uid
]
=
category_uid_value
funding_category
=
kw
.
get
(
'funding_category'
)
funding_category
=
kw
.
get
(
'funding_category'
)
if
funding_category
:
if
funding_category
:
if
funding_category
==
'None'
:
if
funding_category
==
'None'
:
params
[
'funding_uid'
]
=
Query
(
funding_uid
=
None
)
params
[
'funding_uid'
]
=
Simple
Query
(
funding_uid
=
None
)
else
:
else
:
params
[
'funding_category'
]
=
funding_category
params
[
'funding_category'
]
=
funding_category
function_category
=
kw
.
get
(
'function_category'
)
function_category
=
kw
.
get
(
'function_category'
)
if
function_category
:
if
function_category
:
if
function_category
==
'None'
:
if
function_category
==
'None'
:
params
[
'function_uid'
]
=
Query
(
function_uid
=
None
)
params
[
'function_uid'
]
=
Simple
Query
(
function_uid
=
None
)
else
:
else
:
params
[
'function_category'
]
=
function_category
params
[
'function_category'
]
=
function_category
...
...
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