<commit_before><?xml version="1.0" encoding="UTF-8"?>
<openerp>
  <data>
    <!-- Price Units -->
    <record model="ir.ui.view" id="c2c_product_price_unit_form">
      <field name="name">c2c_product.price_unit.form</field>
      <field name="model">c2c_product.price_unit</field>
      <field name="priority">1</field>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <form string="Price Units">
          <field name="name" select="1"/>
          <field name="coefficient" select="1"/>
          <field name="code" select="1"/>
          <notebook colspan="4">
            <page string="invisible" invisible="1"/>
          </notebook>
        </form>
      </field>
    </record>
    <record model="ir.ui.view" id="c2c_product_price_unit_list">
      <field name="name">c2c_product.price_unit.list</field>
      <field name="model">c2c_product.price_unit</field>
      <field name="priority">1</field>
      <field name="type">tree</field>
      <field name="arch" type="xml">
        <tree string="Price Units" editable="bottom">
          <field name="coefficient" select="1"/>
          <field name="name" select="1"/>
          <field name="code" select="1"/>
        </tree>
      </field>
    </record>
    <record model="ir.actions.act_window" id="c2c_product_price_unit_act1">
      <field name="name">Price Units</field>
      <field name="res_model">c2c_product.price_unit</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
      <field name="view_id" ref="c2c_product_price_unit_list"/>
    </record>
    <record model="ir.actions.act_window.view" id="c2c_product_price_unit_act1_view2">
      <field name="sequence" eval="1"/>
      <field name="view_mode">tree</field>
      <field name="view_id" ref="c2c_product_price_unit_list"/>
      <field name="act_window_id" ref="c2c_product_price_unit_act1"/>
    </record>
    <record model="ir.actions.act_window.view" id="c2c_product_price_unit_act1_view1">
      <field name="sequence" eval="2"/>
      <field name="view_mode">form</field>
      <field name="view_id" ref="c2c_product_price_unit_form"/>
      <field name="act_window_id" ref="c2c_product_price_unit_act1"/>
    </record>
    <menuitem
      action="c2c_product_price_unit_act1"
      id="menu_c2c_product_price_unit_list"
      parent="product.prod_config_main"/>
    <!-- Price Units in Product Form-->
    <!--
    <record model="ir.ui.view" id="c2c_product_list_price_unit_view1">
      <field name="name">c2c_product.price_unit.view1</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="product.product_normal_form_view"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <xpath expr="/form/notebook/page[@name='Information']/group/field[@name='list_price']" position="replace"/>
      </field>
    </record>
-->
    <record model="ir.ui.view" id="c2c_product_price_unit_view2">
      <field name="name">c2c_product.price_unit.view2</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="stock.view_product_standard_price_form"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <field name="standard_price" position="replace">
          <group col="4" colspan="2">
            <field
	      attrs="{'readonly':[('cost_method','=','average')]}"
              name="standard_price_pu"
              nolabel="1"
              on_change="onchange_price_unit('standard_price',standard_price_pu,price_unit_id)"/>
            <field
              name="price_unit_id"
              on_change="onchange_price_unit('standard_price',standard_price_pu,price_unit_id)"
              widget="selection"/>
          </group>
          <!-- the following field should have this attr, but it is only visible to experts , so I do not handle this
     it must be writeable for now to allow onchange_price_unit to wirte AND save
            'readonly':[('cost_method','=','average')]}"
-->
          <field groups="c2c_product_price_unit.group_c2c_product_price_unit_manager" name="standard_price" nolabel="1"/>
        </field>
      </field>
    </record>
    <record model="ir.ui.view" id="c2c_product_list_price_unit_view1">
      <field name="name">c2c_product.price_unit.view1</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="product.product_normal_form_view"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <field name="list_price" position="replace">
          <label string="List Price:" align="1.0"/>
          <group col="2" colspan="1">
            <group col="4" colspan="2">
              <field
                name="list_price_pu"
                nolabel="1"
                on_change="onchange_price_unit('list_price',list_price_pu,list_price_unit_id)"/>
              <field
                name="list_price_unit_id"
                on_change="onchange_price_unit('list_price',list_price_pu,list_price_unit_id)"
                widget="selection"/>
            </group>
            <field nolabel="1" name="list_price" groups="c2c_product_price_unit.group_c2c_product_price_unit_manager"/>
          </group>
        </field>
      </field>
    </record>
  </data>
