Commit d0d36694 by Maria Agustina

avances modulo

1 parent bbbc55a4
......@@ -29,9 +29,12 @@
# always loaded
'data': [
# 'security/ir.model.access.csv',
'security/permisos.xml',
'security/ir.model.access.csv',
'views/vista_maestro.xml',
'views/vista_liquidaciones.xml',
'views/vista_tipocargo.xml',
'views/vista_tareas.xml',
'views/menu.xml',
# 'views/templates.xml',
],
......
......@@ -4,3 +4,4 @@ from . import master
from . import liquidacionestareas
from . import tipocargo
from . import lineatarea
from . import tareas
No preview for this file type
......@@ -55,6 +55,12 @@ class hgt_linea_tarea(models.Model):
compute='obtener_subtotal',
)
state = fields.Selection(
related='tarea.state',
readonly=True,
store=True
)
def obtener_subtotal(self):
return 0
......
......@@ -4,3 +4,12 @@ from odoo import models, fields, api
class hgt_tarea(models.Model):
_inherit = 'hgt.tarea'
horas_liquidadas = fields.Float(
string='Horas Liquidadas',
)
liquidado = fields.Boolean(
string=u'Liquidado?',
)
\ No newline at end of file
......@@ -6,7 +6,7 @@ class hgt_tipo_cargo(models.Model):
_name = 'hgt.tipo_cargo'
tipo = fields.Char(
string='field_name',
string='Tipo',
)
monto = fields.Float(
......
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_my_module_my_module,my_module.my_module,model_my_module_my_module,,1,0,0,0
\ No newline at end of file
access_hgt_linea_tarea,hgt_linea_tarea,model_hgt_linea_tarea,group_hgt_liquidaciones_liquidador,1,1,1,1
access_hgt_masterliquidaciones,hgt_hgt_masterliquidaciones,model_hgt_masterliquidaciones,group_hgt_liquidaciones_liquidador,1,1,1,1
access_hgt_tipo_cargo,hgt_tipo_cargo,model_hgt_tipo_cargo,group_hgt_liquidaciones_liquidador,1,1,1,1
access_hgt_liquidacionestareas,hgt_hgt_liquidacionestareas,model_hgt_liquidacionestareas,group_hgt_liquidaciones_liquidador,1,1,1,1
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="category_hgt_liquidaciones" model="ir.module.category">
<field name="name">Liquidaciones</field>
<field name="description">Liquidaciones</field>
</record>
<record id="group_hgt_liquidaciones_liquidador" model="res.groups">
<field name="name">Liquidador</field>
<field name="category_id" ref="category_hgt_liquidaciones"/>
</record>
</data>
</odoo>
......@@ -7,5 +7,7 @@
<menuitem name="Liquidación de Tareas" id="finanzas_personal_liquidaciones" parent="finanzas_personal" action="action_liquidacionestareas_act_window"/>
<menuitem name="Tipos de Cargo" id="finanzas_personal_tipocargo" parent="finanzas_personal" action="action_tipocargo_act_window"/>
</data>
</odoo>
......@@ -45,7 +45,7 @@
</header>
<sheet>
<group col="2">
<field colspan="2" name="nombre" />
<h2>Liquidación <field colspan="2" nolabel="1" name="nombre" /></h2>
</group>
<group col="2">
<field colspan="2" name="usuario" />
......@@ -61,9 +61,8 @@
<group col="4" string="Tareas">
<field nolabel="1" name="lineas_tareas">
<tree>
<field name="state" />
<field name="name" />
<field name="inicio" />
<field name="cierre" />
<field name="minutos_reales" sum='1'/>
<field name="tipo_cargo" />
<field name="subtotal" sum='1' />
......
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="0">
<!-- primary|extension Inherited .:Form:. view for "model" -->
<record id="hgt_tarea_form_view_inherited" model="ir.ui.view">
<field name="name">tareas.form.view.inherited</field>
<field name="model">hgt.tarea</field>
<!-- Please veryfiy, that the following inherited view really sticks to the naming convention. -->
<field name="inherit_id" ref="hgt_pm.hgt_tarea_form_view" />
<field name="type">form</field>
<field name="mode">extension</field>
<field name="priority" eval="16" />
<field name="active" eval="True" />
<field name="arch" type="xml">
<xpath expr="//form/sheet/group[5]" position="after">
<h2>Liquidación</h2>
<group col="4">
<field name="horas_liquidadas"/>
<field name="liquidado" />
</group>
</xpath>
</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="0">
<record id="action_tipocargo_act_window" model="ir.actions.act_window">
<field name="type">ir.actions.act_window</field>
<field name="name">Tipo de Cargo</field>
<field name="res_model">hgt.tipo_cargo</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
<field name="target">current</field>
</record>
<record id="view_tipocargo_tree" model="ir.ui.view">
<field name="name">>Tipo de Cargo</field>
<field name="model">hgt.tipo_cargo</field>
<field name="type">tree</field>
<field name="mode">primary</field>
<field name="priority" eval="16" />
<field name="active" eval="True" />
<field name="arch" type="xml">
<tree>
<field name="tipo" />
<field name="monto" />
<field name="desde" />
<field name="hasta" />
</tree>
</field>
</record>
<record id="view_tipocargo_form" model="ir.ui.view">
<field name="name">>Tipo de Cargo</field>
<field name="model">hgt.tipo_cargo</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<group col="4">
<field colspan="2" name="tipo" />
<field colspan="2" name="monto" />
</group>
<group col="4">
<field colspan="2" name="desde" />
<field colspan="2" name="hasta" />
</group>
<group col="2" string="Ejecutores">
<field colspan="2" nolabel="1" name="ejecutores" widget="many2many_tags"/>
</group>
</form>
</field>
</record>
<record id="view_tipocargo_search" model="ir.ui.view">
<field name="name">Tipo de Cargo</field>
<field name="model">hgt.tipo_cargo</field>
<field name="arch" type="xml">
<search>
<field name="tipo" />
<field name="monto" />
<field name="desde" />
<field name="hasta" />
</search>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!