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

      <!-- explicit list view definition -->
      <record model="ir.ui.view" id="hgt_lappa_solicitudes_list">
        <field name="name">Solicitudes de igreso</field>
        <field name="model">lappa.solicitudes</field>
        <field name="arch" type="xml">
          <tree>
            <field name="name"/>
            <field name="nombre"/>
            <field name="fecha"/>
            <field name="estado"/>
          </tree>
        </field>
      </record>

      <record model="ir.ui.view" id="hgt_lappa_solicitudes_form">
        <field name="name">Solicitudes de igreso</field>
        <field name="model">lappa.solicitudes</field>
        <field name="arch" type="xml">
          <form>
            <header>
              <field name="estado" widget="statusbar" readonly="1"/>
            </header>
            <sheet>

              <field name="name" style="font-size:18px" nolabel="1"/>
                
              <group col="4" string="Datos del Solicitante">
                <field name="nombre"/>
                <field name="inicio"/>
                <field name="celular"/>
                <field name="cuit"/>
                <field name="localidad"/>
                <field name="email"/>
              </group>
              <button name="Revisar" class='btn btn-success' string="Comensar a revisar" type="object" attrs="{ 'invisible' : [('estado','!=','a_revisar')]}" />

              <group col="1" style="width: 800px;">
                    <h2>Bitacora</h2>
                    <field name="texto" nolabel="1"/>
              </group>
              <group col="1">
                    <field name="notitas" nolabel="1" attrs="{'readonly': True}"/>
              </group>
              <group string="Resolucion de solicitud" col="5">
                  <button name="Rechazar" class='btn btn-danger' string="Rechazar" type="object" attrs="{ 'invisible' : [('estado','!=','revision')]}" />
                  <button name="AceptarNuevo" class='btn btn-info' string="Aceptar y generar nuevo trannsportista" type="object" attrs="{ 'invisible' : [('estado','!=','revision')]}" />
                  <button name="AceptarRelacionar" class='btn btn-success' string="Aceptar Y relacioar a transportista existente" type="object" attrs="{ 'invisible' : [('estado','!=','revision')]}" />
              </group>
              <group attrs="{ 'invisible' : [('estado','!=','revision')]}">
                <h4>Transportista al que se relacionara o se relaciono</h4>
                <field name="transportista" nolabel="1"/>
              </group>  
            </sheet>
          </form>
        </field>
      </record>



      <!-- actions opening views on models -->
      <record model="ir.actions.act_window" id="hgt_lappa_solicitudes_action_window">
        <field name="name">Solicitudes de igreso</field>
        <field name="res_model">lappa.solicitudes</field>
        <field name="view_mode">tree,form</field>
      </record>

    </data>
</odoo>