diff --git a/models/donation.py b/models/donation.py
index 05247cf..a885175 100644
--- a/models/donation.py
+++ b/models/donation.py
@@ -23,7 +23,7 @@ class DonationDonation(models.Model):
string='Operation',
track_visibility='onchange',
ondelete='restrict',
- required=True,
+ # required=True,
domain=[('state', '=', 'exported')]
)
@@ -33,7 +33,7 @@ class DonationDonation(models.Model):
'opendons.segment',
string='Segment',
track_visibility='onchange',
- required=True,
+ # required=True,
ondelete='restrict'
)
diff --git a/models/duplicate.py b/models/duplicate.py
index 1a9d0e2..813824b 100644
--- a/models/duplicate.py
+++ b/models/duplicate.py
@@ -21,8 +21,9 @@ class opendons_duplicate_partner(models.Model):
index=True,
readonly=True,
track_visibility='onchange',
- ondelete='restrict'
+ ondelete='cascade'
)
+ user_ids=fields.One2many(related='partner_id.user_ids')
def find_duplicate_partner(self):
self.env['opendons.duplicate_partner'].search([]).unlink()
diff --git a/models/partner.py b/models/partner.py
index dcaa5c3..1837c11 100644
--- a/models/partner.py
+++ b/models/partner.py
@@ -108,7 +108,7 @@ class partner(models.Model):
npai_count=fields.Integer(String="NPAI count", readonly=True)
source=fields.Char(String="source")
- donor_id=fields.Char('Donor id',compute="_compute_donor_id",store=True)
+ donor_id=fields.Char('Donor id',readonly=True)
aggregate_id=fields.Many2one('opendons.aggregate.partner','partner_id')
@@ -170,7 +170,7 @@ class partner(models.Model):
# Change the values of a variable in this super function
record['key'] = self._alpha(int(record.id))
-
+ record.donor_id=str(record.id)+record.key
# Return the record so that the changes are applied and everything is stored.
return record
diff --git a/views/duplicate.xml b/views/duplicate.xml
index cf18260..961ba6e 100644
--- a/views/duplicate.xml
+++ b/views/duplicate.xml
@@ -20,6 +20,7 @@
+
diff --git a/views/recurring_donation.xml b/views/recurring_donation.xml
index 279475f..d0ff8eb 100644
--- a/views/recurring_donation.xml
+++ b/views/recurring_donation.xml
@@ -15,8 +15,8 @@
-
-
+
+