123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <!-- actions -->
- <act_window
- id="action_open_account_invoice"
- name="Factura"
- res_model="account.invoice"
- view_type="form"
- view_mode="tree,form"
- domain="[('task_invoice_id', '=', active_id)]"/>
- <act_window
- id="action_open_single_account_invoice"
- name="Factura"
- res_model="account.invoice"
- view_type="form"
- view_mode="tree,form"
- target="current"
- domain="[('invoice_ids', 'in', active_id)]"/>
- <!-- Form View -->
-
- <record model="ir.ui.view" id="project_service_task_form">
- <field name="name">project.service.task.form</field>
- <field name="model">project.service.task</field>
- <field name="arch" type="xml">
- <form string="Worksheet">
- <header>
- <button name="Facturado" string="Crear Factura" type="object" class="btn-primary" states="Preparado"/>
-
- <button class="btn-primary" name="cancel" string="Cancelar" type="object" states="Preparado"/>
-
- <button name="button_draft"
- states="Cancelado,Facturado"
- string="Cambiar Estado"
- type="object"/>
-
- <field name="stage_id" widget="statusbar" clickable="True"/>
- <field name="state" widget="statusbar" invisible="1"/>
- </header>
- <sheet string="Hoja de Tarea">
- <div class="oe_title">
- <h1 class="o_row">
- <field name="partner_id" placeholder="Cliente" required="1" attrs="{'readonly': [('state','!=', 'Preparado')]}"/>
- </h1>
- </div>
- <div class="oe_right oe_button_box">
- <button
- class="oe_inline oe_stat_button"
- type="action"
- name="%(action_open_account_invoice)d"
- icon="fa-money">
- <field name="invoice_count" string="Facturas" widget="statinfo" />
- </button>
- </div>
- <group>
- <group>
- <field name="reserve_id" string="Reserva" attrs="{'readonly': [('state','!=', 'Preparado')]}" domain="[('state','=','confirmed')]"/>
- <field name="project_id" string="Lugar" attrs="{'readonly': [('state','!=', 'Preparado')]}" domain="[('active','=',1)]"/>
- </group>
- <group>
- <field name="date" string="Fecha y Hora" attrs="{'readonly': [('state','!=', 'Preparado')]}"/>
- </group>
- </group>
- <notebook>
- <page name="timesheet_page" string="Hoja de trabajo">
- <group string ="Trabajo Planeado">
- <field name="activity_ids" nolabel="1" attrs="{'readonly': [('state','!=', 'Preparado')]}">
- <tree string="Planned Work" editable="bottom">
- <field name="product_id" string="Trabajo" required="1"/>
- <field name="work_date" string="Fecha de trabajo"/>
- <field name="user_id" string="Responsable"/>
- <field name="work_cost" string="Precio" sum="total" required="1"/>
- <field name="completed" string="¿El trabajo esta terminado?"/>
- </tree>
- </field>
- </group>
- <group string = "Materiales Utilizados">
- <field name="materials_used" nolabel="1" attrs="{'readonly': [('state','!=', 'Preparado')]}"/>
- </group>
- <group>
- <field name="include_materials" class="oe_inline" string="¿Incluir materiales en la factura?" attrs="{'readonly': [('state','!=', 'Preparado')]}"/>
- </group>
- <group>
- <label for="amount_total" string="Monto Total"/>
- <h1>
- <field name="amount_total"/>
- </h1>
- </group>
- </page>
- </notebook>
- </sheet>
- </form>
- </field>
- </record>
-
- <!-- Tree view -->
-
- <record model="ir.ui.view" id="project_service_task_tree">
- <field name="name">project.service.task.tree</field>
- <field name="model">project.service.task</field>
- <field name="arch" type="xml">
- <tree string="Tareas">
- <field name="name" string="Titulo"/>
- <field name="project_id" string="Proyecto"/>
- <field name="date" string="Fecha limite"/>
- <field name="stage_id" string="Etapa"/>
- </tree>
- </field>
- </record>
-
- <!-- Kanban view -->
-
- <record model="ir.ui.view" id="project_service_task_kanban">
- <field name="name">project.service.task.kanban</field>
- <field name="model">project.service.task</field>
- <field name="arch" type="xml">
- <kanban default_group_by="stage_id">
- <field name="color"/>
- <field name="priority"/>
- <field name="date"/>
- <templates>
- <t t-name="kanban-box">
- <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
- <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
- <span class="oe_e">í</span>
- <ul class="oe_dropdown_menu">
- <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
- <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
- <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
- </ul>
- </div>
- <div class="oe_kanban_content">
- <div><b><field name="name"/></b></div>
- <div>
- <t t-if="record.date.raw_value and record.date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
- <span t-attf-class="#{red || ''}"><i><field name="date"/></i></span>
- </div>
- </div>
- <div class="oe_clear"></div>
- </div>
- </t>
- </templates>
- </kanban>
- </field>
- </record>
-
- <!-- calendar view -->
-
- <record model="ir.ui.view" id="project_service_task_calendar">
- <field name="name">project.service.task.calendar</field>
- <field name="model">project.service.task</field>
- <field eval="2" name="priority"/>
- <field name="arch" type="xml">
- <calendar color="partner_id" date_start="date" string="Tasks">
- <field name="name"/>
- <field name="project_id"/>
- </calendar>
- </field>
- </record>
- <!-- search view -->
- <record model="ir.ui.view" id="project_service_task_search">
- <field name="name">project.service.task.search</field>
- <field name="model">project.service.task</field>
- <field name="arch" type="xml">
- <search string="Tareas">
- <field name="name" string="Tarea"/>
- <field name="partner_id" string="Cliente"/>
- <field name="project_id" string="Proyecto"/>
- <field name="stage_id" string="Etapa"/>
- <separator/>
- <filter string="Nuevo" name="draft" domain="[('stage_id.sequence', '<=', 1)]"/>
- <separator/>
- <group expand="0" string="Agrupar por ">
- <filter string="Proyecto" name="project" context="{'group_by':'project_id'}"/>
- <filter string="Etapa" name="Stage" context="{'group_by':'stage_id'}"/>
- <filter string="Estado" name="State" context="{'group_by':'state'}"/>
- <separator/>
- </group>
- </search>
- </field>
- </record>
-
- <!-- action -->
- <record model="ir.actions.act_window" id="project_service_task_action">
- <field name="name">Clientes </field>
- <field name="res_model">project.service.task</field>
- <field name="view_type">form</field>
- <field name="view_mode">kanban,tree,form,calendar</field>
- </record>
- <!-- menus -->
- <menuitem name="Clientes" id="project_service_task_all_menu" parent="project_service_parent_menu" action="project_service_task_action" sequence="2"/>
- </data>
- </openerp>
|