How to do it...

To write the partner manipulation methods, you need to perform the following steps:

  1. Define a method called get_email_addresses():
    @api.model 
    def get_email_addresses(self, partner): 
  1. Call mapped() to get the email addresses of the contacts of the partner:
    return partner.mapped('child_ids.email') 
  1. Define a method called get_companies():
    @api.model 
    def get_companies(self, partners): 
  1. Call mapped() to get the different companies of the partners:
    return partners.mapped('parent_id')
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.216.249