Commit d958b1a1 authored by Julien Muchembled's avatar Julien Muchembled Committed by Sebastien Robin

MRP: add compatibility code for unit tests that wrongly use 'industrial_phase'

parent e008fa3a
......@@ -91,6 +91,11 @@ class Amount(Base, VariatedMixin):
return []
variation_list = resource.getVariationBaseCategoryList(
omit_optional_variation=omit_optional_variation)
# BBB: 'industrial_phase' should be used exclusively for production and
# should not appear on resource. But many unit tests still use it.
# For the same reason, we treat as an optional variation.
if ('industrial_phase' not in variation_list
and not omit_optional_variation):
variation_list.append('industrial_phase')
if base_category_list:
variation_list = filter(base_category_list.__contains__, variation_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment