123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
-
- <!-- form view -->
-
- <record model="ir.ui.view" id="project_service_reserve_form">
- <field name="name">project.service.reserve.form</field>
- <field name="model">project.service.reserve</field>
- <field name="arch" type="xml">
- <form string="Reservas">
- <header>
- <field name="state" widget="statusbar" clickable="True"/>
- </header>
- <sheet>
- <group>
- <div class="oe_title oe_left">
- <div class="oe_edit_only">
- <label for="partner_id" string="Cliente"/>
- </div>
- <h2>
- <field name="partner_id" placeholder="Cliente"/>
- </h2>
- </div>
- </group>
- <group>
- <group>
- <field name="user_id" string="Funcionario" required="1"/>
- <field name="date" string="Fecha"/>
- <field name="date_reserve" string="Fecha Reservada"/>
- </group>
- <group>
- <field name="place" string="Lugar"/>
- </group>
- </group>
- </sheet>
- </form>
- </field>
- </record>
-
- <!-- tree view -->
-
- <record model="ir.ui.view" id="project_service_reserve_tree" >
- <field name="name">project.service.reserve.tree</field>
- <field name="model">project.service.reserve</field>
- <field name="arch" type="xml">
- <tree string="tareas">
- <field name="partner_id" string="Cliente"/>
- <field name="date_reserve" string="Fecha Reservada"/>
- <field name="user_id" string="Funcionario"/>
- <field name="place" string="Lugar"/>
- <field name="state" string="Estado"/>
- </tree>
- </field>
- </record>
-
- <!-- calendar view -->
-
- <record model="ir.ui.view" id="project_service_reserve_calendar">
- <field name="name">project.service.reserve.calendar</field>
- <field name="model">project.service.reserve</field>
- <field eval="2" name="priority"/>
- <field name="arch" type="xml">
- <calendar color="user_id" date_start="date_reserve" string="Reserva">
- <field name="place"/>
- <field name="name"/>
- </calendar>
- </field>
- </record>
- <!-- Search -->
- <record model="ir.ui.view" id="project_service_reserve_search">
- <field name="name">project.service.reserve.search</field>
- <field name="model">project.service.reserve</field>
- <field name="arch" type="xml">
- <search string="Reservas">
- <field name="user_id" string="Responsable"/>
- <field name="place" string="Lugar"/>
- <filter string="Mis Reservas" domain="[('user_id','=',uid)]"/>
- <separator/>
- <filter string="Terminados" name="End" domain="[('state','=','done')]"/>
- <filter string="Pendientes" name="Pending" domain="[('state','=','confirmed')]"/>
- <filter string="Hoy" domain="[('date_reserve', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date_reserve', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
- <filter string="Ayer" domain="[('date_reserve','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('date_reserve','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
- <filter string="Esta semana" domain="[('date_reserve', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date_reserve', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Mes actual" domain="[('date_reserve','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date_reserve','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Mes pasado" domain="[('date_reserve','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date_reserve','<',time.strftime('%%Y-%%m-01'))]"/>
- <separator/>
- <group expand="0" string="Agrupar por ">
- <filter string="Responsables" name="User" context="{'group_by':'user_id'}"/>
- <filter string="Cliente" name="Customer" context="{'group_by':'partner_id'}"/>
- <separator/>
- </group>
- </search>
- </field>
- </record>
- <!-- action -->
-
- <record model="ir.actions.act_window" id="project_service_reserve_action">
- <field name="name">Todas las Reservas</field>
- <field name="res_model">project.service.reserve</field>
- <field name="view_type">form</field>
- <field name="view_mode">calendar,tree,form</field>
- <field name="search_view_id" ref="project_service_reserve_search"/>
- <field name="context">{'search_default_Pending': 1}</field>
- </record>
-
- <!-- menus -->
-
- <menuitem name="Reservas" parent="project_service_parent_menu" id="project_service_reserve_all_menu" sequence="3" action="project_service_reserve_action"/>
- </data>
- </openerp>
|