Skip to content

Commit aa7131e

Browse files
committed
[FIX] util/fields : add force_adapt in adapt_depends
Adding `force_adapt` to consider whole path instead of just the leaf part closes #43 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent c852d63 commit aa7131e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/fields.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ def adapt_depends(cr, model, old, new, skip_inherit=()):
10451045
for id_, model, depends in cr.fetchall():
10461046
temp_depends = depends.split(",")
10471047
for i in range(len(temp_depends)):
1048-
domain = _adapt_one_domain(cr, target_model, old, new, model, [(temp_depends[i], "=", "depends")])
1048+
domain = _adapt_one_domain(
1049+
cr, target_model, old, new, model, [(temp_depends[i], "=", "depends")], force_adapt=True
1050+
)
10491051
if domain:
10501052
temp_depends[i] = domain[0][0]
10511053
new_depends = ",".join(temp_depends)

0 commit comments

Comments
 (0)