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 @@ ...@@ -2,14 +2,19 @@
'name': 'Qv_empleados', 'name': 'Qv_empleados',
'description': 'se crea modulo como trabajo introspeccion del semillero de desarrollo de odoo', 'description': 'se crea modulo como trabajo introspeccion del semillero de desarrollo de odoo',
'summary': 'Unete al mundo de odoo', 'summary': 'Unete al mundo de odoo',
'author': 'Sebastian cASTRO', 'author': 'Sebastian castro',
'website': 'www.qvision.com.co', 'website': 'www.qvision.com.co',
'license': 'LGPL-3', 'license': 'LGPL-3',
'depends': [ 'depends': [
'base','hr' 'base','hr','resource'
], ],
'data': [ '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, 'auto_install': False,
......
...@@ -2,6 +2,7 @@ from odoo import models,fields ...@@ -2,6 +2,7 @@ from odoo import models,fields
class QVEmpleados(models.Model): class QVEmpleados(models.Model):
_inherit = 'hr.employee' _inherit = 'hr.employee'
_description = 'Empleado Models'
grupo_sanguineo = fields.Selection([ grupo_sanguineo = fields.Selection([
('OP','O+'), ('OP','O+'),
...@@ -21,15 +22,6 @@ class QVEmpleados(models.Model): ...@@ -21,15 +22,6 @@ class QVEmpleados(models.Model):
],'Tipo de Documento ') ],'Tipo de Documento ')
ciudad = fields.Selection([
('bog', 'Bogotá'),
('cal', 'Cali'),
('med', 'Medellín'),
('bar', 'Barranquilla'),
('car', 'Cartagena')
],'Ciudad de Residencia')
genero = fields.Selection([ genero = fields.Selection([
('No binario','No binario'), ('No binario','No binario'),
('Femenino','Femenino'), ('Femenino','Femenino'),
...@@ -67,6 +59,15 @@ class QVEmpleados(models.Model): ...@@ -67,6 +59,15 @@ class QVEmpleados(models.Model):
('Si','Si') ('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') tipo_via = fields.Char(string='Tipo De Via')
nombre_via = fields.Char(string='Nombre/Numero Via') nombre_via = fields.Char(string='Nombre/Numero Via')
...@@ -86,54 +87,151 @@ class QVEmpleados(models.Model): ...@@ -86,54 +87,151 @@ class QVEmpleados(models.Model):
fondo_pensiones = fields.Char(string='Fondo de Pensiones') fondo_pensiones = fields.Char(string='Fondo de Pensiones')
eps = fields.Char(string='EPS') eps = fields.Char(string='EPS')
apellidos = fields.Char(string='Apellidos') 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.One2many('departamento.empleado','empleado_id',string='Departamento de Residencia') 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')
class DepartamentoEmpleado(models.Model): class DepartamentoEmpleado(models.Model):
_name='departamento.empleado' _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'
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')
],'Tipo de Documento ')
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')
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')
],string='Departamento de Residencia')
empleado_id= fields.Many2one('hr.employee',string='Empleado')
\ 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,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<data> <data>
<record id="qv_empleados_semillero_1" model="ir.ui.view"> <record id="qv_empleados_semillero_1" model="ir.ui.view">
<field name="model">hr.employee</field> <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"> <field name="arch" type="xml">
<xpath expr="//field[@name='private_email']" position="before"> <xpath expr="//field[@name='private_email']" position="before">
<field name="tipo_documento"></field> <field name="tipo_documento"></field>
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
<xpath expr="//field[@name='tipo_documento']" position="after"> <xpath expr="//field[@name='tipo_documento']" position="after">
<field name="numero_documento_identidad"></field> <field name="numero_documento_identidad"></field>
</xpath> </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"> <xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="eps"></field> <field name="eps"></field>
</xpath> </xpath>
...@@ -20,41 +26,78 @@ ...@@ -20,41 +26,78 @@
<xpath expr="//page[@name='personal_information']/group/group[1]" position="inside"> <xpath expr="//page[@name='personal_information']/group/group[1]" position="inside">
<field name="genero"></field> <field name="genero"></field>
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="qv_empleados_semillero_2" model="ir.ui.view"> <record id="qv_empleados_semillero_2" model="ir.ui.view">
<field name="model">hr.employee</field> <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="//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"> <field name="arch" type="xml">
<xpath expr="//notebook/page[@name='personal_information']/group/group[2]" position="attributes"> <xpath expr="//notebook/page[@name='personal_information']/group/group[2]"
<attribute name ="invisible">1</attribute> position="attributes">
<attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[4]" position="attributes"> <xpath expr="//notebook/page[@name='personal_information']/group/group[4]"
<attribute name ="invisible">1</attribute> 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>
<xpath expr="//notebook/page[@name='personal_information']/group/group[6]" position="attributes"> <xpath expr="//notebook/page[@name='personal_information']/group/group[7]"
<attribute name ="invisible">1</attribute> position="attributes">
<attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[7]" position="attributes"> <xpath
<attribute name ="invisible">1</attribute> expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='address_home_id']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='address_home_id']" position="attributes">
<xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/field[@name='phone']"
position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </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[1]/field[@name='bank_account_id']"
position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/div[@class='o_row']" position="attributes"> <xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/div[@class='o_row']"
position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//notebook/page[@name='personal_information']/group/group[1]/label[@for='km_home_work']" position="attributes"> <xpath
expr="//notebook/page[@name='personal_information']/group/group[1]/label[@for='km_home_work']"
position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//h2[field/@name='job_title']" position="attributes"> <xpath expr="//h2[field/@name='job_title']" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='private_email']" position="attributes"> <xpath expr="//field[@name='private_email']" position="attributes">
<attribute name="string">Correo Personal</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='phone']" position="attributes"> <xpath expr="//field[@name='phone']" position="attributes">
<attribute name="string">Telefono Personal</attribute> <attribute name="string">Telefono Personal</attribute>
...@@ -65,16 +108,25 @@ ...@@ -65,16 +108,25 @@
<xpath expr="//field[@name='work_phone']" position="attributes"> <xpath expr="//field[@name='work_phone']" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='category_ids']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='coach_id']" position="attributes"> <xpath expr="//field[@name='coach_id']" position="attributes">
<attribute name="string">Jefe Inmediato</attribute> <attribute name="string">Jefe Inmediato</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='emergency_contact']" position="after"> <xpath expr="//field[@name='emergency_contact']" position="after">
<field name="parentesco"></field> <field name="parentesco"></field>
</xpath> </xpath>
<xpath expr="//form/sheet/notebook/page[@name='personal_information']/group/group[5]" position="attributes"> <xpath
<attribute name="string" >Contacto de Emergencia </attribute> expr="//form/sheet/notebook/page[@name='personal_information']/group/group[5]"
position="attributes">
<attribute name="string">Contacto de Emergencia </attribute>
</xpath> </xpath>
<xpath expr="//page[@name='personal_information']/group[position()=1]/group[position()=1]" position="after"> <xpath
expr="//page[@name='personal_information']/group[position()=1]/group[position()=1]"
position="after">
<group string="Direccion" col="2"> <group string="Direccion" col="2">
<field name="tipo_via"></field> <field name="tipo_via"></field>
<field name="nombre_via"></field> <field name="nombre_via"></field>
...@@ -89,49 +141,20 @@ ...@@ -89,49 +141,20 @@
</xpath> </xpath>
<xpath expr="//page[@name='personal_information']/group[last()]" position="inside"> <xpath expr="//page[@name='personal_information']/group[last()]" position="inside">
<group string="Redes Sociales"> <group string="Redes Sociales">
<field name="linkedin"/> <field name="linkedin" />
<field name="facebook"/> <field name="facebook" />
<field name="instagram"/> <field name="instagram" />
<field name="skype"/> <field name="skype" />
<field name="twitter"/> <field name="twitter" />
</group> </group>
</xpath> </xpath>
<!-- Heredamos las páginas existentes --> <!-- Heredamos las páginas existentes -->
<xpath expr="//notebook" position="inside"> <xpath expr="//notebook" position="inside">
<page string="Currículum Vitae"> <page string="Currículum Vitae">
<group string="Habilidades"/> <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>
<page string="Intereses"/> <page string="Insignias recibidas" />
<page string="Mascotas"/> <page string="Intereses" />
</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>
</xpath> </xpath>
...@@ -142,11 +165,6 @@ ...@@ -142,11 +165,6 @@
</data> </data>
</odoo> </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