diff --git a/odex25_ensan/odex_takaful/i18n/ar_001.po b/odex25_ensan/odex_takaful/i18n/ar_001.po index 926fbccd8..32cb4cf22 100644 --- a/odex25_ensan/odex_takaful/i18n/ar_001.po +++ b/odex25_ensan/odex_takaful/i18n/ar_001.po @@ -7504,4 +7504,52 @@ msgstr "سجل الإستبدال" msgid "Paid" msgstr "منتهي" +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__check_number +msgid "Check Number" +msgstr "رقم الشيك" +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__journal_id +msgid "Journal" +msgstr "حساب الجمعية" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__partner_bank_id +msgid "Partner Bank" +msgstr "بنك المتبرع" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__payment_amount +msgid "Payment Amount" +msgstr "المبلغ" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__payment_file_attachment +msgid "Payment Attachment" +msgstr "مرفق الدفع" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__payment_method +msgid "Payment Method" +msgstr "طريقة الدفع" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__check_due_date +msgid "Check Due Date" +msgstr "تاريخ الإستحقاق" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_extension_payment_wizard_line__check_number +msgid "Check Number" +msgstr "رقم الشيك" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_wizard__is_different_payment +msgid "Is Different Payment" +msgstr "طرف دفع متعددة" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_account_payment_register_form +msgid "Association Journal" +msgstr "حساب الجمعية" \ No newline at end of file diff --git a/odex25_ensan/odex_takaful/models/donation_details_lines.py b/odex25_ensan/odex_takaful/models/donation_details_lines.py index be50c2056..87527145b 100644 --- a/odex25_ensan/odex_takaful/models/donation_details_lines.py +++ b/odex25_ensan/odex_takaful/models/donation_details_lines.py @@ -157,7 +157,7 @@ class DonationsDetailsLines(models.Model): today = fields.Date.today() for rec in self: show_extend_button = ( - ((rec.record_type == 'donation' and rec.direct_debit) or rec.record_type == 'sponsorship') and + rec.record_type == 'sponsorship' and rec.end_date and rec.end_date >= today and rec.state == 'active' @@ -168,9 +168,9 @@ class DonationsDetailsLines(models.Model): def _compute_show_replaced_button(self): for rec in self: show_replaced_button = ( - ((rec.record_type == 'donation' and rec.donation_mechanism == 'with_conditions') or rec.record_type == 'sponsorship') and - rec.state in ('active', 'paid','replace') and - (rec.benefit_id or rec.benefit_ids or rec.family_id) + rec.record_type == 'sponsorship' and + rec.state in ('active','replace') and + (rec.benefit_id or rec.benefit_ids) ) rec.show_replaced_button = show_replaced_button diff --git a/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py b/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py index a5c49aa0b..863c385e8 100644 --- a/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py +++ b/odex25_ensan/odex_takaful/models/sponsorship_scheduling_line.py @@ -148,6 +148,8 @@ class SchedulingLine(models.Model): line.sudo().write({'status': 'paid'}) if line.donation_detail_linked_id.state == 'waiting' or (not line.donation_detail_linked_id.benefit_id and line.donation_detail_linked_id.record_type == 'sponsorship'): line.donation_detail_linked_id.sudo().write({'state': 'waiting'}) + elif line.donation_detail_linked_id.record_type == 'donation': + line.donation_detail_linked_id.sudo().write({'state': 'confirmed'}) else: line.donation_detail_linked_id.sudo().write({'state': 'active'}) line.donation_detail_linked_id.sponsorship_id.sudo().write({'state': 'wait_pay'}) diff --git a/odex25_ensan/odex_takaful/wizards/donation_extension_wizard.py b/odex25_ensan/odex_takaful/wizards/donation_extension_wizard.py index 7a8c7a483..848f8317c 100644 --- a/odex25_ensan/odex_takaful/wizards/donation_extension_wizard.py +++ b/odex25_ensan/odex_takaful/wizards/donation_extension_wizard.py @@ -126,6 +126,8 @@ class DonationExtensionWizard(models.TransientModel): 'journal_id': pay_line.journal_id.id, 'payment_method_id': pay_line.payment_method.id, 'communication': _("Extension Payment for %s") % inv.name, + 'transaction_file_attachment': pay_line.payment_file_attachment, + } ctx = {