diff --git a/odex25_takaful/odex_takaful/models/donation_details_lines.py b/odex25_takaful/odex_takaful/models/donation_details_lines.py index 0a1c49d55..224ec5ac2 100644 --- a/odex25_takaful/odex_takaful/models/donation_details_lines.py +++ b/odex25_takaful/odex_takaful/models/donation_details_lines.py @@ -78,6 +78,9 @@ class DonationsDetailsLines(models.Model): sponsor_id = fields.Many2one('res.partner', compute='_compute_sponsor_id', store=True, readonly=True) sponsor_phone = fields.Char(related='sponsor_id.mobile') branch_custom_id = fields.Many2one('branch.settings', compute='_compute_branch_custom_id') + # Stored helper field used solely for grouping in the UI. + branch_group_id = fields.Many2one( + 'branch.settings', compute='_compute_branch_group_id', store=True, index=True, search='_search_branch_group_id') record_type = fields.Selection([('sponsorship', 'Sponsorship'),('donation', 'Donation')], compute='_compute_record_type', store=True, readonly=True) state = fields.Selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('waiting', 'Waiting'), ('active', 'Active'),('closed', 'Closed'),('extended', 'Extended'),('replace', 'To Replace'), ('paid', 'Paid'),('cancel', 'Canceled')], string='State', default='draft') sponsorship_scheduling_line_ids = fields.One2many('sponsorship.scheduling.line', 'donation_detail_linked_id') @@ -295,6 +298,15 @@ class DonationsDetailsLines(models.Model): for rec in self: rec.branch_custom_id = rec.sponsorship_id.branch_custom_id or rec.sponsorship_mechanism_id.branch_custom_id + @api.depends('sponsorship_id.branch_custom_id', 'sponsorship_mechanism_id.branch_custom_id') + def _compute_branch_group_id(self): + for rec in self: + rec.branch_group_id = rec.sponsorship_id.branch_custom_id or rec.sponsorship_mechanism_id.branch_custom_id + + @api.model + def _search_branch_group_id(self, operator, value): + return ['|', ('sponsorship_id.branch_custom_id', operator, value), ('sponsorship_mechanism_id.branch_custom_id', operator, value)] + @api.depends('direct_debit', 'end_date') def _compute_show_extend_button(self): today = fields.Date.today() diff --git a/odex25_takaful/odex_takaful/reports/sponsorship_receipt_report.xml b/odex25_takaful/odex_takaful/reports/sponsorship_receipt_report.xml index daeee6d3c..e5e8e95c7 100644 --- a/odex25_takaful/odex_takaful/reports/sponsorship_receipt_report.xml +++ b/odex25_takaful/odex_takaful/reports/sponsorship_receipt_report.xml @@ -7,8 +7,7 @@ - -
+
-
+
مرحباً - +
- بكل امتنان نشكر لك تبرعك الكريم، ونسأل الله أن يجعلك ممن يرافقون النبي ﷺ في الجنة. + بكل امتنان نشكر لك تبرعك الكريم، ونسأل الله أن يجعلك ممن يرافقون النبي + ﷺ +
في الجنة.
ونتشرف دائما باستقبال عطائك المستمر لدعم أبنائكم الأيتام. @@ -56,17 +59,22 @@
- - [رقم الكفالة: + +
+ + رقم الكفالة: + + + رقم السند: + - ] - - - ( - - ) - +
+
+ التاريخ: + +
@@ -90,7 +98,7 @@ - + \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/static/src/scss/receipt_document.scss b/odex25_takaful/odex_takaful/static/src/scss/receipt_document.scss new file mode 100644 index 000000000..8a8d233b3 --- /dev/null +++ b/odex25_takaful/odex_takaful/static/src/scss/receipt_document.scss @@ -0,0 +1,3 @@ +.font-noto { + font-family: 'Odoo Unicode Support Noto' !important; +} \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/views/assets.xml b/odex25_takaful/odex_takaful/views/assets.xml index 4a7335f93..78752ee72 100644 --- a/odex25_takaful/odex_takaful/views/assets.xml +++ b/odex25_takaful/odex_takaful/views/assets.xml @@ -1,5 +1,11 @@ + + +