FIX bug
This commit is contained in:
parent
803275e4be
commit
81c074e4a0
|
|
@ -95,7 +95,7 @@ class ConfirmBenefitExpense(models.Model):
|
|||
validation_setting = self.env["family.validation.setting"].search([], limit=1)
|
||||
|
||||
# base_domain = ['|',('state','=','second_approve'),'&',('state','=',('waiting_approve','first_approve')),('action_type','=','suspended')]
|
||||
base_domain = ['|',('state','=','second_approve'),'&;',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended')]
|
||||
base_domain = ['|',('state','=','second_approve'),'&',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended')]
|
||||
if rec.branch_custom_id:
|
||||
base_domain.append(('branch_custom_id', '=', rec.branch_custom_id.id))
|
||||
min_income = validation_setting.benefit_category_ids.mapped('mini_income_amount')
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ class TakafulSponsorship(models.Model):
|
|||
if self.benefit_type == 'orphan' and self.sponsorship_type:
|
||||
base_domain = \
|
||||
[
|
||||
'|', ('state', '=', 'second_approve'), '&;', ('state', 'in', ('waiting_approve', 'first_approve')),('action_type', '=', 'suspended'),
|
||||
'|', ('state', '=', 'second_approve'), '&', ('state', 'in', ('waiting_approve', 'first_approve')),('action_type', '=', 'suspended'),
|
||||
('member_status', '=', 'benefit'),
|
||||
'|',
|
||||
('relationn.relation_type', '=', 'daughter'),
|
||||
|
|
@ -607,12 +607,12 @@ class TakafulSponsorship(models.Model):
|
|||
if self.gender:
|
||||
if self.gender == 'female':
|
||||
base_domain = [
|
||||
'|', ('state', '=', 'second_approve'), '&;',
|
||||
'|', ('state', '=', 'second_approve'), '&',
|
||||
('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'daughter')]
|
||||
if self.gender == 'male':
|
||||
base_domain = [
|
||||
'|', ('state', '=', 'second_approve'), '&;',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
'|', ('state', '=', 'second_approve'), '&',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
('member_status', '=', 'benefit'),('relationn.relation_type', '=', 'son')]
|
||||
if self.education_status:
|
||||
base_domain.append(('education_status', '=', self.education_status))
|
||||
|
|
@ -628,7 +628,7 @@ class TakafulSponsorship(models.Model):
|
|||
self.benefit_count = 0
|
||||
self.min_needs_percent = 0
|
||||
self.max_needs_percent = 0
|
||||
base_domain = ['|',('state','=','second_approve'),'&;',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),('member_status','=','benefit'),'|',('relationn.relation_type', '=', 'mother'),('relationn.relation_type', '=', 'replacement_mother')]
|
||||
base_domain = ['|',('state','=','second_approve'),'&',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),('member_status','=','benefit'),'|',('relationn.relation_type', '=', 'mother'),('relationn.relation_type', '=', 'replacement_mother')]
|
||||
if self.education_status:
|
||||
base_domain.append(('education_status', '=', self.education_status))
|
||||
if self.education_level:
|
||||
|
|
@ -2070,7 +2070,7 @@ class DonationsDetailsLines(models.Model):
|
|||
if rec.benefit_type == 'orphan' and rec.sponsorship_type:
|
||||
base_domain = \
|
||||
[
|
||||
'|', ('state', '=', 'second_approve'), '&;',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
'|', ('state', '=', 'second_approve'), '&',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
('member_status', '=', 'benefit'),
|
||||
'|',
|
||||
('relationn.relation_type', '=', 'daughter'),
|
||||
|
|
@ -2079,12 +2079,12 @@ class DonationsDetailsLines(models.Model):
|
|||
if rec.gender:
|
||||
if rec.gender == 'female':
|
||||
base_domain = [
|
||||
'|', ('state', '=', 'second_approve'), '&;',
|
||||
'|', ('state', '=', 'second_approve'), '&',
|
||||
('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'daughter')]
|
||||
if rec.gender == 'male':
|
||||
base_domain = [
|
||||
'|', ('state', '=', 'second_approve'), '&;',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
'|', ('state', '=', 'second_approve'), '&',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'),
|
||||
('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'son')]
|
||||
if rec.education_status:
|
||||
base_domain.append(('education_status', '=', rec.education_status))
|
||||
|
|
@ -2098,7 +2098,7 @@ class DonationsDetailsLines(models.Model):
|
|||
domain = {'benefit_id': [('id', 'in', rec.members_domain_ids.ids)]}
|
||||
return {'domain': domain}
|
||||
if rec.benefit_type == 'widow' and rec.sponsorship_type:
|
||||
base_domain = ['|',('state','=','second_approve'),'&;',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),
|
||||
base_domain = ['|',('state','=','second_approve'),'&',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),
|
||||
('member_status', '=', 'benefit'), '|', ('relationn.relation_type', '=', 'mother'),
|
||||
('relationn.relation_type', '=', 'replacement_mother')]
|
||||
if rec.education_status:
|
||||
|
|
@ -2113,7 +2113,7 @@ class DonationsDetailsLines(models.Model):
|
|||
domain = {'benefit_id': [('id', 'in', rec.members_domain_ids.ids)]}
|
||||
return {'domain': domain}
|
||||
if rec.benefit_type == 'both' and rec.sponsorship_type:
|
||||
base_domain = ['|',('state','=','second_approve'),'&;',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),
|
||||
base_domain = ['|',('state','=','second_approve'),'&',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),
|
||||
('member_status', '=', 'benefit')]
|
||||
if rec.education_status:
|
||||
base_domain.append(('education_status', '=', rec.education_status))
|
||||
|
|
|
|||
Loading…
Reference in New Issue