[UPD] odex_benefit
This commit is contained in:
parent
0fe2a5eb94
commit
a9b9ae07f2
|
|
@ -52,7 +52,7 @@ class CreatePortalAccount(http.Controller):
|
|||
'name': f'{first_name} {second_name}',
|
||||
'email': email,
|
||||
'phone': formatted_phone,
|
||||
'account_type': account_type,
|
||||
# 'account_type': account_type,
|
||||
}
|
||||
partner = Partner.create(partner_vals)
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ class CreatePortalAccount(http.Controller):
|
|||
})
|
||||
|
||||
# Set partner account_type
|
||||
user.set_partner_account_type(account_type)
|
||||
partner.set_partner_account_type(account_type)
|
||||
|
||||
# Update user fields similar to create_user and original flow
|
||||
user.sudo().write({
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ class GrantBenefitProfile(models.Model):
|
|||
exception_end_date = fields.Datetime(string='Exception End Date')
|
||||
|
||||
# sponsor_id = fields.Many2one('res.partner', string='Sponsor',domain="[('account_type','=','sponsor')]")
|
||||
sponsor_id = fields.Many2one('res.partner', string='Sponsor',domain="['|', ('account_type', '=', 'sponsor'), ('is_sponsor', '=', True)]")
|
||||
sponsor_id = fields.Many2one('res.partner', string='Sponsor',domain="[('is_sponsor_portal', '=', True)]")
|
||||
|
||||
family_monthly_income = fields.Float(string="Family Monthly Income", compute='_get_family_monthly_values')
|
||||
family_monthly_meals = fields.Float(string="Family Monthly Meals", compute='_get_family_monthly_values')
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class FamilyMemberProfile(models.Model):
|
|||
suspend_method = fields.Selection(selection=[('manual', 'Manual'), ('auto', 'Auto')], string="Suspend Method",default='auto')
|
||||
is_member_workflow = fields.Boolean('Is Member Workflow?')
|
||||
# sponsor_id = fields.Many2one('res.partner', string='Sponsor Partner',domain="[('account_type','=','sponsor')]")
|
||||
sponsor_id = fields.Many2one('res.partner', string='Sponsor Partner',domain="['|', ('account_type', '=', 'sponsor'), ('is_sponsor', '=', True)]")
|
||||
sponsor_id = fields.Many2one('res.partner', string='Sponsor Partner',domain="[('is_sponsor_portal', '=', True)]")
|
||||
sponsor_related_id = fields.Many2one('takaful.sponsor', string='Sponsor')
|
||||
sponsorship_id = fields.Many2one('takaful.sponsorship', string='Sponsorship')
|
||||
required_attach = fields.Selection(selection=[('true', 'True'), ('false', 'False')], compute='get_required_attach',store=True,string='Member Required Attach')
|
||||
|
|
@ -437,6 +437,7 @@ class FamilyMemberProfile(models.Model):
|
|||
# 'email': self.email,
|
||||
# 'phone': self.phone,
|
||||
# 'account_type': 'benefit',
|
||||
# 'is_benefit': True,
|
||||
# 'code': self.benefit_id.code,
|
||||
# })
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue