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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Noah Brackenbury
erp5
Commits
58fe7fbe
Commit
58fe7fbe
authored
Feb 23, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Simplify values for Business Item with same path and layer but different sign
parent
947faea8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+6
-6
No files found.
product/ERP5/Document/BusinessManager.py
View file @
58fe7fbe
...
@@ -235,8 +235,7 @@ class BusinessManager(XMLObject):
...
@@ -235,8 +235,7 @@ class BusinessManager(XMLObject):
A Business Manager BT is said to be reduced if and only if:
A Business Manager BT is said to be reduced if and only if:
reduce(BT) = BT
reduce(BT) = BT
"""
"""
path_list
=
[
path_item
.
getBusinessPath
()
for
path_item
in
self
.
_path_item_list
]
path_list
=
[
path_item
.
getBusinessPath
()
for
path
in
self
.
_path_item_list
]
reduced_path_item_list
=
[]
reduced_path_item_list
=
[]
# We separate the path list in the ones which are repeated and the ones
# We separate the path list in the ones which are repeated and the ones
...
@@ -317,10 +316,11 @@ class BusinessManager(XMLObject):
...
@@ -317,10 +316,11 @@ class BusinessManager(XMLObject):
built_in_number_type
=
(
int
,
long
,
float
,
complex
)
built_in_number_type
=
(
int
,
long
,
float
,
complex
)
built_in_container_type
=
(
tuple
,
list
,
dict
,
set
)
built_in_container_type
=
(
tuple
,
list
,
dict
,
set
)
if
all
(
isinstance
(
added_value
,
built_in_container_type
))
and
\
# For all the values of container type, we remove the intersection
all
(
isinstance
(
subtracted_value
,
built_in_container_type
)):
added_value
=
[
x
for
x
in
added_value
if
not
x
in
subtracted_value
]
# For all the values of container type, we remove the intersection
subtracted_value
=
[
x
for
x
in
subtracted_value
if
not
x
in
added_value
]
pass
return
added_value
,
subtracted_value
class
BusinessItem
(
Implicit
,
Persistent
):
class
BusinessItem
(
Implicit
,
Persistent
):
...
...
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