diff --git a/odex25_ensan/odex_takaful/i18n/ar_001.po b/odex25_ensan/odex_takaful/i18n/ar_001.po
index 926fbccd8..597609a79 100644
--- a/odex25_ensan/odex_takaful/i18n/ar_001.po
+++ b/odex25_ensan/odex_takaful/i18n/ar_001.po
@@ -243,6 +243,11 @@ msgstr "تاريخ الدفع:"
msgid "Payment Method:"
msgstr "طريقة الدفع:"
+#. module: enasan_geidea_sponsorship
+#: model_terms:ir.ui.view,arch_db:enasan_geidea_sponsorship.view_account_payment_register_form_geidea
+msgid "Process on Terminal"
+msgstr "الدفع على المنصة"
+
#. module: odex_takaful
#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document
msgid "Payment Method"
diff --git a/odex25_ensan/odex_takaful/models/donation_details_lines.py b/odex25_ensan/odex_takaful/models/donation_details_lines.py
index e600b2a65..ca9877efa 100644
--- a/odex25_ensan/odex_takaful/models/donation_details_lines.py
+++ b/odex25_ensan/odex_takaful/models/donation_details_lines.py
@@ -99,6 +99,34 @@ class DonationsDetailsLines(models.Model):
journal_id = fields.Many2one('account.journal', string="Journal",domain="[('type','=','bank')]",default=_default_journal_id)
benefit_status = fields.Selection(related='benefit_id.member_status')
ages = fields.Integer(compute='_compute_get_age_range' , store=True)
+ waiting_date = fields.Date(
+ string="تاريخ الانتظار",
+ compute="_compute_dates",
+ store=True
+ )
+
+ replace_date = fields.Date(
+ string="تاريخ الاستبدال",
+ compute="_compute_dates",
+ store=True
+ )
+
+ @api.depends('state')
+ def _compute_dates(self):
+ """Automatically set waiting_date or replace_date based on state."""
+ for rec in self:
+ if rec.state == 'waiting':
+ print(date.today())
+ rec.waiting_date = date.today()
+ rec.replace_date = False
+ elif rec.state == 'replace':
+ rec.replace_date = date.today()
+ rec.waiting_date = False
+ else:
+ rec.waiting_date = False
+ rec.replace_date = False
+
+
# cheque_number = fields.Integer(string="Cheque Number")
# cheque_due_date = fields.Date(string="Cheque Due Date")
# cheque_file_attachment = fields.Binary(string='Cheque Attachment', attachment=True)
@@ -864,6 +892,20 @@ class DonationsDetailsLines(models.Model):
if sponsorship and len(sponsorship) == 1:
message = _("Benefit IDs changed in a donation item:
%s") % "
".join(changes)
sponsorship.message_post(body=message)
+
+ # if 'state' in vals:
+ # print('In Vals')
+ # print("vals['state'] >>> " , vals['state'])
+ # if vals['state'] == 'waiting':
+ # vals['waiting_date'] = date.today()
+ # print("vals['waiting_date'] >>> " , vals['waiting_date'])
+ # vals['replace_date'] = False
+ # elif vals['state'] == 'replace':
+ # vals['replace_date'] = date.today()
+ # vals['waiting_date'] = False
+ # else:
+ # vals['waiting_date'] = False
+ # vals['replace_date'] = False
self.onset_benefit_id()
return res
diff --git a/odex25_ensan/odex_takaful/views/donations_details_lines.xml b/odex25_ensan/odex_takaful/views/donations_details_lines.xml
index 5582f6347..1268e2518 100644
--- a/odex25_ensan/odex_takaful/views/donations_details_lines.xml
+++ b/odex25_ensan/odex_takaful/views/donations_details_lines.xml
@@ -61,11 +61,12 @@
donations.details.lines.view.tree
donations.details.lines
-
+
+
@@ -84,6 +85,8 @@
+
+
+
@@ -362,16 +366,18 @@
Donations Details Lines waiting
donations.details.lines
tree,form
+ [('state', '=', 'waiting')]
- {'create': False, 'delete': False, 'search_default_filter_waiting': 1}
+ {'create': False, 'delete': False}
Donations Details Lines Replacement
donations.details.lines
tree,form
+ [('state', '=', 'replace')]
- {'create': False, 'delete': False, 'search_default_filter_replace': 1}
+ {'create': False, 'delete': False}
diff --git a/odex25_ensan/odex_takaful/views/takaful_menus_actions.xml b/odex25_ensan/odex_takaful/views/takaful_menus_actions.xml
index 79ff0230d..705849407 100644
--- a/odex25_ensan/odex_takaful/views/takaful_menus_actions.xml
+++ b/odex25_ensan/odex_takaful/views/takaful_menus_actions.xml
@@ -13,11 +13,13 @@
-
-
+ name="Donations Details Lines To Replace Benefit" action="donations_details_lines_replace_action" sequence="3"/>
+
+
+
+
@@ -27,7 +29,7 @@
-