123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <?xml version="1.0" encoding="UTF-8"?>
- <openerp>
- <data>
- <!-- ations -->
- <act_window
- id="action_open_account_invoice"
- name="Trabajos"
- res_model="account.invoice"
- view_type="form"
- view_mode="tree,form"
- domain="[('work_invoice_id', '=', active_id)]"/>
- <act_window
- id="action_open_single_account_invoice"
- name="Trabajos"
- res_model="account.invoice"
- view_type="form"
- view_mode="tree,form"
- target="current"
- domain="[('invoice_ids', 'in', active_id)]"/>
- <!-- tree view -->
- <record id="tree_repair_workorder" model="ir.ui.view">
- <field name="name">repair.workorder.tree</field>
- <field name="model">repair.workorder</field>
- <field name="arch" type="xml">
- <tree string="Work Order" default_order="planned_start_date desc">
- <field name="name"/>
- <field name="user_id"/>
- <field name="partner_id"/>
- <field name="planned_start_date"/>
- <field name="planned_end_date"/>
- <field name="state"/>
- </tree>
- </field>
- </record>
- <!-- search view -->
- <record id="search_repair_workorder" model="ir.ui.view">
- <field name="name">repair.workorder.search</field>
- <field name="model">repair.workorder</field>
- <field name="arch" type="xml">
- <search string="Work Order">
- <field name="name"/>
- <field name="user_id"/>
- <field name="partner_id"/>
- <filter string="Mis tareas" domain="[('user_id','=',uid)]"/>
- <filter string="Realizada" domain="[('state','=','done')]"/>
- <separator/>
- <group expand="0" string="Group By...">
- <filter string="User" domain="[]" context="{'group_by':'user_id'}" />
- <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}" />
- <filter string="Estado" name="State" context="{'group_by':'state'}"/>
- </group>
- </search>
- </field>
- </record>
- <!-- form view -->
- <record id="form_repair_workorder" model="ir.ui.view">
- <field name="name">repair.workorder.form</field>
- <field name="model">repair.workorder</field>
- <field name="arch" type="xml">
- <form string="Work Order">
- <header>
- <!-- <button name="button_attachment" string="Attachment" type="object" icon="gtk-go-forward" colspan='1' /> -->
- <button name="Facturado" string="Crear Factura" type="object" class="btn-primary" states="done"/>
- <button name="button_draft" states="invoiced" string="Cambiar Estado" type="object"/>
- <button name="button_in_progress" type="object" states="draft,warranty" string="Begin work" class="oe_highlight" groups="base.group_user"/>
- <button name="button_in_progress_back" type="object" states="in_progress" string="Back" class="oe_highlight" groups="base.group_user"/>
- <button name="button_done" type="object" states="in_progress" string="Done" class="oe_highlight" groups="base.group_user"/>
- <button name="button_done_back" type="object" states="done" string="Back" class="oe_highlight" groups="base.group_user"/>
- <button name="button_cancel" type="object" states="draft,warranty,in_progress" string="Cancel" class="oe_highlight" groups="base.group_user"/>
- <field name="state" widget="statusbar" statusbar_visible="draft,in_progress,done" statusbar_colors='{"done":"red","warning":"blue","canceled":"red","in_progress":"blue"}'/>
- </header>
- <sheet>
- <div class="oe_title">
- <h1>
- <label string="Workorder "/>
- <field name="name" class="oe_inline" readonly="1"/>
- </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="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": True}' attrs="{'readonly': [('state','!=', 'draft')]}" required="1"/>
- <field name="user_id" attrs="{'readonly': [('state','=', 'invoiced')]}" required="1"/>
- <field name="filename" invisible="1"/>
- <field name="file_import" filename="filename"/>
- <field name="filename_a" invisible="1"/>
- <field name="file_import_a" filename="filename_a"/>
- <field name="filename_b" invisible="1"/>
- <field name="file_import_b" filename="filename_b"/>
- <field name="type"/>
- </group>
- <group name="Dates">
- <field name="order_date" attrs="{'readonly': [('state','=','invoiced')]}" required="1"/>
- <field name="planned_start_date" attrs="{'readonly': [('state','=','invoiced')]}" required="1"/>
- <field name="planned_end_date" attrs="{'readonly': [('state','=','invoiced')]}" required="1"/>
- <field name="next_action_date" attrs="{'readonly': [('state','=','in_progres')]}" string="Fecha Próx. Mantenimiento"/>
- </group>
- </group>
- <separator string="Equipo"/>
- <field name="line_ids" attrs="{'readonly': [('state','=','invoiced')]}"/>
- <separator string="Diagnostic"/>
- <field name="diagnostic" placeholder="describe the diagnostic..." attrs="{'readonly': [('state','=','invoiced')]}"/>
- <separator string="Descripción del Trabajo"/>
- <field name="actions" placeholder="Descripción del trabajo" attrs="{'readonly': [('state','=','invoiced')]}"/>
- <separator string="Recomendaciones Técnicas"/>
- <field name="recommendations" placeholder="describe the recommendations..." attrs="{'readonly': [('state','=','invoiced')]}"/>
- <separator string="Repuestos y piezas utilizadas"/>
- <field name="consumed_ids" attrs="{'readonly': [('state','=','invoiced')]}"/>
- <separator string="Observaciones Técnicas" invisible="1"/>
- <field name="causes" placeholder="describe las observaciones técnicas..." invisible="1" attrs="{'readonly': [('state','=','invoiced')]}"/>
- <!-- </page> -->
- <!-- <page string="Repuestos y piezas utilizadas">
- </page>
- <page string="Operations">
- </page> -->
- <!-- </notebook> -->
- </sheet>
- <div class="oe_chatter">
- <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
- <field name="message_ids" widget="mail_thread"/>
- </div>
- </form>
- </field>
- </record>
- <!-- calendar view -->
- <record id="calendar_repair_workorder" model="ir.ui.view">
- <field name="name">repair.workorder.calendar</field>
- <field name="model">repair.workorder</field>
- <field name="arch" type="xml">
- <calendar color="user_id" date_start="planned_start_date" string="Repair">
- <field name="name"/>
- </calendar>
- </field>
- </record>
- <!-- gantt -->
- <record id="gantt_repair_workorder" model="ir.ui.view">
- <field name="name">repair.workorder.calendar</field>
- <field name="model">repair.workorder</field>
- <field name="arch" type="xml">
- <gantt date_start="planned_start_date" date_stop="planned_end_date" progress="progress" string="Tasks" default_group_by="project_id">
- </gantt>
- </field>
- </record>
- <!-- action -->
- <record id="action_repair_workorder" model="ir.actions.act_window">
- <field name="name">Work Order</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">repair.workorder</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form,calendar,gantt</field>
- <field name="search_view_id" ref="search_repair_workorder"/>
- </record>
- <!-- tree view -->
- <record id="tree_repair_workorder_line" model="ir.ui.view">
- <field name="name">repair.workorder.line.tree</field>
- <field name="model">repair.workorder.line</field>
- <field name="arch" type="xml">
- <tree string="Work order line" editable="bottom">
- <field name="description" required="1"/>
- <field name="brand" required="1"/>
- <field name="number" required="1"/>
- </tree>
- </field>
- </record>
- <!-- search view -->
- <record id="search_repair_workorder_line" model="ir.ui.view">
- <field name="name">repair.workorder.line.search</field>
- <field name="model">repair.workorder.line</field>
- <field name="arch" type="xml">
- <search string="Work order line">
- <field name="description"/>
- <field name="quantity"/>
- <newline />
- <group expand="0" string="Group By...">
- </group>
- </search>
- </field>
- </record>
- <record id="form_repair_workorder_line" model="ir.ui.view">
- <field name="name">repair.workorder.line.form</field>
- <field name="model">repair.workorder.line</field>
- <field name="arch" type="xml">
- <form string="Work order line">
- <sheet>
- <group>
- <field name="description" required="1"/>
- <field name="brand" required="1"/>
- <field name="number" required="1"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_repair_workorder_line" model="ir.actions.act_window">
- <field name="name">Work order line</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">repair.workorder.line</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_repair_workorder_line"/>
- </record>
- <record id="tree_repair_workorder_consumed" model="ir.ui.view">
- <field name="name">repair.workorder.consumed.tree</field>
- <field name="model">repair.workorder.consumed</field>
- <field name="arch" type="xml">
- <tree string="Consumed products and services" editable="bottom">
- <field name="product_id"/>
- <field name="description"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- <field name="type"/>
- </tree>
- </field>
- </record>
- <record id="search_repair_workorder_consumed" model="ir.ui.view">
- <field name="name">repair.workorder.consumed.search</field>
- <field name="model">repair.workorder.consumed</field>
- <field name="arch" type="xml">
- <search string="Consumed products and services">
- <field name="type"/>
- <field name="product_id"/>
- <field name="description"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- <newline />
- <group expand="0" string="Group By...">
- <filter string="Nombre" domain="[]" context="{'group_by':'type'}" />
- </group>
- </search>
- </field>
- </record>
- <record id="form_repair_workorder_consumed" model="ir.ui.view">
- <field name="name">repair.workorder.consumed.form</field>
- <field name="model">repair.workorder.consumed</field>
- <field name="arch" type="xml">
- <form string="Consumed products and services">
- <sheet>
- <group>
- <field name="product_id"/>
- <field name="type"/>
- <field name="description"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_repair_workorder_consumed" model="ir.actions.act_window">
- <field name="name">Consumed products and services</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">repair.workorder.consumed</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_repair_workorder_consumed"/>
- </record>
- <menuitem id="repair_workorder" parent="base.menu_sales" action="action_repair_workorder" name="Work order" sequence="20"/>
- </data>
- </openerp>
|