Set email_ids in contract creation
When we receive the call from OTRS, we'll get a "email" param. Possible scenes:
- Empty email: No email was added in the OTRS ticket processing -> We add the contract partner's email by default
- New email:
- Existing in its partner: We add it in the contract
email_ids
- Doesn't exist in its partner: We create a child partner type
"contract-email", with the partner as
parent_id
. We add it to the contractemail_ids
.
- Existing in its partner: We add it in the contract
Edited by Pelayo García