123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <?xml version="1.0"?>
- <openerp>
- <data>
- <record id="project_car_form_view" model="ir.ui.view">
- <field name="name">project.car.form.view</field>
- <field name="model">car.car</field>
- <field name="inherit_id" ref="eiru_base_for_services.car_car_form"/>
- <field name="arch" type="xml">
- <group name="extra_info" position="inside">
- <field name="date_in" string="Fecha de entrada" attrs="{'required': [('state','!=', 'draft')],'readonly': [('state','=', 'close')]}"/>
- <field name="date_out" string="Fecha de salida" attrs="{'readonly': [('state','=', 'close')]}"/>
- </group>
- <field name="name" position="replace">
- <field name="name" placeholder="Vehiculo" attrs="{'readonly': [('state','=', 'close')]}"/>
- </field>
- <field name="partner_id" position="before">
- <field name="policy" string="¿Entra por medio de seguro?" attrs="{'readonly': [('state','=', 'close')]}"/>
- </field>
- <field name="partner_id" position="after">
- <field name="agent_id" string="Agente de seguro" attrs="{'invisible': [('policy','=', False)],'readonly': [('state','=', 'close')]}"/>
- </field>
- </field>
- </record>
- <record id="planned_works_tree" model="ir.ui.view">
- <field name="name">planned.works.tree</field>
- <field name="model">planned.work</field>
- <field name="arch" type="xml">
- <tree string="tareas">
- <field name="responsible" string="Responsable"/>
- <field name="work_id" string="Trabajo"/>
- <field name="planned_work" string="Actividad"/>
- <field name="work_date" string="Fecha"/>
- <field name="work_cost" string="Costo"/>
- <field name="completed" string="Estado"/>
- </tree>
- </field>
- </record>
- <record id="view_planned_work_filter" model="ir.ui.view">
- <field name="name">planned.work.filter</field>
- <field name="model">planned.work</field>
- <field name="arch" type="xml">
- <search string="Search Work">
- <field name="work_id" string="Tarea"/>
- <filter string="Terminados" name="completed" domain="[('completed', '=',True)]"/>
- <filter string="Pendientes" name="Pending" domain="[('completed', '=',False)]"/>
- <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/>
- <separator/>
- <group expand="0" string="Agrupar por ">
- <filter string="Responsale" name="responsible" context="{'group_by':'responsible'}"/>
- <filter string="Tarea" name="work_id" context="{'group_by':'work_id'}"/>
- </group>
- </search>
- </field>
- </record>
- <record id="planned_works_action" model="ir.actions.act_window">
- <field name="name">Todas las actividades</field>
- <field name="res_model">planned.work</field>
- <field name="view_mode">tree,form</field>
- </record>
- <record id="action_open_workshop_invoice" model="ir.actions.act_window">
- <field name="name">Facturas</field>
- <field name="res_model">account.invoice</field>
- <field name="domain">[('work_invoice_id','=',active_id)]</field>
- <field name="search_view_id" ref="account.view_account_invoice_filter" />
- </record>
- <record id="action_workshop_invoice_tree" model="ir.actions.act_window.view">
- <field name="sequence" eval="1"/>
- <field name="view_mode">tree</field>
- <field name="view_id" ref="account.invoice_tree"/>
- <field name="act_window_id" ref="action_open_workshop_invoice"/>
- </record>
- <record id="action_workshop_show_invoice_form" model="ir.actions.act_window.view">
- <field name="sequence" eval="2"/>
- <field name="view_mode">form</field>
- <field name="view_id" ref="account.invoice_form"/>
- <field name="act_window_id" ref="action_open_workshop_invoice"/>
- </record>
- <record id="view_invoice_workshop_form" model="ir.ui.view">
- <field name="name">car.brand.form</field>
- <field name="model">car.workshop</field>
- <field name="inherit_id" ref="eiru_base_for_services.worksheet_form_view"/>
- <field name="arch" type="xml">
- <field name="kanban_state" position="after">
- <div class="oe_right oe_button_box">
- <button
- class="oe_inline oe_stat_button"
- type="action"
- name="%(action_open_workshop_invoice)d"
- icon="fa-money">
- <field name="invoice_count" string="Facturas" widget="statinfo" />
- </button>
- </div>
- </field>
- </field>
- </record>
- <record id="view_car_workshop_form_draft" model="ir.ui.view">
- <field name="name">car.workshop.form.draft</field>
- <field name="model">car.workshop</field>
- <field name="inherit_id" ref="eiru_base_for_services.worksheet_form_view"/>
- <field name="arch" type="xml">
- <field name="stage_id" position="before">
- <button name="button_draft"
- states="cancel,workshop_create_invoices"
- string="Cambiar Estado"
- type="object"
- groups="base.group_no_one"/>
- </field>
- </field>
- </record>
-
- <menuitem name="Control de Actividades" parent="eiru_base_for_services.main_workshop_menu" id="planned_work_menu" sequence="3"/>
- <menuitem action="planned_works_action" id="menu_planned_works_action" parent="planned_work_menu"/>
- </data>
- </openerp>
|