123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571 |
- <?xml version="1.0" encoding="UTF-8"?>
- <openerp>
- <data>
- <act_window
- id="action_open_account_invoice_servicio"
- name="Servicios"
- res_model="account.invoice"
- view_type="form"
- view_mode="tree,form"
- domain="[('servicio_invoice_id', '=', active_id)]"/>
- <act_window
- id="action_open_order_sale_servicio"
- name="Pedidos de ventas"
- res_model="sale.order"
- view_type="form"
- view_mode="tree,form"
- domain="[('servicio_sale_id', '=', active_id)]"/>
- <record id="tree_orden_servicio_mejorado" model="ir.ui.view">
- <field name="name">orden.servicio.tree</field>
- <field name="model">orden.servicio</field>
- <field name="arch" type="xml">
- <tree string="Orden de servicio">
- <field name="name"/>
- <field name="partner_id"/>
- <field name="celular_partner"/>
- <field name="name_obra"/>
- <!-- <field name="sale_order_id"/> -->
- <field name="order_date"/>
- <field name="planned_start_date"/>
- <field name="planned_end_date"/>
- <field name="total_obra" sum="totobra"/>
- <field name="state"/>
- </tree>
- </field>
- </record>
- <!-- search view -->
- <record id="search_orden_servicio_mejorado" model="ir.ui.view">
- <field name="name">orden.servicio.search</field>
- <field name="model">orden.servicio</field>
- <field name="arch" type="xml">
- <search string="Orden de servicio">
- <field name="name"/>
- <field name="partner_id"/>
- <field name="name_obra"/>
- <field name="sale_order_id"/>
- <filter string="Mis tareas" domain="[('user_id','=',uid)]"/>
- <filter string="Realizada" domain="[('state','=','done')]"/>
- <filter string="En progreso" domain="[('state','=','in_progress')]"/>
- <filter string="Pendiente" domain="[('state','=','draft')]"/>
- <filter string="Cancelado" domain="[('state','=','canceled')]"/>
- <separator/>
- <filter string="Creado Hoy" domain="[('order_date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('order_date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
- <filter string="Creado mes actual" domain="[('order_date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('order_date','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Creado semana anterior" domain="[('order_date', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('order_date', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Creado esta semana" domain="[('order_date', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('order_date', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Orden a realizar mes actual" domain="[('planned_start_date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('planned_start_date','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Orden a realizar mes pasado" domain="[('planned_start_date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('planned_start_date','<',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Orden a realizar semana anterior" domain="[('planned_start_date', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('planned_start_date', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Orden a realizar esta semana" domain="[('planned_start_date', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('planned_start_date', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Orden a realizar hoy" domain="[('planned_start_date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('planned_start_date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
- <filter string="Orden a realizar ayer" domain="[('planned_start_date','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('planned_start_date','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
- <group expand="0" string="Agrupar por...">
- <filter string="Por dia" context="{'group_by':'date_invoice:day'}"/>
- <filter string="Por mes" context="{'group_by':'date_invoice:month'}"/>
- <filter string="Por dia a realizar" context="{'group_by':'planned_start_date:day'}"/>
- <filter string="Por mes a realizar" context="{'group_by':'planned_start_date:month'}"/>
- <filter string="Usuario" domain="[]" context="{'group_by':'user_id'}" />
- <filter string="Cliente" domain="[]" context="{'group_by':'partner_id'}" />
- <filter string="Estado" name="State" context="{'group_by':'state'}"/>
- </group>
- </search>
- </field>
- </record>
- <!-- form view -->
- <record id="form_orden_servicio_mejorado" model="ir.ui.view">
- <field name="name">orden.servicio.form</field>
- <field name="model">orden.servicio</field>
- <field name="type">form</field>
- <field name="arch" type="xml">
- <form string="Orden de servicio">
- <header>
-
- <button name="button_in_progress" type="object" states="draft,done" string="Iniciar" class="oe_highlight" groups="base.group_user"/>
- <button name="button_in_progress_back" type="object" states="in_progress" string="Atrás" class="oe_highlight" groups="base.group_user"/>
- <button name="button_done" type="object" states="in_progress" string="Hecho" class="oe_highlight" groups="base.group_user"/>
- <button name="button_done_back" type="object" states="done" string="En progreso" class="oe_highlight" groups="base.group_user"/>
- <button name="button_cancel" type="object" states="draft,in_progress" string="Cancelar" class="oe_highlight" groups="base.group_user"/>
- <field name="state" widget="statusbar" statusbar_visible="draft,in_progress,done" statusbar_colors='{"done":"red", "canceled":"red","in_progress":"blue"}'/>
- </header>
- <sheet>
- <div class="oe_title">
- <h1>
- <label string="Orden de servicio "/>
- <!-- <field name="name" class="oe_inline"/> -->
- </h1>
- </div>
- <div class="oe_right oe_button_box">
- <button
- class="oe_inline oe_stat_button"
- type="action"
- name="%(action_open_order_sale_servicio)d"
- icon="fa-strikethrough">
- <field name="sale_count" string="Pedidos" widget="statinfo" />
- </button>
- <button
- class="oe_inline oe_stat_button"
- type="action"
- name="%(action_open_account_invoice_servicio)d"
- icon="fa-money">
- <field name="invoice_count" string="Facturas" widget="statinfo" />
- </button>
- </div>
- <group>
- <group>
- <field name="name"/>
- <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="celular_partner"/>
- <field name="name_obra"/>
- <field name="name_local"/>
- <field name="contacto_obra"/>
- <field name="distancia_obra"/>
- </group>
- <group name="Dates">
- <field name="order_date"/>
- <field name="responsable"/>
- <field name="planned_start_date"/>
- <field name="planned_end_date"/>
- <field name="hrs_total"/>
- <field name="telefono_partner"/>
- <field name="celular_obra"/>
- <!-- <field name="sale_order_id"/> -->
- </group>
- </group>
- <group>
- <field name="dir_obra"/>
- </group>
- <group>
- <field name="sale_ids" widget="many2many" options="{'no_create': False}">
- <tree editable="top">
- <field name="name" string="Orden venta Nº" />
- <field name="date_order" string="Fecha del pedido" />
- <field name="amount_total" string="Total pedido" sum="Total" />
- <field name="state" string="Estado" />
- </tree>
- </field>
- </group>
- <group>
- <!-- <label for="horarios_dia" string="Horarios por día"/> -->
- <field name="horarios_dia" mode="tree" context="{'default_servicio_id': active_id}">
- <tree editable="bottom">
- <field name="dia_semana"/>
- <field name="hora_inicio" widget="odoo_timepicker"/>
- <field name="hora_fin" widget="odoo_timepicker"/>
- </tree>
- </field>
- </group>
- <group>
- <field name="ubicacion_google_link" widget="url" target="_blank"/>
- <field name="croquis"/>
- <field name="zona_obra"/>
- </group>
- <notebook>
- <page>
- <span style="font-weight:bold;">Fotos de la Obra</span>
- <field name="fotos_obras" widget="many2many_binary"/>
- </page>
- </notebook>
- <notebook>
- <page>
- <span style="font-weight:bold;">Productos a utilizar</span>
- <field name="product_ids" attrs="{'readonly': [('state','=','done')]}"/>
- </page>
- </notebook>
- <notebook>
- <page>
- <span style="font-weight:bold;">Insumos para colocación a utilizar</span>
- <field name="insumos_ids" attrs="{'readonly': [('state','=','done')]}"/>
- </page>
- </notebook>
- <notebook>
- <page>
- <span style="font-weight:bold;">Gastos de logística</span>
- <field name="logistica_ids" attrs="{'readonly': [('state','=','done')]}"/>
- </page>
- </notebook>
- <notebook>
- <page>
- <span style="font-weight:bold;">Devolución de productos e insumos</span>
- <field name="devolucion_ids" attrs="{'readonly': [('state','=','done')]}"/>
- </page>
- </notebook>
- <notebook>
- <page>
- <span style="font-weight:bold;">Recepción en fábrica</span>
- <field name="recepcion_ids" attrs="{'readonly': [('state','=','done')]}"/>
- </page>
- </notebook>
- <notebook>
- <page>
- <span style="font-weight:bold;">Facturas relacionadas a esta Orden de Servicio</span>
- <field name="invoice_ids" widget="many2many" options="{'no_create': False}">
- <tree editable="top">
- <field name="number" string="Número de factura" />
- <field name="date_invoice" string="Fecha de factura" />
- <field name="residual" string="Saldo" sum="Saldo" />
- <field name="amount_total" string="Total factura" sum="Total" />
- <field name="state" string="Estado" />
- </tree>
- </field>
- </page>
- </notebook>
- <group>
- <field name="total_producto"/>
- <field name="total_insumo"/>
- <field name="total_logistica"/>
- <field name="total_devolucion"/>
- <field name="total_fabrica"/>
- <field name="total_obra"/>
- <field name="obs_obra"/>
- </group>
- </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>
- <script type="text/javascript" src="/orden_servicio/static/src/js/custom_script.js"/>
- </field>
- </record>
- <!-- calendar view -->
- <record id="calendar_orden_servicio" model="ir.ui.view">
- <field name="name">orden.servicio.calendar</field>
- <field name="model">orden.servicio</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_orden_servicio" model="ir.ui.view">
- <field name="name">orden.servicio.gatt</field>
- <field name="model">orden.servicio</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_orden_servicio" model="ir.actions.act_window">
- <field name="name">Orden de servicio</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">orden.servicio</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form,calendar,gantt</field>
- <field name="search_view_id" ref="search_orden_servicio_mejorado"/>
- </record>
- <record id="tree_orden_servicio_producto" model="ir.ui.view">
- <field name="name">orden.servicio.producto.tree</field>
- <field name="model">servicio.producto</field>
- <field name="arch" type="xml">
- <tree string="Productos a utilizar" editable="bottom">
- <field name="product_id"/>
- <field name="categ_id"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </tree>
- </field>
- </record>
- <record id="search_orden_servicio_producto" model="ir.ui.view">
- <field name="name">orden.servicio.producto.search</field>
- <field name="model">servicio.producto</field>
- <field name="arch" type="xml">
- <search string="Productos a utilizar">
- <field name="product_id"/>
- <field name="categ_id"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- </search>
- </field>
- </record>
- <record id="form_orden_servicio_producto" model="ir.ui.view">
- <field name="name">orden.servicio.producto.form</field>
- <field name="model">servicio.producto</field>
- <field name="arch" type="xml">
- <form string="Productos a utilizar">
- <sheet>
- <group>
- <field name="product_id"/>
- <field name="categ_id"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_orden_servicio_producto" model="ir.actions.act_window">
- <field name="name">Productos a utilizar</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">servicio.producto</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_orden_servicio_producto"/>
- </record>
- <record id="tree_orden_servicio_insumo" model="ir.ui.view">
- <field name="name">orden.servicio.insumo.tree</field>
- <field name="model">servicio.insumo</field>
- <field name="arch" type="xml">
- <tree string="Insumos para colocación" editable="bottom">
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </tree>
- </field>
- </record>
- <record id="search_orden_servicio_insumo" model="ir.ui.view">
- <field name="name">orden.servicio.insumo.search</field>
- <field name="model">servicio.insumo</field>
- <field name="arch" type="xml">
- <search string="Insumos para colocación">
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- </search>
- </field>
- </record>
- <record id="form_orden_servicio_insumo" model="ir.ui.view">
- <field name="name">orden.servicio.insumo.form</field>
- <field name="model">servicio.insumo</field>
- <field name="arch" type="xml">
- <form string="Insumos para colocación">
- <sheet>
- <group>
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_orden_servicio_insumo" model="ir.actions.act_window">
- <field name="name">Insumos para colocación</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">servicio.insumo</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_orden_servicio_insumo"/>
- </record>
- <record id="tree_orden_servicio_logistica" model="ir.ui.view">
- <field name="name">orden.servicio.logistica.tree</field>
- <field name="model">servicio.logistica</field>
- <field name="arch" type="xml">
- <tree string="Gastos de logística" editable="bottom">
- <field name="fecha"/>
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </tree>
- </field>
- </record>
- <record id="search_orden_servicio_logistica" model="ir.ui.view">
- <field name="name">orden.servicio.logistica.search</field>
- <field name="model">servicio.logistica</field>
- <field name="arch" type="xml">
- <search string="Gastos de logística">
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- </search>
- </field>
- </record>
- <record id="form_orden_servicio_logistica" model="ir.ui.view">
- <field name="name">orden.servicio.logistica.form</field>
- <field name="model">servicio.logistica</field>
- <field name="arch" type="xml">
- <form string="Gastos de logística">
- <sheet>
- <group>
- <field name="fecha"/>
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_orden_servicio_logistica" model="ir.actions.act_window">
- <field name="name">Gastos de logística</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">servicio.logistica</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_orden_servicio_logistica"/>
- </record>
- <record id="tree_orden_devolucion_insumo" model="ir.ui.view">
- <field name="name">orden.devolucion.insumo.tree</field>
- <field name="model">devolucion.insumo</field>
- <field name="arch" type="xml">
- <tree string="Devolución de productos e insumos" editable="bottom">
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </tree>
- </field>
- </record>
- <record id="search_orden_devolucion_insumo" model="ir.ui.view">
- <field name="name">orden.devolucion.insumo.search</field>
- <field name="model">devolucion.insumo</field>
- <field name="arch" type="xml">
- <search string="Devolución de productos e insumos">
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- </search>
- </field>
- </record>
- <record id="form_orden_devolucion_insumo" model="ir.ui.view">
- <field name="name">orden.devolucion.insumo.form</field>
- <field name="model">devolucion.insumo</field>
- <field name="arch" type="xml">
- <form string="Devolución de productos e insumos">
- <sheet>
- <group>
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal" sum="total"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_orden_devolucion_insumo" model="ir.actions.act_window">
- <field name="name">Devolución de productos e insumos</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">devolucion.insumo</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_orden_devolucion_insumo"/>
- </record>
- <record id="tree_orden_recepcion_fabrica" model="ir.ui.view">
- <field name="name">orden.recepcion.fabrica.tree</field>
- <field name="model">recepcion.fabrica</field>
- <field name="arch" type="xml">
- <tree string="Recepción en fábrica" editable="bottom">
- <field name="fecha"/>
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- <field name="employee_id"/>
- </tree>
- </field>
- </record>
- <record id="search_orden_recepcion_fabrica" model="ir.ui.view">
- <field name="name">orden.recepcion.fabrica.search</field>
- <field name="model">recepcion.fabrica</field>
- <field name="arch" type="xml">
- <search string="Recepción en fábrica">
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- <field name="employee_id"/>
- </search>
- </field>
- </record>
- <record id="form_orden_recepcion_fabrica" model="ir.ui.view">
- <field name="name">orden.recepcion.fabrica.form</field>
- <field name="model">recepcion.fabrica</field>
- <field name="arch" type="xml">
- <form string="Recepción en fábrica">
- <sheet>
- <group>
- <field name="fecha"/>
- <field name="product_id"/>
- <field name="descripcion"/>
- <field name="quantity"/>
- <field name="price_unit"/>
- <field name="subtotal"/>
- <field name="employee_id"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="action_orden_recepcion_fabrica" model="ir.actions.act_window">
- <field name="name">Recepción en fábrica</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">recepcion.fabrica</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="search_orden_recepcion_fabrica"/>
- </record>
- <menuitem id="orden_servicio_id" parent="base.menu_sales" action="action_orden_servicio" name="Orden de servicio" sequence="20"/>
- </data>
- </openerp>
|