Browse Source

[IMP] add function to get the representative of the company

pull/1/head
houssine 6 years ago
parent
commit
55e573162b
  1. 3
      easy_my_coop/models/partner.py

3
easy_my_coop/models/partner.py

@ -112,6 +112,9 @@ class ResPartner(models.Model):
if self.child_ids.filtered('representative'):
return True
return False
def get_representative(self):
return self.child_ids.filtered('representative')
def get_cooperator_from_nin(self, national_id_number):
return self.search([('cooperator','=',True),('national_register_number','=',national_id_number)])

Loading…
Cancel
Save