123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?xml version="1.0"?>
- <openerp>
- <data>
- <!-- add can modify pries -->
- <record id="product_template_only_form_view" model="ir.ui.view">
- <field name="name">price_security.product.form</field>
- <field name="model">product.template</field>
- <field name="inherit_id" ref="product.product_template_only_form_view"/>
- <field name="arch" type="xml">
- <xpath expr="//page[@string='Information']/group/group" position="inside">
- <field name="can_modify_prices"/>
- </xpath>
- </field>
- </record>
- <record id="product_normal_form_view" model="ir.ui.view">
- <field name="name">price_security.product.form</field>
- <field name="model">product.product</field>
- <field name="inherit_id" ref="product.product_normal_form_view"/>
- <field name="arch" type="xml">
- <xpath expr="//page[@string='Information']/group/group" position="inside">
- <field name="can_modify_prices"/>
- </xpath>
- </field>
- </record>
- <!-- make readonly for group_restrict_prices -->
- <record id="product_readonly_template_only_form_view" model="ir.ui.view">
- <field name="name">price_security.product.form</field>
- <field name="model">product.template</field>
- <field name="inherit_id" ref="product_template_only_form_view"/>
- <field name="groups_id" eval="[(6, 0, [ref('group_restrict_prices')])]"/>
- <field name="arch" type="xml">
- <field name="list_price" position="attributes">
- <attribute name="readonly">1</attribute>
- </field>
- <field name="can_modify_prices" position="attributes">
- <attribute name="readonly">1</attribute>
- </field>
- </field>
- </record>
- <record id="product_readonly_normal_form_view" model="ir.ui.view">
- <field name="name">price_security.product.form</field>
- <field name="model">product.product</field>
- <field name="inherit_id" ref="product_normal_form_view"/>
- <field name="groups_id" eval="[(6, 0, [ref('group_restrict_prices')])]"/>
- <field name="arch" type="xml">
- <field name="lst_price" position="attributes">
- <attribute name="readonly">1</attribute>
- </field>
- <field name="can_modify_prices" position="attributes">
- <attribute name="readonly">1</attribute>
- </field>
- </field>
- </record>
- <record id="product_pricelist_form_view" model="ir.ui.view">
- <field name="name">product.pricelist.form</field>
- <field name="model">product.pricelist</field>
- <field name="inherit_id" ref="product.product_pricelist_view"/>
- <field name="arch" type="xml">
- <field name="active" position="after">
- <field name="sequence"/>
- </field>
- </field>
- </record>
- <record id="product_pricelist_view_tree" model="ir.ui.view">
- <field name="name">product.pricelist.tree</field>
- <field name="model">product.pricelist</field>
- <field name="inherit_id" ref="product.product_pricelist_view_tree"/>
- <field name="arch" type="xml">
- <field name="name" position="before">
- <field name="sequence" widget="handle"/>
- </field>
- </field>
- </record>
- </data>
- </openerp>
|