incidencia_view.xml 5.14 KB
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <data noupdate="0">

        <record id="action_soporteincidencias_act_window" model="ir.actions.act_window">
            <field name="type">ir.actions.act_window</field>
            <field name="name">Incidencias</field>
            <field name="res_model">hgt.soporte_incidencia</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[["si_responsable","=",uid]]</field>
            <field name="view_type">form</field>
            <field name="target">current</field>
        </record>

        <record id="action_soporteincidenciasconfig_act_window" model="ir.actions.act_window">
            <field name="type">ir.actions.act_window</field>
            <field name="name">Incidencias</field>
            <field name="res_model">hgt.soporte_incidencia</field>
            <field name="view_mode">tree,form</field>
            <field name="view_type">form</field>
            <field name="target">current</field>
        </record>
        
        <record id="view_soporteincidencias_tree" model="ir.ui.view">
            <field name="name">Incidencias</field>
            <field name="model">hgt.soporte_incidencia</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="si_name" nolabel="1"/>                    
                    <!-- <field name="si_ost_asunto" /> -->
                    <field name="si_descripcion"/>
                    <field name="estado"/>
                    <field name="si_fecha"/>
                    <!--<field name="si_cerrada" />-->
                    <!-- <field name="si_url" widget="url"/> -->
                    <!-- <field name="si_descripcion"/> -->
                </tree>                
            </field>
        </record>

        <record id="view_soporteincidencias_form" model="ir.ui.view">
            <field name="name">Incidencias</field>
            <field name="model">hgt.soporte_incidencia</field>
            <field name="type">form</field>
            <field name="mode">primary</field>
            <field name="priority" eval="16" />
            <field name="active" eval="True" />
            <field name="arch" type="xml">
                <form> 
                    <!--<sheet>-->
                        <header>
                            <button type="object" name="enviarIncidencia" string="Subir Incidencia" attrs="{ 'invisible' :[('subida','=', True)] }" class="oe_highlight"/>
                            <field name="si_cerrada" invisible="1" />
                        </header>
                        <group col="2" string="Incidencia">
                            <field name="si_name" colspan="2"/>
                            <!-- <field colspan="2" name="si_numero" readonly="1" /> -->
                            <field colspan="2" name="si_fecha" readonly="1"/>
                            <field colspan="2" name="si_descripcion" attrs="{'readonly':['|',('si_cerrada','=',True),('subida','=',True)]}"/>
                            <field colspan="2" name="estado" readonly="1" />
                            <field colspan="2" name="si_responsabilidad" readonly="1"/>
                            <field colspan="2" name="subida" invisible="1"/>
                        </group>
                  
                        <group col="2" string="Mensajes">
                            <h3>Histórico de mensajes:</h3>
                            <field name="si_historico_mensajes" readonly="1" colspan="2" nolabel='1'/>
                        </group>
                        <group col="2">

                            <button name="AgregarMensaje"  string="Agregar Mensaje" type="object" />
                            
                        </group>
                        <group>
                            <field name="si_mensajes" required="0" nolabel="1" >
                                <tree delete="false" create="false">
                                    <field name="usuario" attrs="{'readonly': True}" />
                                    <field name="si_mensaje" attrs="{'readonly': True}" />
                                    <field name="si_mens_fecha" attrs="{'readonly': True}" />
                                    <field name="remoto" attrs="{'readonly': True}" />
                                </tree>
                            </field>
                        </group>                       
                    <!--</sheet>-->
                </form>                
            </field>
        </record>

         <record id="view_soporteincidencias_search" model="ir.ui.view">
            <field name="name">Incidencias</field>
            <field name="model">hgt.soporte_incidencia</field>
            <field name="arch" type="xml">
                <search>
                    <field name="si_name" />
                    <field name="si_descripcion" />
                    <field name="si_fecha" />
                </search>
            </field>
        </record>
        
        

    </data>
</odoo>