Merge pull request #5204 from expsa/takaful_confirmpay
Takaful confirmpay
This commit is contained in:
commit
ceba543b9a
|
|
@ -251,9 +251,7 @@ class FamilyMemberProfile(models.Model):
|
|||
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="[('is_sponsor_portal', '=', True)]")
|
||||
sponsor_related_id = fields.Many2one('res.partner', 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')
|
||||
# Exception fields
|
||||
|
|
|
|||
|
|
@ -7278,3 +7278,18 @@ msgstr "مكفول"
|
|||
msgid "Have not Kafala"
|
||||
msgstr "غير مكفول"
|
||||
|
||||
|
||||
#. module: odex_takaful
|
||||
#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0
|
||||
#, python-format
|
||||
msgid "Please Check The Amount in donation Line!"
|
||||
msgstr "مبلغ التبرع صفر الرجاء ادخال قيمة لمبلغ التبرع"
|
||||
|
||||
|
||||
#. module: odex_takaful
|
||||
#: model_terms:ir.ui.view,arch_db:odex_takaful.family_member_form_inherit_donation_button
|
||||
msgid "Kafala Information"
|
||||
msgstr "بيانات الكفالة"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ class FamilyMember(models.Model):
|
|||
string='Donation Details',
|
||||
compute='_compute_donation_details_count'
|
||||
)
|
||||
sponsor_id = fields.Many2one('res.partner', string='Sponsor Partner', domain="[('is_sponsor_portal', '=', True)]")
|
||||
sponsor_related_id = fields.Many2one('res.partner', string='Sponsor')
|
||||
sponsorship_id = fields.Many2one('takaful.sponsorship', string='Sponsorship')
|
||||
sponsorship_end_date = fields.Date(string='Sponsorship End Date')
|
||||
is_restricted = fields.Boolean(string="Is Restricted ?", default=False, readonly=True)
|
||||
general_restriction = fields.Boolean(string="General Restriction", default=False, readonly=True)
|
||||
|
|
|
|||
|
|
@ -1181,6 +1181,11 @@ class TakafulSponsorship(models.Model):
|
|||
raise ValidationError(
|
||||
_("Please add at least one line in donation details!")
|
||||
)
|
||||
#Check if The Total Amount is not Zero
|
||||
if self.total_sponsorship_amount == 0:
|
||||
raise ValidationError(
|
||||
_("Please Check The Amount in donation Line!")
|
||||
)
|
||||
|
||||
all_donation_lines = (self.donations_details_lines + self.donations_details_lines_mechanism_ids).filtered(
|
||||
lambda r: r.display_type == False)
|
||||
|
|
|
|||
|
|
@ -13,11 +13,24 @@
|
|||
widget="statinfo"/>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='sponsor_related_id']" position="after">
|
||||
<field name="sponsorship_end_date" readonly="1"/>
|
||||
<field name="is_restricted" widget="boolean_toggle"/>
|
||||
<field name="general_restriction" widget="boolean_toggle"/>
|
||||
<field name="kafala_status" readonly="1"/>
|
||||
<xpath expr="//page[4]" position="after">
|
||||
<page name="kafala_info" string="Kafala Information">
|
||||
<group>
|
||||
<field name="sponsor_related_id"
|
||||
readonly="1"/>
|
||||
<field name="sponsor_id"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"
|
||||
invisible="1"/>
|
||||
<field name="sponsorship_id" invisible="1"
|
||||
attrs="{'readonly':[('state','not in',['draft','complete_info'])]}"/>
|
||||
|
||||
<field name="sponsorship_end_date" readonly="1"/>
|
||||
<field name="is_restricted" widget="boolean_toggle"/>
|
||||
<field name="general_restriction" widget="boolean_toggle"/>
|
||||
<field name="kafala_status" readonly="1"/>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
|
||||
</xpath>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue