<?xml version="1.0"?>
<odoo>
  <record id="product_product_action" model="ir.actions.act_window">
    <field name="name">Services</field>
    <field name="res_model">product.product</field>
    <field name="view_mode">kanban,tree,form</field>
    <field name="context">
      {
      "search_default_services": 1,
      "default_detailed_type": "service",
      "default_purchase_ok": false,
      }
    </field>
  </record>

  <record id="product_product_view_search" model="ir.ui.view">
    <field name="name">produt.product.view.search</field>
    <field name="model">product.product</field>
    <field name="priority" eval="3"/>
    <field name="arch" type="xml">
      <search string="Services">
        <field name="name" string="Service"/>
        <separator/>
        <filter string="Services" name="services" domain="[('type', '=', 'service')]"/>
        <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
      </search>
    </field>
  </record>

  <record id="product_product_view_form" model="ir.ui.view">
    <field name="name">produt.product.view.form</field>
    <field name="model">product.product</field>
    <field name="inherit_id" ref="product.product_normal_form_view" />
    <field name="priority" eval="3"/>
    <field name="arch" type="xml">
      <xpath expr="//div[@name='standard_price_uom']" position="after">
        <field name="labor_hours" class="oe_inline" readonly="detailed_type not in ['service']"/>
      </xpath>
    </field>
  </record>

  <record id="product_product_view_tree" model="ir.ui.view">
    <field name="name">produt.product.view.tree</field>
    <field name="model">product.product</field>
    <field name="priority" eval="3"/>
    <field name="arch" type="xml">
      <tree string="Products">
        <field name="default_code" optional="show" readonly="1"/>
        <field name="barcode" optional="hide" readonly="1"/>
        <field name="name" readonly="1"/>
        <field name="product_template_attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant" readonly="1"/>
        <field name="company_id" groups="base.group_multi_company" optional="hide" readonly="1"/>
        <field name="lst_price" optional="show" string="Sales Price"/>
        <field name="standard_price" optional="show"/>
        <field name="labor_hours" optional="show"/>
        <field name="categ_id" optional="hide"/>
        <field name="type" optional="hide" readonly="1"/>
        <field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" optional="show" readonly="1"/>
        <field name="product_tmpl_id" invisible="1" readonly="1"/>
        <field name="active" invisible="1"/>
      </tree>
    </field>
  </record>
</odoo>
