Testing for hierarchical search in M2M
-
!python {model: res.partner }: |
- ids = self.search(cr, uid, [('category_id', 'child_of','supplier')])
+ ids = self.search(cr, uid, [('category_id', 'child_of',ref('res_partner_category_1'))])
assert len(ids) >= 1, ids
-
Test hierarchical search in M2M with child ID1
-
!python {model: res.partner }: |
- ids = self.search(cr, uid, [('category_id', 'child_of','Customer')])
+ ids = self.search(cr, uid, [('category_id', 'child_of',ref('res_partner_category_0'))])
assert len(ids) >= 1, ids
-
- Test hierarchical search in M2M with child ID2
--
- !python {model: res.partner }: |
- ids = self.search(cr, uid, [('category_id', 'child_of','Manufacturer')])
- assert len(ids) == 2, ids
-
--
"1.0 Setup test partner categories: parent root"
-
!record {model: res.partner.category, id: categ_root}: