[FIX] odex_benefit: FIX bug
This commit is contained in:
parent
f5765cfc30
commit
c856c76f22
|
|
@ -777,7 +777,7 @@ class FamilyMemberProfile(models.Model):
|
|||
rec.member_id_number
|
||||
)
|
||||
existing_member = rec.search([
|
||||
('id', '!=', rec.id),
|
||||
('id', '!=', rec._origin.id),
|
||||
('member_id_number', '=', rec.member_id_number),
|
||||
('relationn.relation_type', 'not in', ['mother', 'replacement_mother'])
|
||||
], limit=1)
|
||||
|
|
@ -785,7 +785,7 @@ class FamilyMemberProfile(models.Model):
|
|||
raise ValidationError(_("This ID already exists."))
|
||||
if rec.relationn.relation_type not in ['mother', 'replacement_mother']:
|
||||
conflict_family = rec.env['grant.benefit'].search([
|
||||
('id', '!=', family.id),
|
||||
('id', '!=', family._origin.id),
|
||||
'|', '|',
|
||||
('father_id_number', '=', rec.member_id_number),
|
||||
('mother_id_number', '=', rec.member_id_number),
|
||||
|
|
|
|||
Loading…
Reference in New Issue