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
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
b9db0af5
Commit
b9db0af5
authored
Sep 08, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_trade: search trade condition bases on source/destination project too
parent
e3c97b8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SaleOrder_applySaleTradeCondition.py
...tal_skins/erp5_trade/SaleOrder_applySaleTradeCondition.py
+10
-2
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SaleOrder_applySaleTradeCondition.py
View file @
b9db0af5
...
...
@@ -9,8 +9,8 @@ trade_condition_list = order.getSpecialiseValueList(
portal_type
=
trade_condition_portal_type
)
tested_base_category_list
=
[
]
for
base_category
in
(
'source_section'
,
'source'
,
'destination_section'
,
'destination'
,
):
for
base_category
in
(
'source_section'
,
'source'
,
'source_project'
,
'destination_section'
,
'destination'
,
'destination_project'
):
if
context
.
getProperty
(
base_category
):
tested_base_category_list
.
append
(
base_category
)
...
...
@@ -24,6 +24,12 @@ else:
def
rank_method
(
trade_condition
):
rank
=
0
destination_project
=
trade_condition
.
getDestinationProject
()
if
destination_project
:
if
destination_project
==
context
.
getDestinationProject
():
rank
+=
10
else
:
rank
-=
2
destination_section
=
trade_condition
.
getDestinationSection
()
if
destination_section
:
if
destination_section
==
context
.
getDestinationSection
():
...
...
@@ -36,6 +42,8 @@ def rank_method(trade_condition):
rank
+=
10
else
:
rank
-=
2
if
trade_condition
.
getSourceProject
():
rank
+=
1
if
trade_condition
.
getSourceSection
():
rank
+=
1
if
trade_condition
.
getSource
():
...
...
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