diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po index a20271d90..085677abc 100644 --- a/odex25_takaful/odex_takaful/i18n/ar_001.po +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -7491,3 +7491,18 @@ msgstr "سجلاتي" msgid "All Records" msgstr "كل السجلات" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_account_payment_search_inherit_takaful +msgid "Has Branch" +msgstr "لديه فرع" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_account_payment_search_inherit_takaful +msgid "Payment Method (by Name)" +msgstr "طريقة السداد (بالاسم)" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_account_payment__payment_method_name +msgid "Payment Method Name" +msgstr "اسم طريقة السداد" diff --git a/odex25_takaful/odex_takaful/models/account_payment.py b/odex25_takaful/odex_takaful/models/account_payment.py index a06f7b993..11d7a1a89 100644 --- a/odex25_takaful/odex_takaful/models/account_payment.py +++ b/odex25_takaful/odex_takaful/models/account_payment.py @@ -1,4 +1,4 @@ -from odoo import models, fields +from odoo import models, fields, api class AccountPayment(models.Model): @@ -12,6 +12,13 @@ class AccountPayment(models.Model): store=True, readonly=True ) + payment_method_name = fields.Char( + string="Payment Method Name", + compute='_compute_payment_method_name', + store=True, + readonly=True, + help="Stored payment method name for grouping purposes" + ) confirm_payment_refund = fields.Binary() IBN_number = fields.Integer() confirm_payment_refund_image = fields.Binary() @@ -19,6 +26,11 @@ class AccountPayment(models.Model): machine_id = fields.Many2one('payment.machine', string='Payment Machine') machine_reference = fields.Char(string='Machine Reference', help='Reference number from the payment machine') + @api.depends('payment_method_line_id', 'payment_method_line_id.name') + def _compute_payment_method_name(self): + for rec in self: + rec.payment_method_name = rec.payment_method_line_id.name if rec.payment_method_line_id else False + class AccountPayment(models.Model): _inherit = 'account.journal' diff --git a/odex25_takaful/odex_takaful/views/account_payment_views.xml b/odex25_takaful/odex_takaful/views/account_payment_views.xml index 2a7ad0104..c2db89282 100644 --- a/odex25_takaful/odex_takaful/views/account_payment_views.xml +++ b/odex25_takaful/odex_takaful/views/account_payment_views.xml @@ -10,18 +10,18 @@ - - - - + + + + - + - - + +