</openerp>
<commit_msg>[REF] price unit in product tree view<commit_after><?xml version="1.0" encoding="UTF-8"?>
<openerp>
  <data>
    <!-- ******************
         Price Units 
         ******************-->
    <record model="ir.ui.view" id="c2c_product_price_unit_form">
      <field name="name">c2c_product.price_unit.form</field>
      <field name="model">c2c_product.price_unit</field>
      <field name="priority">1</field>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <form string="Price Units">
          <field name="name" select="1"/>
          <field name="coefficient" select="1"/>
          <field name="code" select="1"/>
          <notebook colspan="4">
            <page string="invisible" invisible="1"/>
          </notebook>
        </form>
      </field>
    </record>
    <record model="ir.ui.view" id="c2c_product_price_unit_list">
      <field name="name">c2c_product.price_unit.list</field>
      <field name="model">c2c_product.price_unit</field>
      <field name="priority">1</field>
      <field name="type">tree</field>
      <field name="arch" type="xml">
        <tree string="Price Units" editable="bottom">
          <field name="coefficient" select="1"/>
          <field name="name" select="1"/>
          <field name="code" select="1"/>
        </tree>
      </field>
    </record>
    <record model="ir.actions.act_window" id="c2c_product_price_unit_act1">
      <field name="name">Price Units</field>
      <field name="res_model">c2c_product.price_unit</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
      <field name="view_id" ref="c2c_product_price_unit_list"/>
    </record>
    <record model="ir.actions.act_window.view" id="c2c_product_price_unit_act1_view2">
      <field name="sequence" eval="1"/>
      <field name="view_mode">tree</field>
      <field name="view_id" ref="c2c_product_price_unit_list"/>
      <field name="act_window_id" ref="c2c_product_price_unit_act1"/>
    </record>
    <record model="ir.actions.act_window.view" id="c2c_product_price_unit_act1_view1">
      <field name="sequence" eval="2"/>
      <field name="view_mode">form</field>
      <field name="view_id" ref="c2c_product_price_unit_form"/>
      <field name="act_window_id" ref="c2c_product_price_unit_act1"/>
    </record>
    <menuitem
      action="c2c_product_price_unit_act1"
      id="menu_c2c_product_price_unit_list"
      parent="product.prod_config_main"/>
    <!-- ******************
         Price Units in Product Form
         ******************-->
<!--
    <record model="ir.ui.view" id="c2c_product_list_price_unit_view1">
      <field name="name">c2c_product.price_unit.view1</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="product.product_normal_form_view"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <xpath expr="/form/notebook/page[@name='Information']/group/field[@name='list_price']" position="replace"/>
      </field>
    </record>
-->
    <record model="ir.ui.view" id="c2c_product_price_unit_view2">
      <field name="name">c2c_product.price_unit.view2</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="stock.view_product_standard_price_form"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <field name="standard_price" position="replace">
          <group col="4" colspan="2">
            <field
	      attrs="{'readonly':[('cost_method','=','average')]}"
              name="standard_price_pu"
              nolabel="1"
              on_change="onchange_price_unit('standard_price',standard_price_pu,price_unit_id)"/>
            <field
              name="price_unit_id"
              on_change="onchange_price_unit('standard_price',standard_price_pu,price_unit_id)"
              widget="selection"/>
          </group>
          <!-- the following field should have this attr, but it is only visible to experts , so I do not handle this
     it must be writeable for now to allow onchange_price_unit to wirte AND save
            'readonly':[('cost_method','=','average')]}"
-->
          <field groups="c2c_product_price_unit.group_c2c_product_price_unit_manager" name="standard_price" nolabel="1"/>
        </field>
      </field>
    </record>
    <!-- ******************
         Price Units in Product form
         ******************-->
    <record model="ir.ui.view" id="c2c_product_list_price_unit_view1">
      <field name="name">c2c_product.price_unit.view1</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="product.product_normal_form_view"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <field name="list_price" position="replace">
          <label string="List Price:" align="1.0"/>
          <group col="2" colspan="1">
            <group col="4" colspan="2">
              <field
                name="list_price_pu"
                nolabel="1"
                on_change="onchange_price_unit('list_price',list_price_pu,list_price_unit_id)"/>
              <field
                name="list_price_unit_id"
                on_change="onchange_price_unit('list_price',list_price_pu,list_price_unit_id)"
                widget="selection"/>
            </group>
            <field nolabel="1" name="list_price" groups="c2c_product_price_unit.group_c2c_product_price_unit_manager"/>
          </group>
        </field>
      </field>
    </record>
    <!-- ******************
         Price Units in Product Tree
         ******************-->
    <record model="ir.ui.view" id="product_product_pu_tree_view">
      <field name="name">product.product.pu.tree</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="product.product_product_tree_view"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <field name="standard_price" position="replace">
        <field name="standard_price" groups="c2c_product_price_unit.group_c2c_product_price_unit_manager" />
        <field name="standard_price_pu" />
        <field name="price_unit_id" />
        </field>
      </field>
    </record>
    <!-- ******************
         Price Units in Product Tree
         ******************-->
    <record model="ir.ui.view" id="product_product_pu2_tree_view">
      <field name="name">product.product.pu2.tree</field>
      <field name="model">product.product</field>
      <field name="inherit_id" ref="product.product_product_tree_view"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <field name="lst_price" position="replace">
        <field name="lst_price" groups="c2c_product_price_unit.group_c2c_product_price_unit_manager" />
        <field name="list_price_pu" />
        <field name="list_price_unit_id" />
        </field>
      </field>
    </record>




  </data>
</openerp>

{'fraction_non_alphanumeric': 0.16865611043442955, 'fraction_numerical': 0.011530653674380836, 'mean_word_length': 3.09577652144995, 'pattern_counts': {'":': 0, '<': 284, '<?xml version=': 2, '>': 284, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5511803', 'n_tokens_mistral': 3952, 'n_tokens_neox': 3902, 'n_words': 609}