You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
984 B

  1. -
  2. I create a relation type allowing partners to be in
  3. both sides of the relation.
  4. -
  5. !record {model: res.partner.relation.type, id: allow_self}:
  6. name: 'Relation A'
  7. name_inverse: 'Inverse Relation A'
  8. contact_type_right: 'p'
  9. contact_type_left: 'p'
  10. allow_self: True
  11. -
  12. I create a relation type with default value for `allow_self`
  13. both sides of the relation.
  14. -
  15. !record {model: res.partner.relation.type, id: allow_self}:
  16. name: 'Relation B'
  17. name_inverse: 'Inverse Relation B'
  18. contact_type_right: 'p'
  19. contact_type_left: 'p'
  20. -
  21. I create relation instance admin -- Relation A --> admin
  22. -
  23. !record {model: res.partner.relation, id: test_allow}:
  24. left_partner_id: base.admin
  25. right_partner_id: base.admin
  26. type_id: test_allow
  27. -
  28. I create relation instance admin -- Relation B --> admin
  29. -
  30. !record {model: res.partner.relation, id: test_disallow}:
  31. left_partner_id: base.admin
  32. right_partner_id: base.admin
  33. type_id: test_disallow