diff --git a/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py b/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py index b488685b4..713f5a920 100644 --- a/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py +++ b/odex25_ensan/odex_takaful/models/takaful_sponorship_model.py @@ -67,7 +67,7 @@ class TakafulSponsorship(models.Model): branch_custom_id = fields.Many2one('branch.settings', string="Branch", default=lambda self: self._default_branch_custom_id(), required=True, tracking=True) sponsorship_creation_date = fields.Datetime(string="Sponsorship Creation Date", default=fields.Datetime.now, required=True, copy=False) sponsor_note = fields.Text(string='Sponsor Note') - sponsor_or_donor_type = fields.Selection(string='Sponsor / Donor Type',selection=[('registered', 'Registered'), ('new_sponsor', 'New Sponsor'), ('unknown', 'Unknown')], required=True) + sponsor_or_donor_type = fields.Selection(string='Sponsor / Donor Type',selection=[('registered', 'Registered'), ('new_sponsor', 'New Sponsor'), ('unknown', 'Unknown')], required=True, default='registered') # ('not_registered', 'Not Registered'), sponsor_donor_type = fields.Selection(string='Sponsor / Donor Type',selection=[('registered', 'Registered'), ('new_sponsor', 'New Sponsor')]) sponsor_name = fields.Char(string="Sponsor Name") diff --git a/odex25_ensan/odex_takaful/views/assets.xml b/odex25_ensan/odex_takaful/views/assets.xml index 132372962..26afaa7ae 100644 --- a/odex25_ensan/odex_takaful/views/assets.xml +++ b/odex25_ensan/odex_takaful/views/assets.xml @@ -29,6 +29,12 @@ direction: ltr; } + /* Fix top spacing caused by h1 */ + h1 { + margin-bottom: 5px !important; + margin-top: 5px !important; + } + /* Record Type Simple & Clean Design */ .o_record_type_simple { background: #f8f9fa; @@ -111,7 +117,14 @@ display: flex; align-items: center; gap: 8px; - min-width: 100px; + min-width: 120px; + justify-content: center; + } + + .mechanism_option i { + width: 20px; + text-align: center; + font-size: 16px; } .mechanism_option:hover { @@ -210,6 +223,9 @@ var currentMechanism = self.model.localData[self.handle].data.donation_mechanism; if (currentMechanism) { self.$('.mechanism_option[data-value="' + currentMechanism + '"]').addClass('selected'); + } else { + // Default to without_conditions (غير مشروط) as requested + self.$('.mechanism_option[data-value="without_conditions"]').addClass('selected'); } }, 100); } diff --git a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml index 06a4e01dc..6177cf884 100644 --- a/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml +++ b/odex25_ensan/odex_takaful/views/takaful_sponorship_view.xml @@ -92,11 +92,11 @@
@@ -113,12 +113,12 @@ attrs="{'invisible': [('record_type','!=','donation')]}"> @@ -152,9 +152,9 @@