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
1
Merge Requests
1
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
Cédric Le Ninivin
erp5
Commits
c5bce484
Commit
c5bce484
authored
Feb 27, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ResourcMeasureConsistencyConstraint: Update Constraint
parent
5c4de8cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
product/ERP5/Document/ResourceMeasuresConsistencyConstraint.py
...ct/ERP5/Document/ResourceMeasuresConsistencyConstraint.py
+2
-1
No files found.
product/ERP5/Document/ResourceMeasuresConsistencyConstraint.py
View file @
c5bce484
...
@@ -64,6 +64,7 @@ class ResourceMeasuresConsistencyConstraint(ConstraintMixin):
...
@@ -64,6 +64,7 @@ class ResourceMeasuresConsistencyConstraint(ConstraintMixin):
quantity_map
=
{}
quantity_map
=
{}
metric_type_set
=
set
()
metric_type_set
=
set
()
quantity_unit_definition_dict
=
obj
.
_getQuantityUnitDefinitionDict
()
for
measure
in
obj
.
getMeasureList
():
for
measure
in
obj
.
getMeasureList
():
metric_type
=
measure
.
getMetricType
()
metric_type
=
measure
.
getMetricType
()
...
@@ -78,7 +79,7 @@ class ResourceMeasuresConsistencyConstraint(ConstraintMixin):
...
@@ -78,7 +79,7 @@ class ResourceMeasuresConsistencyConstraint(ConstraintMixin):
if
not
measure
.
getConvertedQuantityUnit
():
if
not
measure
.
getConvertedQuantityUnit
():
error
(
'message_measure_no_quantity_unit'
,
error
(
'message_measure_no_quantity_unit'
,
metric_type
=
display
(
metric_type
,
'metric_type'
))
metric_type
=
display
(
metric_type
,
'metric_type'
))
elif
not
measure
.
asCatalogRowList
():
elif
not
measure
.
asCatalogRowList
(
quantity_unit_definition_dict
):
error
(
'message_measure_no_quantity'
,
error
(
'message_measure_no_quantity'
,
metric_type
=
display
(
metric_type
,
'metric_type'
))
metric_type
=
display
(
metric_type
,
'metric_type'
))
if
metric_type
in
metric_type_set
:
if
metric_type
in
metric_type_set
:
...
...
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