Commit b9089b72 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

se trabajan en los pages informacion familiar ,legal y mascotas

parent f09d5d0e
......@@ -2,14 +2,19 @@
'name': 'Qv_empleados',
'description': 'se crea modulo como trabajo introspeccion del semillero de desarrollo de odoo',
'summary': 'Unete al mundo de odoo',
'author': 'Sebastian cASTRO',
'author': 'Sebastian castro',
'website': 'www.qvision.com.co',
'license': 'LGPL-3',
'depends': [
'base','hr'
'base','hr','resource'
],
'data': [
'views/semillero_empleado.xml'
'views/semillero_empleado.xml',
'views/semillero_legal.xml',
'views/semillero_info_familiar.xml',
'views/semillero_mascotas.xml'
],
'auto_install': False,
......
......@@ -2,6 +2,7 @@ from odoo import models,fields
class QVEmpleados(models.Model):
_inherit = 'hr.employee'
_description = 'Empleado Models'
grupo_sanguineo = fields.Selection([
('OP','O+'),
......@@ -20,16 +21,7 @@ class QVEmpleados(models.Model):
],'Tipo de Documento ')
ciudad = fields.Selection([
('bog', 'Bogotá'),
('cal', 'Cali'),
('med', 'Medellín'),
('bar', 'Barranquilla'),
('car', 'Cartagena')
],'Ciudad de Residencia')
genero = fields.Selection([
('No binario','No binario'),
('Femenino','Femenino'),
......@@ -65,7 +57,16 @@ class QVEmpleados(models.Model):
hijos = fields.Selection([
('No','No'),
('Si','Si')
],'Hijos')
],'Hijos')
Mascotas=fields.Selection([
('1','1'),
('2','2'),
('3','3'),
('4','4'),
('5','5')
],'Número de Mascotas' )
tipo_via = fields.Char(string='Tipo De Via')
......@@ -86,54 +87,151 @@ class QVEmpleados(models.Model):
fondo_pensiones = fields.Char(string='Fondo de Pensiones')
eps = fields.Char(string='EPS')
apellidos = fields.Char(string='Apellidos')
telefono_personal=fields.Char(string='Telefono Personal')
email_personal=fields.Char(string='Correo Personal')
primer_nombre=fields.Char(string='Primer Nombre')
segundo_nombre=fields.Char(string='Siguientes Nombres')
primer_apellido=fields.Char(string='Primer Apellido')
segundo_apellido=fields.Char(string='Segundo Apellido')
departamento_empleado_ids = fields.Many2one('departamento.empleado',string='Departamento de Residencia')
ciudad_empleado_ids = fields.Many2one('ciudad.empleado',string='Ciudad de Residencia')
legalInfo_ids = fields.One2many('informacion.legal','empleado_legal_ids', string='Descripcion')
inforFami_ids =fields.One2many('informacion.familiar','inforfami_ids',string='Informacion Familiar')
inforMascotas_ids=fields.One2many('informacion.mascota','inforMas_ids',string='Mascotas')
departamento_empleado_ids = fields.One2many('departamento.empleado','empleado_id',string='Departamento de Residencia')
class DepartamentoEmpleado(models.Model):
_name='departamento.empleado'
_description = 'Departamentos Models'
_rec_name = 'departamento'
departamento=fields.Text(string='departamento')
class CiudadEmpleado(models.Model):
_name='ciudad.empleado'
_description = 'Ciudad Models'
_rec_name ='ciudad'
Departamento=fields.Selection([
('ama','Amazonas'),
('ant','Antioquia'),
('arau','Arauca'),
('atla','Atlantico'),
('bol','Bolivar'),
('boy', 'Boyaca'),
('cald','Caldas'),
('caq','Caqueta'),
('cas','Casanare'),
('cau','Cauca'),
('ces','Cesar'),
('cho','Choco'),
('cor','Cordoba'),
('cun','Cundinamarca'),
('gua','Guainia'),
('guav','Guaviare'),
('hui','Huila'),
('la gua','La Guajira'),
('mag','Magdalena'),
('met','Meta'),
('nar','Nariño'),
('nor','Norte de Santander'),
('put','Putumayo'),
('qui','Quindio'),
('risa','Risaralda'),
('san','San Andres y Providencia'),
('sant','Santander'),
('suc','Sucre'),
('tol','Tolima'),
('vall','Valle del Cauca'),
('vau','Vaupes'),
('vich','Vichada')
ciudad=fields.Text(string='ciudad')
class LegalInfo(models.Model):
_name='informacion.legal'
_description='Legal Models'
lgl_desc=fields.Text(string='Descripcion')
lgl_tema= fields.Selection([
('ant pen','Antecedentes Penales'),
('Benef tr','Beneficios Tributarios'),
('Cert act asig','Certificados De Activos Asignados'),
('Cert sft asig','Certificados De software Asignados'),
('Cert afilia','Certificado De Afiliacion'),
('Clau de conf ','Clausula De Confidencialidad'),
('contr tra','Contrato De Confidencialidad'),
('Demanda de Alimentos', 'Demanda De Alimentos'),
('Embargo Sobre Salario','Embargo Sobre Salario'),
('Examenes ing','Examenes De Ingreso'),
('Examenes ret','Examenes De Retiro'),
('Exm per','Examenes Periodicos'),
('Otro si','Otro si al contrato de trabajo'),
('Protecc','Proteccion De Datos Personales '),
('Referen','Referenciacion')
],'Tema Legal')
pdf = fields.Binary(string='Certificado(PDF)')
empleado_legal_ids=fields.Many2one('hr.employee',string='Empleado')
class InforFami(models.Model):
_name='informacion.familiar'
_description='Informacion familiar Models'
documento_tipo = fields.Selection([
('CC','Cédula de Ciudadania'),
('TI','Tarjeta de Identidad'),
('TE','Tarjeta de Extranjeria'),
('NIT','NIT'),
('Pasaporte','Pasaporte'),
('DIE','Documento de Identificacion del Extranjero'),
('SIE','Sin Identificacion del Extrajero o para Uso de la DIAN')
],string='Departamento de Residencia')
],'Tipo de Documento ')
empleado_id= fields.Many2one('hr.employee',string='Empleado')
relacion=fields.Selection([
('pad','Padre'),
('hij','Hijo/a'),
('cony','Conyugue o Compañero Permanente'),
('hermf','Hermano Huerfano')
])
hijos = fields.Selection([
('No','No'),
('Si','Si')
],'Tiene Hijos/s')
copia_doc=fields.Binary(string='Copia de Identificaciòn')
num_doc=fields.Char(string='Numero de Documento')
nombres=fields.Char(string='Nombres')
apellidos=fields.Char(string='Apellidos')
telefono=fields.Char(string='Telefono')
fecha=fields.Date(string='Fecha Nacimiento')
movil=fields.Char(string='Telefono(Mobile)')
inforfami_ids=fields.Many2one('hr.employee',string='Empleado')
class MascoEmpleado(models.Model):
_name='informacion.mascota'
_description='Informacion Mascotas Models'
numeroMas=fields.Selection([
('1','1'),
('2','2'),
('3','3'),
('4','4'),
('5','5')
],'Número de Mascotas' )
tipo_mas=fields.Selection([
('perro','Perro'),
('gato','Gato'),
('tortuga','Tortuga')
], 'Tipo de Mascota')
nombre_mascota=fields.Char(string='Nombre de la mascota')
inforMas_ids=fields.Many2one('hr.employee',string='Empleado')
class QVUsuarios(models.Model):
_inherit='resource.resource'
_description='Informacion de usuarios'
segundo_nombre=fields.Char(string='Siguientes Nombres')
primer_apellido=fields.Char(string='Primer Apellido')
segundo_apellido=fields.Char(string='Segundo Apellido')
class InteEmpleado(models.Model):
_name='informacion.intereses'
_description='intereses del empleado'
inter_personales=fields.Char(string='Intereses Personales')
interDescrip=fields.Char(string='Descripción')
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<data>
<record id="grupos_modulo_nuevo" model="ir.module.category">
<field name="name">Empleados Semilleros</field>
<field name="sequence" eval="100" />
<field name="description">Accesos al modulo de Empleados</field>
</record>
<record id="group_user" model="res.groups">
<field name="name">Usuario</field>
<field name="category_id" ref="qv_semillero_empleados.grupos_modulo_nuevo"/>
</record>
<record id="group_manager" model="res.groups">
<field name="name">Administrador</field>
<field name="category_id" ref="qv_semillero_empleado.grupos_modulo_nuevo"/>
</record>
<!-- Record rules -->
<record id="record_rule_notif_user" model="ir.rule">
<field name="name">Solo ver creadas</field>
<field name="model_id" ref="qv_semillero_empleado.model_semillero_empleado"/>
<field name="groups" eval="[(4, ref('qv_semillero_empleado.group_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="domain_force">[('create_uid', '=', user.id)]</field>
</record>
<record id="record_rule_notif_admin" model="ir.rule">
<field name="name">Ver todo</field>
<field name="model_id" ref="qv_semillero_empleado.model_semillero_empleado"/>
<field name="groups" eval="[(4, ref('qv_semillero_empleado.group_manager'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
</data>
</odoo>
\ No newline at end of file
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_qv_semilleros_emple_user,semilleros.empleados.user,model_semilleros_empleados,group_user,1,0,0,0
access_qv_semilleros_emple_manager,semilleros.empleados.manager,model_semilleros_empleados,group_manager,1,1,1,1
......@@ -3,15 +3,21 @@
<data>
<record id="qv_empleados_semillero_1" model="ir.ui.view">
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='private_email']" position="before">
<field name="tipo_documento"></field>
<field name="tipo_documento"></field>
</xpath>
<xpath expr="//field[@name='tipo_documento']" position="after">
<field name="numero_documento_identidad"></field>
</xpath>
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="numero_documento_identidad"></field>
</xpath>
<xpath expr="//field[@name='numero_documento_identidad']" position="after">
<field name="email_personal"></field>
</xpath>
<xpath expr="//field[@name='email_personal']" position="after">
<field name="telefono_personal"></field>
</xpath>
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="eps"></field>
</xpath>
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
......@@ -20,41 +26,78 @@
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="genero"></field>
</xpath>
</field>
</record>
</record>
<record id="qv_empleados_semillero_2" model="ir.ui.view">
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="arch" type="xml">
<xpath expr="//notebook/page[@name='personal_information']/group/group[2]" position="attributes">
<attribute name ="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[4]" position="attributes">
<attribute name ="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[6]" position="attributes">
<attribute name ="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[7]" position="attributes">
<attribute name ="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='address_home_id']" position="attributes">
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="departamento_empleado_ids" />
</xpath>
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="ciudad_empleado_ids" />
</xpath>
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="grupo_sanguineo" />
</xpath>
</field>
</record>
<record id="qv_empleados_semillero_3" model="ir.ui.view">
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="arch" type="xml">
<xpath expr="//notebook/page[@name='personal_information']/group/group[2]"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[4]"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[6]"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='bank_account_id']" position="attributes">
<xpath expr="//notebook/page[@name='personal_information']/group/group[7]"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/div[@class='o_row']" position="attributes">
</xpath>
<xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='address_home_id']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='phone']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/label[@for='km_home_work']" position="attributes">
</xpath>
<xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='bank_account_id']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/div[@class='o_row']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/label[@for='km_home_work']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//h2[field/@name='job_title']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='private_email']" position="attributes">
<attribute name="string">Correo Personal</attribute>
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='phone']" position="attributes">
<attribute name="string">Telefono Personal</attribute>
......@@ -65,17 +108,26 @@
<xpath expr="//field[@name='work_phone']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='category_ids']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='coach_id']" position="attributes">
<attribute name="string">Jefe Inmediato</attribute>
</xpath>
<xpath expr="//field[@name='emergency_contact']" position="after">
<field name="parentesco"></field>
</xpath>
<xpath expr="//form/sheet/notebook/page[@name='personal_information']/group/group[5]" position="attributes">
<attribute name="string" >Contacto de Emergencia </attribute>
</xpath>
<xpath expr="//page[@name='personal_information']/group[position()=1]/group[position()=1]" position="after">
<group string="Direccion" col="2">
<field name="parentesco"></field>
</xpath>
<xpath
expr="//form/sheet/notebook/page[@name='personal_information']/group/group[5]"
position="attributes">
<attribute name="string">Contacto de Emergencia </attribute>
</xpath>
<xpath
expr="//page[@name='personal_information']/group[position()=1]/group[position()=1]"
position="after">
<group string="Direccion" col="2">
<field name="tipo_via"></field>
<field name="nombre_via"></field>
<field name="numero_via"></field>
......@@ -84,69 +136,35 @@
<field name="numero_casa"></field>
<field name="complemento"></field>
<field name="barrio"></field>
<field name="localidad"></field>
<field name="localidad"></field>
</group>
</xpath>
<xpath expr="//page[@name='personal_information']/group[last()]" position="inside">
<group string="Redes Sociales">
<field name="linkedin"/>
<field name="facebook"/>
<field name="instagram"/>
<field name="skype"/>
<field name="twitter"/>
<field name="linkedin" />
<field name="facebook" />
<field name="instagram" />
<field name="skype" />
<field name="twitter" />
</group>
</xpath>
<!-- Heredamos las páginas existentes -->
<xpath expr="//notebook" position="inside">
<page string="Currículum Vitae">
<group string="Habilidades"/>
</page>
<page string="Insignias recibidas"/>
<page string="Legal"/>
<page string="Informacion Familiar">
<form>
<sheet>
<group string='Hijos'>
<field name="hijos"></field>
</group>
<group string='Informacion Familiar'>
<field name="tipo_documento"/>
<field name="numero_documento_identidad"/>
<field name="name"/>
<field name="apellidos"/>
<field name="parentesco"/>
<field name="work_phone"/>
<field name="birthday"/>
<field name="mobile_phone" />
</group>
</sheet>
</form>
</page>
<page string="Intereses"/>
<page string="Mascotas"/>
</xpath>
<!-- Ordenamos las páginas alfabéticamente por nombre -->
<xpath expr="//notebook/page" position="after">
<xpath expr="//notebook/page">
<attribute name="name">name</attribute>
</xpath>
<!-- Heredamos las páginas existentes -->
<xpath expr="//notebook" position="inside">
<page string="Currículum Vitae">
<group string="Habilidades" />
</page>
<page string="Insignias recibidas" />
<page string="Intereses" />
</xpath>
</xpath>
</field>
</record>
</record>
</data>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="qv_empleados_semillero_5" model="ir.ui.view">
<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 string="Informacion Familiar" >
<group string='Hijos'>
<field name="hijos"/>
</group>
<group string="Informacion Familiar"/>
<field name="inforFami_ids">
<tree editable="bottom">
<field name="documento_tipo"/>
<field name="num_doc"/>
<field name="nombres"/>
<field name="apellidos"/>
<field name="relacion"/>
<field name="telefono"/>
<field name="fecha"/>
<field name="copia_doc"/>
<field name="movil"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="qv_empleados_semillero_4" model="ir.ui.view">
<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 string="Legal">
<field name="legalInfo_ids">
<tree editable="bottom">
<field name="lgl_tema"/>
<field name="lgl_desc"/>
<field name="pdf" />
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="qv_empleados_semillero_6" model="ir.ui.view">
<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 string="Mascotas">
<group string="Numero de Mascotas">
<field name="Mascotas" />
</group>
<group string="Información de Mascotas"/>
<field name="inforMascotas_ids">
<tree editable="bottom">
<field name="tipo_mas" />
<field name="nombre_mascota" />
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment