39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
- |
|
|
I will test base_contact for following cases:
|
|
*contacts unrelated to a partner,
|
|
*contacts working at several addresses (possibly for different partners),
|
|
*contacts with possibly different functions for each of its job's addresses
|
|
- |
|
|
In order to check contacts first I will create contact unrelated to a partner
|
|
-
|
|
!record {model: res.partner.contact, id: res_partner_contact_williams0}:
|
|
country_id: base.be
|
|
first_name: Laura
|
|
job_ids:
|
|
- email: lwilliams@mydomain.com
|
|
function: PA
|
|
phone: (+32).10.45.18.77
|
|
mobile: (+32).10.45.18.77
|
|
name: Williams
|
|
- |
|
|
Now in order to assign this contact to partner I will create one partner assign contact laura to this partner
|
|
-
|
|
!record {model: res.partner, id: res_partner_laurascompany0}:
|
|
address:
|
|
- city: Namur
|
|
country_id: base.be
|
|
phone: (+32).10.45.18.77
|
|
street: 23, street ways
|
|
type: default
|
|
zip: '2324324'
|
|
job_ids:
|
|
- function: CEO
|
|
contact_id: res_partner_contact_williams0
|
|
name: Lauras Company
|
|
ref: LC
|
|
-
|
|
Now I will check that the new job is assigned properly to contact or not
|
|
-
|
|
!assert {model: res.partner.contact, id: res_partner_contact_williams0}:
|
|
- len(job_ids) == 2
|