[UPD] odex_benefit

This commit is contained in:
Samir Ladoui 2025-08-18 05:02:13 +01:00
parent 08cd7037bf
commit 886e859f44
7 changed files with 53 additions and 12 deletions

View File

@ -2927,6 +2927,12 @@ msgstr "مواطن"
msgid "City"
msgstr "المحافظة"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_branch_settings__city_id
#: model:ir.model.fields,field_description:odex_benefit.field_res_districts__city_id
msgid "City"
msgstr "المدينة"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_education_status__classroom
#: model:ir.model.fields,field_description:odex_benefit.field_family_member__classroom
@ -5892,6 +5898,11 @@ msgstr "الوحدات السكنية"
msgid "Housing Cat"
msgstr "حالة المنزل"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__housing_city
msgid "Housing City"
msgstr "المدينة"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_generate_reports__housing_financial_type
msgid "Housing Financial Type"
@ -8135,6 +8146,13 @@ msgstr "صباحًا"
msgid "Mother"
msgstr "بيانات الأم"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__mother_dead_city
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__mother_dead_city_id
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__replacement_mother_dead_city_id
msgid "Mother Dead City"
msgstr "مدينة وفاة الأم"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__mother_education_status_ids
msgid "Mother Education Status"
@ -14183,6 +14201,12 @@ msgstr ".مرفق إقرار أفراد الأسرة بالتحويل مطلوب
msgid "Father Dead Certificate is required."
msgstr ".مرفق شهادة وفاة الأب مطلوب"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__father_dead_city
#: model:ir.model.fields,field_description:odex_benefit.field_grant_benefit__father_dead_city_id
msgid "Father Dead City"
msgstr "مدينة وفاة الأب"
#. module: odex_benefit
#: model:ir.model.fields,field_description:odex_benefit.field_res_city__country_city_id
#: model_terms:ir.ui.view,arch_db:odex_benefit.grant_benefit_form

View File

@ -176,7 +176,8 @@ class GrantBenefitProfile(models.Model):
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_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)]")
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
mother_relation = fields.Selection(
@ -200,7 +201,8 @@ class GrantBenefitProfile(models.Model):
mother_is_dead = fields.Boolean(string='Mother Is Dead?',related='mother_marital_conf.is_dead')
mother_dead_country_id = fields.Many2one('res.country', string='Mother Dead Country', tracking=True)
mother_dead_city_id = fields.Many2one('res.country.city', string='Mother Dead City',domain="[('country_id', '=', mother_dead_country_id)]")
mother_dead_res_city_id = fields.Many2one('res.city', string='Mother Dead City',domain="[('country_id', '=', mother_dead_country_id)]")
# mother_dead_res_city_id = fields.Many2one('res.city', string='Mother Dead City',domain="[('country_id', '=', mother_dead_country_id)]")
mother_dead_city = fields.Char(string='Mother Dead City')
mother_location = fields.Selection(
[('with_husband_and_children', _('With Husband And Children')), ('with_children', _('With Children')),
('not_live_with_children', _('Not live with children'))], string='Mother Location')
@ -431,7 +433,8 @@ class GrantBenefitProfile(models.Model):
}
)
zip = fields.Char('Zip', change_default=True, readonly=False, store=True)
res_city_id = fields.Many2one('res.city', domain="[('country_city_id', '=', city_id)]")
# res_city_id = fields.Many2one('res.city', domain="[('country_city_id', '=', city_id)]")
housing_city = fields.Char()
url = fields.Char()
url_html = fields.Html(
sanitize=False,

View File

@ -635,8 +635,9 @@ class ResDistricts(models.Model):
_name = 'res.districts'
name = fields.Char(string="Name")
branch_custom_id = fields.Many2one("branch.settings", string="Branch")
meal_card = fields.Boolean(string='Meal Card')
city_id = fields.Many2one('res.country.city')
branch_custom_id = fields.Many2one("branch.settings", string="Branch", domain="[('city_id', '=', city_id)]")
class VisitsSettings(models.Model):
_name = 'visits.types'
@ -665,6 +666,8 @@ class BranchSettings(models.Model):
('branches', 'Branches'),
('governorates', 'Governorates')],
string='Branch Type')
city_id = fields.Many2one('res.country.city')
class RelationSettings(models.Model):
_name = 'relation.settings'
_description = "Relation Settings"

