Skip to content

Commit

Permalink
[REV] Revision
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevhe18 committed Mar 14, 2024
1 parent 0739fbd commit 0008679
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 47 deletions.
71 changes: 38 additions & 33 deletions ssi_hr_employee_personal_from_work_address/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,63 @@
class HrEmployee(models.Model):
_inherit = "hr.employee"

blood_type = fields.Selection(
string="Blood Type (ABO)",
related="address_home_id.blood_type",
readonly=False,
)
blood_type_rhesus = fields.Selection(
string="Blood Type (Rh)",
related="address_home_id.blood_type_rhesus",
readonly=False,
)
religion_id = fields.Many2one(
string="Religion",
comodel_name="res_partner_religion",
related="address_home_id.religion_id",
readonly=False,
)
ethnicity_id = fields.Many2one(
string="Ethnicity",
comodel_name="res_partner_ethnicity",
related="address_home_id.ethnicity_id",
readonly=False,
)
nationality_id = fields.Many2one(
string="Nationality",
country_id = fields.Many2one(
comodel_name="res.country",
related="address_home_id.nationality_id",
readonly=False,
store=True,
)
gender = fields.Selection(
string="Gender",
related="address_home_id.gender",
readonly=False,
store=True,
)
birthdate_date = fields.Date(
string="Birthdate",
birthday = fields.Date(
related="address_home_id.birthdate_date",
readonly=False,
store=True,
)
birth_city = fields.Char(
string="Birth city",
place_of_birth = fields.Char(
related="address_home_id.birth_city",
readonly=False,
store=True,
)
country_of_birth = fields.Many2one(
comodel_name="res.country",
related="address_home_id.birth_country_id",
readonly=False,
store=True,
)
birth_state_id = fields.Many2one(
string="Birth state",
comodel_name="res.country.state",
related="address_home_id.birth_state_id",
readonly=False,
store=True,
)
birth_country_id = fields.Many2one(
string="Birth country",
comodel_name="res.country",
related="address_home_id.birth_country_id",
blood_type = fields.Selection(
string="Blood Type (ABO)",
related="address_home_id.blood_type",
readonly=False,
store=True,
)
blood_type_rhesus = fields.Selection(
string="Blood Type (Rh)",
related="address_home_id.blood_type_rhesus",
readonly=False,
store=True,
)
religion_id = fields.Many2one(
string="Religion",
comodel_name="res_partner_religion",
related="address_home_id.religion_id",
readonly=False,
store=True,
)
ethnicity_id = fields.Many2one(
string="Ethnicity",
comodel_name="res_partner_ethnicity",
related="address_home_id.ethnicity_id",
readonly=False,
store=True,
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page name="personal_information" string="Personal Information">
<group name="personal_information">
<field name="nationality_id" string="Nationality (Country)" />
<field name="gender" />
<field name="birthdate_date" string="Date of Birth" />
<field name="birth_city" string="Place of Birth" />
<field name="birth_country_id" string="Country of Birth" />
<field name="religion_id" />
<field name="ethnicity_id" />
<field name="blood_type" />
<field name="blood_type_rhesus" />
</group>
</page>
<xpath expr="//field[@name='country_of_birth']" position="after">
<field name="birth_state_id" />
<field name="ethnicity_id" />
<field name="religion_id" />
<field name="blood_type" />
<field name="blood_type_rhesus" />
</xpath>
</field>
</record>
Expand Down

0 comments on commit 0008679

Please sign in to comment.