123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <openerp>
- <data>
- <record id="car_car_form" model="ir.ui.view">
- <field name="name">car.car.form</field>
- <field name="model">car.car</field>
- <field name="arch" type="xml">
- <form string="Vehicle">
- <header>
- <field name="state" widget="statusbar" clickable="True"/>
- </header>
- <sheet string="Vehiculo">
- <div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
- <button class="oe_stat_button"
- icon="fa-tasks"
- name="%(fleet_car_workshop.worksheet_action_super_button)d"
- type="action">
- <field string="Tareas" name="task_count" widget="statinfo" />
- </button>
- </div>
- <div>
- <field name="image_medium" widget='image' class="oe_avatar"/>
- </div>
- <div class="oe_title">
- <h1>
- <field name="name" placeholder="Vehiculo"/>
- </h1>
- <div>
- <field name="use_tasks" class="oe_inline"/>
- <label for="use_tasks" class="oe_inline" string="Usar tareas"/>
- <span attrs="{'invisible':[('use_tasks', '=', False)]}">como </span>
- <field name="label_tasks" class="oe_inline oe_input_align" attrs="{'invisible': [('use_tasks', '=', False)]}"/>
- </div>
- </div>
- <notebook>
- <page string="Configuración">
- <group>
- <field name="partner_id" string="Cliente" domain="[('customer', '=', True)]"/>
- </group>
- </page>
- </notebook>
- </sheet>
- </form>
- </field>
- </record>
- <record id="view_car_car_filter" model="ir.ui.view">
- <field name="name">car.car.select</field>
- <field name="model">car.car</field>
- <field name="arch" type="xml">
- <search string="Search Vehicle">
- <field name="name" string="Nombre del vehiculo"/>
- <filter string="Abierto" name="Current" domain="[('state', '=','open')]"/>
- <filter string="Pendiente" name="Pending" domain="[('state', '=','pending')]"/>
- <separator/>
- <separator/>
- <group expand="0" string="Agrupar por ">
- <filter string="Cliente" name="Partner" context="{'group_by':'partner_id'}"/>
- </group>
- </search>
- </field>
- </record>
- <record model="ir.ui.view" id="view_car_car_kanban">
- <field name="name">car.car.kanban</field>
- <field name="model">car.car</field>
- <field name="arch" type="xml">
- <kanban class="oe_background_grey">
- <field name="name"/>
- <field name="use_tasks"/>
- <field name="color"/>
- <field name="task_count"/>
- <field name="label_tasks"/>
- <field name="task_ids"/>
- <field name="doc_count"/>
- <templates>
- <t t-name="kanban-box">
- <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project 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">Configurar</a></li></t>
- <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
- </ul>
- </div>
- <div class="oe_kanban_content">
- <h4 class="text-center"><strong><field name="name"/></strong></h4>
- <div class="o_kanban_image text-center">
- <img t-att-src="kanban_image('car.car', 'image_medium', record.id.value)"/>
- </div>
- <div class="oe_kanban_project_list">
- <div t-if="record.use_tasks.raw_value" class="o_project_kanban_box">
- <a name="%(fleet_car_workshop.worksheet_action_super_button)d" type="action" style="margin-right: 10px">
- <t t-raw="record.task_count.raw_value"/><t t-raw="record.label_tasks.raw_value" />
- </a>
- </div>
- </div>
- <div class="oe_kanban_project_list">
- <a t-if="record.doc_count.raw_value" name="attachment_tree_views" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>
- </div>
- </div>
- </div>
- </t>
- </templates>
- </kanban>
- </field>
- </record>
- <record id="view_car_car_tree" model="ir.ui.view">
- <field name="name">car.car.tree</field>
- <field name="model">car.car</field>
- <field name="field_parent">child_ids</field>
- <field name="arch" type="xml">
- <tree decoration-info="state in ('draft','pending')" decoration-muted="state in ('close','cancelled')" string="Vehicles">
- <field name="name" string="Nombre del vehiculo"/>
- <field name="partner_id" string="Cliente"/>
- <field name="state" string="Estado"/>
- </tree>
- </field>
- </record>
- <record id="open_view_vehicle_all" model="ir.actions.act_window">
- <field name="name">Vehiculos</field>
- <field name="res_model">car.car</field>
- <field name="view_type">form</field>
- <field name="domain">[]</field>
- <field name="view_mode">kanban,form</field>
- <field name="search_view_id" ref="view_car_car_filter"/>
- <field name="context">{'search_default_Current': 1}</field>
- </record>
- <record id="config_view_vehicle_all" model="ir.actions.act_window">
- <field name="name">Vehiculos</field>
- <field name="res_model">car.car</field>
- <field name="view_type">form</field>
- <field name="domain">[]</field>
- <field name="view_mode">tree,form</field>
- <field name="search_view_id" ref="view_car_car_filter"/>
- <field name="context">{'search_default_Current': 1}</field>
- </record>
- <menuitem name="Panel de Control" parent="main_workshop_menu" id="workshop_vehicles" sequence="1"/>
- <menuitem name="Todos los Vehiculos" parent="workshop_vehicles" id="workshop_all_vehicles" sequence="1" action="open_view_vehicle_all"/>
- <menuitem name="Vehiculos" action="config_view_vehicle_all" id="config_vehicle_view_action" parent="menu_worksheet_config" />
- </data>
- </openerp>
|