Commit 4c3e1915 authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5.mixin.builder: Do not pass applied_rule_uid if it is None.

Avoids giving catalog parameters it cannot handle and would complain about.
Reviewed-By: Julien Muchembled's avatarJulien Muchembled <jm@nexedi.com>
parent 7371afec
......@@ -129,9 +129,9 @@ class BuilderMixin(XMLObject, Amount, Predicate):
if len(business_link_value_list) > 0:
# use only Business Link related movements
kw['causality_uid'] = [link_value.getUid() for link_value in business_link_value_list]
movement_list = self.searchMovementList(
applied_rule_uid=applied_rule_uid,
**kw)
if applied_rule_uid is not None:
kw['applied_rule_uid'] = applied_rule_uid
movement_list = self.searchMovementList(**kw)
if not movement_list:
return []
# Collect
......
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