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
alecs_myu
erp5
Commits
5c08772f
Commit
5c08772f
authored
Sep 21, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: Remove table name from selected column aliases.
parent
d5066e31
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
12 deletions
+20
-12
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.py
...countingTransactionModule_getAccountingTransactionList.py
+1
-1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderModule_activateGetOrderStatList.py
..._skins/erp5_trade/OrderModule_activateGetOrderStatList.py
+7
-2
product/ERP5/tests/testSupply.py
product/ERP5/tests/testSupply.py
+6
-3
product/ZSQLCatalog/tests/testSQLCatalog.py
product/ZSQLCatalog/tests/testSQLCatalog.py
+6
-6
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingTransactionList.py
View file @
5c08772f
...
...
@@ -98,7 +98,7 @@ select_dict['total_credit'] = None
# Without this, ColumnMapper would choose to use accounting_transaction.reference, because a lot of
# columns from that table are used. But it does not realise there is no portal_type column *and*
# a (portal_type, reference) index exists on catalog.
select_dict
[
'
catalog.reference'
]
=
None
select_dict
[
'
reference'
]
=
'catalog.reference'
select_dict
[
'specific_reference'
]
=
None
select_dict
[
'project_uid'
]
=
None
select_dict
[
'payment_uid'
]
=
None
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderModule_activateGetOrderStatList.py
View file @
5c08772f
...
...
@@ -68,8 +68,13 @@ elif at_date is not None:
'query'
:
at_date
,
}
select_params
=
{
"select_list"
:
[
'source_section_title'
,
'destination_section_title'
,
'delivery.start_date'
]}
select_params
=
{
"select_dict"
:
{
'source_section_title'
:
None
,
'destination_section_title'
:
None
,
'start_date'
:
'delivery.start_date'
,
},
}
# sort_on_list = [ ('delivery.destination_section_uid', 'ASC'), ('delivery.start_date','ASC')]
...
...
product/ERP5/tests/testSupply.py
View file @
5c08772f
...
...
@@ -262,9 +262,12 @@ class TestSaleSupply(TestSupplyMixin, SubcontentReindexingWrapper,
supply
.
validate
()
supply_line
=
self
.
_makeSupplyLine
(
supply
)
kw
=
{}
kw
[
'predicate.uid'
]
=
supply_line
.
getUid
()
kw
[
'select_list'
]
=
[
'predicate.start_date_range_min'
]
kw
=
{
'predicate.uid'
:
supply_line
.
getUid
(),
'select_dict'
:
{
'start_date_range_min'
:
'predicate.start_date_range_min'
,
},
}
# check supply line in predicate table
result
=
self
.
catalog_tool
(
**
kw
)
...
...
product/ZSQLCatalog/tests/testSQLCatalog.py
View file @
5c08772f
...
...
@@ -700,18 +700,18 @@ class TestSQLCatalog(ERP5TypeTestCase):
# "{column: None}" form, as otherwise it's the user explicitely asking for
# such alias (which is not strictly invalid).
sql_expression
=
self
.
asSQLExpression
({
'select_dict'
:
{
'foo
.
default'
:
None
,
'foo
.
keyword'
:
'foo.keyword'
,
'foo
_
default'
:
None
,
'foo
_
keyword'
:
'foo.keyword'
,
}},
query_table
=
'foo'
)
select_dict
=
sql_expression
.
getSelectDict
()
self
.
assertTrue
(
'default'
in
select_dict
,
select_dict
)
self
.
assertFalse
(
'foo
.
default'
in
select_dict
,
select_dict
)
self
.
assertTrue
(
'foo
.
keyword'
in
select_dict
,
select_dict
)
self
.
assertFalse
(
'foo
_
default'
in
select_dict
,
select_dict
)
self
.
assertTrue
(
'foo
_
keyword'
in
select_dict
,
select_dict
)
# Variant: same operation, but this time stripping generates an ambiguity.
# That must be detected and cause a mapping exception.
self
.
assertRaises
(
ValueError
,
self
.
asSQLExpression
,
{
'select_dict'
:
{
'foo
.
ambiguous_mapping'
:
None
,
'bar
.
ambiguous_mapping'
:
None
,
'foo
_
ambiguous_mapping'
:
None
,
'bar
_
ambiguous_mapping'
:
None
,
}},
query_table
=
'foo'
)
def
test_hasColumn
(
self
):
...
...
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