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
Binh
erp5
Commits
f6935cb8
Commit
f6935cb8
authored
Jun 14, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_banking_check: More *_expression removal
Add dependency on erp5_item to get now-required related keys.
parent
6bb4c56e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.py
...ck_operation/CheckbookDelivery_checkAggregateStockList.py
+7
-3
bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Delivery_getCheckbookList.py
...erp5_banking_check_operation/Delivery_getCheckbookList.py
+4
-8
bt5/erp5_banking_check/bt/dependency_list
bt5/erp5_banking_check/bt/dependency_list
+2
-1
product/ERP5Banking/tests/TestERP5BankingMixin.py
product/ERP5Banking/tests/TestERP5BankingMixin.py
+1
-0
No files found.
bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.py
View file @
f6935cb8
from
Products.DCWorkflow.DCWorkflow
import
ValidationFailed
from
Products.DCWorkflow.DCWorkflow
import
ValidationFailed
from
Products.ERP5Type.Message
import
Message
from
Products.ERP5Type.Message
import
Message
aggregate_uid_list
=
[
x
.
uid
for
x
in
context
.
portal_simulation
.
getCurrentTrackingList
(
aggregate_uid_list
=
[
at_date
=
at_date
,
node
=
node_url
,
x
.
uid
for
x
in
context
.
portal_simulation
.
getCurrentTrackingList
(
where_expression
=
"item_catalog.portal_type IN ('Check', 'Checkbook')"
)]
at_date
=
at_date
,
node
=
node_url
,
item_catalog_portal_type
=
(
'Check'
,
'Checkbook'
),
)
]
for
line
in
context
.
getMovementList
():
for
line
in
context
.
getMovementList
():
for
aggregate_value
in
line
.
getAggregateValueList
():
for
aggregate_value
in
line
.
getAggregateValueList
():
if
aggregate_value
.
getUid
()
not
in
aggregate_uid_list
:
if
aggregate_value
.
getUid
()
not
in
aggregate_uid_list
:
...
...
bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Delivery_getCheckbookList.py
View file @
f6935cb8
...
@@ -32,11 +32,12 @@ if listbox is None:
...
@@ -32,11 +32,12 @@ if listbox is None:
listbox
=
[]
listbox
=
[]
if
node
is
not
None
or
disable_node
:
if
node
is
not
None
or
disable_node
:
getCurrentTrackingList
=
context
.
portal_simulation
.
getCurrentTrackingList
getCurrentTrackingList
=
context
.
portal_simulation
.
getCurrentTrackingList
# context.log('Delivery_viewCheckbookInputDialog', getCurrentTrackingList(at_date=at_date, node=node,src__=1,where_expression="item_catalog.portal_type='Check' or item_catalog.portal_type='Checkbook'"))
if
disable_node
:
if
disable_node
:
node
=
None
node
=
None
kw
=
{}
kw
=
{
'item_catalog_portal_type'
:
(
'Check'
,
'Checkbook'
),
}
if
reference
not
in
(
None
,
''
):
if
reference
not
in
(
None
,
''
):
kw
[
'aggregate_uid'
]
=
[
x
.
uid
for
x
in
context
.
getPortalObject
().
portal_catalog
(
kw
[
'aggregate_uid'
]
=
[
x
.
uid
for
x
in
context
.
getPortalObject
().
portal_catalog
(
destination_payment_internal_bank_account_number
=
reference
,
destination_payment_internal_bank_account_number
=
reference
,
...
@@ -47,17 +48,12 @@ if listbox is None:
...
@@ -47,17 +48,12 @@ if listbox is None:
checkbook_model_uid
=
context
.
getPortalObject
().
restrictedTraverse
(
checkbook_model
).
getUid
()
checkbook_model_uid
=
context
.
getPortalObject
().
restrictedTraverse
(
checkbook_model
).
getUid
()
kw
[
'resource_uid'
]
=
checkbook_model_uid
kw
[
'resource_uid'
]
=
checkbook_model_uid
search_criterion
=
''
if
title
not
in
(
None
,
''
):
if
title
not
in
(
None
,
''
):
# FIXME: this doesn't work with current catalog and simulation tool
kw
[
'item_catalog_title'
]
=
title
# build a SQL statement to bypass this limitation
#kw['item_catalog.title'] = title
search_criterion
=
" AND item_catalog.title LIKE '%s'"
%
title
current_tracking_list
=
getCurrentTrackingList
(
current_tracking_list
=
getCurrentTrackingList
(
to_date
=
at_date
,
to_date
=
at_date
,
node
=
node
,
node
=
node
,
where_expression
=
"item_catalog.portal_type='Check' or item_catalog.portal_type='Checkbook' %s"
%
search_criterion
,
**
kw
)
**
kw
)
if
count
is
True
:
if
count
is
True
:
...
...
bt5/erp5_banking_check/bt/dependency_list
View file @
f6935cb8
erp5_banking_core
erp5_banking_core
erp5_item
product/ERP5Banking/tests/TestERP5BankingMixin.py
View file @
f6935cb8
...
@@ -54,6 +54,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
...
@@ -54,6 +54,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
'erp5_base'
,
'erp5_base'
,
'erp5_pdm'
,
'erp5_pdm'
,
'erp5_trade'
,
'erp5_trade'
,
'erp5_item'
,
'erp5_accounting'
,
'erp5_accounting'
,
'erp5_banking_core'
,
'erp5_banking_core'
,
'erp5_banking_inventory'
,
'erp5_banking_inventory'
,
...
...
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