123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
-
- <!-- form view -->
-
- <record model="ir.ui.view" id="project_service_activity_form">
- <field name="name">project.service.activity.form</field>
- <field name="model">project.service.activity</field>
- <field name="arch" type="xml">
- <form string="Actividades">
- <sheet>
- <group>
- <div class="oe_title oe_left">
- <div class="oe_edit_only">
- <label for="task_id" string="Tarea"/>
- </div>
- <h2>
- <field name="task_id" placeholder="Tarea"/>
- </h2>
- </div>
- </group>
- <group>
- <group>
- <field name="product_id" string="Actividad planeada"/>
- <field name="time_spent" widget="float_time" string="Tiempo Estimado"/>
- </group>
- <group>
- <field name="user_id" string="Responsable"/>
- <field name="work_date" string="Fecha"/>
- <field name="work_cost" string="Costo"/>
- </group>
- </group>
- </sheet>
- </form>
- </field>
- </record>
-
- <!-- tree view -->
-
- <record model="ir.ui.view" id="project_service_activity_tree" >
- <field name="name">project.service.activity.tree</field>
- <field name="model">project.service.activity</field>
- <field name="arch" type="xml">
- <tree string="tareas">
- <field name="product_id" string="Trabajo"/>
- <field name="user_id" string="Responsable"/>
- <field name="task_id" string="Cliente"/>
- <field name="work_date" string="Fecha"/>
- <field name="work_cost" string="Costo"/>
- <field name="completed" string="Estado"/>
- </tree>
- </field>
- </record>
-
- <!-- calendar view -->
-
- <record model="ir.ui.view" id="project_service_activity_calendar">
- <field name="name">project.service.activity.calendar</field>
- <field name="model">project.service.activity</field>
- <field eval="2" name="priority"/>
- <field name="arch" type="xml">
- <calendar color="user_id" date_start="work_date" string="Actividades">
- <field name="product_id"/>
- <field name="task_id"/>
- </calendar>
- </field>
- </record>
- <!-- Search -->
- <record model="ir.ui.view" id="project_service_activity_search">
- <field name="name">project.service.activity.search</field>
- <field name="model">project.service.activity</field>
- <field name="arch" type="xml">
- <search string="Actividades">
- <field name="name" string="Actividad"/>
- <field name="user_id" string="Responsable"/>
- <field name="task_id" string="Tarea"/>
- <filter string="Pendientes" name="Pending" domain="[('completed','=',0)]"/>
- <filter string="Terminados" name="End" domain="[('completed','=',1)]"/>
- <filter string="Mis Actividades" domain="[('user_id','=',uid)]"/>
- <separator/>
- <filter string="Hoy" domain="[('work_date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('work_date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
- <filter string="Ayer" domain="[('work_date','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('work_date','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
- <filter string="Esta semana" domain="[('work_date', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('work_date', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Mes actual" domain="[('work_date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('work_date','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Mes pasado" domain="[('work_date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('work_date','<',time.strftime('%%Y-%%m-01'))]"/>
- <separator/>
- <group expand="0" string="Agrupar por ">
- <filter string="Tarea" name="task" context="{'group_by':'task_id'}"/>
- <filter string="Responsables" name="User" context="{'group_by':'user_id'}"/>
- <separator/>
- </group>
- </search>
- </field>
- </record>
- <!-- action -->
-
- <record model="ir.actions.act_window" id="project_service_activity_action">
- <field name="name">Todas los trabajos</field>
- <field name="res_model">project.service.activity</field>
- <field name="view_type">form</field>
- <field name="domain">[]</field>
- <field name="view_mode">calendar,form,tree</field>
- <field name="search_view_id" ref="project_service_activity_search"/>
- <field name="context">{'search_default_Pending': 1}</field>
- </record>
-
- <!-- menus -->
-
- <menuitem name="Trabajos" parent="project_service_parent_menu" id="project_service_activity_all_menu" sequence="3" action="project_service_activity_action"/>
- </data>
- </openerp>
|