|
|
@ -35,21 +35,7 @@ class partner(models.Model): |
|
|
|
except Exception: |
|
|
|
partner.address_count = 0 |
|
|
|
|
|
|
|
def _compute_email_count(self): |
|
|
|
# The current user may not have access rights for donations |
|
|
|
for partner in self: |
|
|
|
try: |
|
|
|
partner.email_count = len(partner.email_ids) |
|
|
|
except Exception: |
|
|
|
partner.email_count = 0 |
|
|
|
|
|
|
|
def _compute_phone_count(self): |
|
|
|
# The current user may not have access rights for donations |
|
|
|
for partner in self: |
|
|
|
try: |
|
|
|
partner.phone_count = len(partner.phone_ids) |
|
|
|
except Exception: |
|
|
|
partner.phone_count = 0 |
|
|
|
|
|
|
|
|
|
|
|
def _compute_relationshipPartner_count(self): |
|
|
|
# The current user may not have access rights for donations |
|
|
@ -90,6 +76,8 @@ class partner(models.Model): |
|
|
|
string="# of Addresses", |
|
|
|
readonly=True |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
relationshipPartner_ids = fields.One2many( |
|
|
|
'opendons_relationship.partner', |
|
|
|
'partner_id', |
|
|
@ -103,6 +91,7 @@ class partner(models.Model): |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recurring_donation_count = fields.Integer( |
|
|
|
compute='_compute_recurring_donation_count', |
|
|
|
string="# of recurring donation", |
|
|
|