diff --git a/odex25_ensan/odex_benefit/__manifest__.py b/odex25_ensan/odex_benefit/__manifest__.py
index 408630225..b132289a9 100644
--- a/odex25_ensan/odex_benefit/__manifest__.py
+++ b/odex25_ensan/odex_benefit/__manifest__.py
@@ -49,6 +49,7 @@
'views/benefit_config_view.xml',
'views/generate_reports.xml',
'views/service_refuse_reason.xml',
+ 'views/res_city.xml',
'views/res_country.xml',
'templates/benefit_email.xml',
diff --git a/odex25_ensan/odex_benefit/i18n/ar_001.po b/odex25_ensan/odex_benefit/i18n/ar_001.po
index e0a259b91..f2ce4ce86 100644
--- a/odex25_ensan/odex_benefit/i18n/ar_001.po
+++ b/odex25_ensan/odex_benefit/i18n/ar_001.po
@@ -8729,6 +8729,12 @@ msgstr "البريد الإلكتروني العادي"
msgid "Not Benefit"
msgstr "غير مستفيد"
+#. module: odex_benefit
+#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__father_dead_res_city_id_not_defined
+#: model:ir.model.fields,field_description:odex_benefit.field_res_city__not_defined
+msgid "Not Defined"
+msgstr "غير محدد"
+
#. module: odex_benefit
#: code:addons/odex_benefit/controllers/benefit.py:0
#, python-format
diff --git a/odex25_ensan/odex_benefit/models/benefit.py b/odex25_ensan/odex_benefit/models/benefit.py
index fad3ef5dc..7ec486afa 100644
--- a/odex25_ensan/odex_benefit/models/benefit.py
+++ b/odex25_ensan/odex_benefit/models/benefit.py
@@ -179,8 +179,10 @@ class GrantBenefitProfile(models.Model):
father_dead_reason = fields.Char(string='Dead Reason', required=False)
father_dead_date = fields.Date(string="Father Dead Date")
father_dead_country_id = fields.Many2one('res.country', string='Father Dead Country', tracking=True)
+ father_dead_country_id_code = fields.Char(related='father_dead_country_id.code')
father_dead_city_id = fields.Many2one('res.country.city', string='Father Dead City',domain="[('country_id', '=', father_dead_country_id)]")
- father_dead_res_city_id = fields.Many2one('res.city', string='Father Dead City',domain="[('country_id', '=', father_dead_country_id)]")
+ father_dead_res_city_id = fields.Many2one('res.city', string='Father Dead City',domain="['|', ('country_id', '=', father_dead_country_id), ('country_id', '=', False)]")
+ father_dead_res_city_id_not_defined = fields.Boolean(related="father_dead_res_city_id.not_defined")
father_dead_city = fields.Char(string='Father Dead City')
father_dead_certificate = fields.Many2many('ir.attachment', 'rel_father_dead_attachment','benefit_id','attachment_id',string='Father Dead Certificate')
# Mother's case and her data # Birth Date # Address # dead data
diff --git a/odex25_ensan/odex_benefit/models/res_city.py b/odex25_ensan/odex_benefit/models/res_city.py
index 731871eb2..a135549a8 100644
--- a/odex25_ensan/odex_benefit/models/res_city.py
+++ b/odex25_ensan/odex_benefit/models/res_city.py
@@ -10,3 +10,5 @@ class ResCity(models.Model):
name = fields.Char(required=True)
country_id = fields.Many2one('res.country')
country_city_id = fields.Many2one('res.country.city', domain="[('country_id', '=', country_id)]")
+ not_defined = fields.Boolean(default=False)
+ active = fields.Boolean(default=True)
diff --git a/odex25_ensan/odex_benefit/views/actions_and_menus.xml b/odex25_ensan/odex_benefit/views/actions_and_menus.xml
index 7a44db74e..000143d51 100644
--- a/odex25_ensan/odex_benefit/views/actions_and_menus.xml
+++ b/odex25_ensan/odex_benefit/views/actions_and_menus.xml
@@ -719,6 +719,11 @@
Country Cities
res.city
tree,form
+
Create New City
@@ -901,8 +906,8 @@
parent="menu_benefits_config_addresses" action="action_country_state_benefit"/>
-
+
-
-
+
+
+
+
@@ -1333,8 +1342,13 @@
attrs="{'readonly':[('state','not in',['draft','new','complete_info'])]}"/>
-->
-
+
diff --git a/odex25_ensan/odex_benefit/views/res_city.xml b/odex25_ensan/odex_benefit/views/res_city.xml
index 875922233..395c370f8 100644
--- a/odex25_ensan/odex_benefit/views/res_city.xml
+++ b/odex25_ensan/odex_benefit/views/res_city.xml
@@ -11,8 +11,9 @@
+
-
+
@@ -23,12 +24,13 @@
-
+
inherit.res.city.form
res.city
+