View File

@ -16,6 +16,7 @@ class City(models.Model):
state_id = fields.Many2one('res.country.state', string='State')
country_id = fields.Many2one('res.country', string='Country', compute='_load_country_id', store=True, readonly=False)
active = fields.Boolean(default=True)
class housing(models.Model):

View File

@ -939,8 +939,8 @@
parent="menu_benefits_config_addresses" action="action_country_state_benefit"/>
<menuitem id="res_city_menu" name="Cities" sequence="2"
parent="menu_benefits_config_addresses" action="res_city_list_action"/>
<menuitem id="city_menu" name="Country Cities" sequence="3"
parent="menu_benefits_config_addresses" action="res_city_action"/>
<!-- <menuitem id="city_menu" name="Country Cities" sequence="3"
parent="menu_benefits_config_addresses" action="res_city_action"/> -->
<menuitem id="res_branch_menu" name="Branch Settings" sequence="4"
parent="menu_benefits_config_addresses" action="res_branch_action"/>
<menuitem id="res_district_menu" name="Districts" sequence="5"

View File

@ -271,6 +271,7 @@
<sheet>
<group>
<field name="name"/>
<field name="city_id"/>
<field name="branch_custom_id"/>
<field name="meal_card"/>
</group>
@ -816,6 +817,7 @@
<field name="arch" type="xml">
<tree string="Districts">
<field name="name"/>
<field name="city_id"/>
<field name="branch_custom_id"/>
<field name="meal_card"/>
</tree>

View File

@ -355,10 +355,11 @@
options="{'no_create': True, 'no_create_edit': True}"
groups="!odex_benefit.group_benefit_manager"/>
<field name="father_dead_city_id" invisible="1"/>
<field name="father_dead_res_city_id"
<!-- <field name="father_dead_res_city_id"
attrs="{'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"
options="{'no_create': True, 'no_create_edit': True}"
groups="!odex_benefit.group_benefit_manager"/>
groups="!odex_benefit.group_benefit_manager"/> -->
<field name="father_dead_city" />
<field name="father_dead_certificate"
attrs="{'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"
widget="many2many_attachment_preview"/>
@ -433,7 +434,9 @@
<field name="mother_is_dead" invisible="1"/>
<field name="mother_dead_country_id"
attrs="{'invisible':[('mother_is_dead','=',False)],'required':[('mother_is_dead','=',True)],'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/>
<field name="mother_dead_res_city_id"
<!-- <field name="mother_dead_res_city_id"
attrs="{'invisible':[('mother_is_dead','=',False)],'required':[('mother_is_dead','=',True)],'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/> -->
<field name="mother_dead_city"
attrs="{'invisible':[('mother_is_dead','=',False)],'required':[('mother_is_dead','=',True)],'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/>
<field name="mother_dead_date"
attrs="{'invisible':[('mother_is_dead','=',False)],'required':[('mother_is_dead','=',True)],'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/>
@ -821,8 +824,9 @@
<field name="city_id" readonly="1" string="City" force_save="1"
options="{'no_create': True, 'no_create_edit': True}"
groups="odex_benefit.group_benefit_manager"/>
<field name="res_city_id" string="Res City"
options="{'no_create': True, 'no_create_edit': True}"/>
<!-- <field name="res_city_id" string="Res City"
options="{'no_create': True, 'no_create_edit': True}"/> -->
<field name="housing_city" />
<field name="district_id" readonly="1" force_save="1"
options="{'no_create': True, 'no_create_edit': True}"
groups="odex_benefit.group_benefit_manager"/>
@ -1302,9 +1306,13 @@
attrs="{'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/>
</xpath>
<xpath expr="//field[@name='father_dead_res_city_id']" position="replace">
<!-- <xpath expr="//field[@name='father_dead_res_city_id']" position="replace">
<field name="father_dead_res_city_id"
attrs="{'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/>
</xpath> -->
<xpath expr="//field[@name='father_dead_city']" position="replace">
<field name="father_dead_city"
attrs="{'readonly':[('state','not in',['draft','new','complete_info','edit_info'])]}"/>
</xpath>
<xpath expr="//field[@name='father_country_id']" position="replace">