From df42ed39f2ea0a1a2fcb1864ad3b42191dd83c6a Mon Sep 17 00:00:00 2001 From: Nossibaelhadi Date: Wed, 12 Nov 2025 03:14:09 +0300 Subject: [PATCH] ADD branch ids for product --- odex25_donation/ensan_donation_request/i18n/ar_001.po | 9 ++++++++- .../ensan_donation_request/models/product_template.py | 8 ++++++++ .../views/product_template_views.xml | 4 +++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/odex25_donation/ensan_donation_request/i18n/ar_001.po b/odex25_donation/ensan_donation_request/i18n/ar_001.po index 6e57b6012..5596a7b0d 100644 --- a/odex25_donation/ensan_donation_request/i18n/ar_001.po +++ b/odex25_donation/ensan_donation_request/i18n/ar_001.po @@ -1092,4 +1092,11 @@ msgstr "" #: code:addons/ensan_donation_request/models/donation_recurring.py:0 #, python-format msgid "🔁 Recurring profile resumed. Next donation scheduled on %s." -msgstr "" \ No newline at end of file +msgstr "" + +#. module: ensan_donation_request +#: model:ir.model.fields,field_description:ensan_donation_request.field_product_product__department_ids +#: model:ir.model.fields,field_description:ensan_donation_request.field_product_template__department_ids +msgid "Departments" +msgstr "الفروع" + diff --git a/odex25_donation/ensan_donation_request/models/product_template.py b/odex25_donation/ensan_donation_request/models/product_template.py index 9ce171f58..ea08c4126 100644 --- a/odex25_donation/ensan_donation_request/models/product_template.py +++ b/odex25_donation/ensan_donation_request/models/product_template.py @@ -9,3 +9,11 @@ class ProductTemplate(models.Model): string='Is Recurring Donation Product', help='Enable this if the product can be used in recurring donations.' ) + department_ids = fields.Many2many( + 'hr.department', + 'takaful_sponsorship_department_rel', + 'sponsorship_id', + 'department_id', + string='Departments', + domain=[('is_branch', '=', True)] + ) diff --git a/odex25_donation/ensan_donation_request/views/product_template_views.xml b/odex25_donation/ensan_donation_request/views/product_template_views.xml index b6f62a7cf..63e020fac 100644 --- a/odex25_donation/ensan_donation_request/views/product_template_views.xml +++ b/odex25_donation/ensan_donation_request/views/product_template_views.xml @@ -18,7 +18,9 @@ - + + +