You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

155 lines
8.3 KiB

<openerp>
<data>
<record id="product_template_share_form_view" model="ir.ui.view">
<field name="name">product.template.share.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="purchase.view_product_supplier_inherit"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_energiris_super_manager">
<field name="is_share"/>
<label for="is_share"/>
</div>
<div attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user">
<field name="display_on_website"/>
<label for="display_on_website"/>
</div>
</xpath>
</field>
</record>
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.common.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="short_name" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="default_share_product" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="force_min_qty" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="minimum_quantity" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="customer" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="by_company" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="by_individual" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="mail_template" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
</xpath>
</field>
</record>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.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">
<field name="default_code" position="attributes">
<attribute name="attrs">{'required': [('is_share', '=', True)]}</attribute>
</field>
</field>
</record>
<record id="share_product_action" model="ir.actions.act_window">
<field name="name">Share type</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<!-- <field name="context">{"search_default_filter_to_purchase":1}</field> -->
<field name="search_view_id" eval="False"/> <!-- Force empty -->
<field name="view_id" eval="False"/> <!-- Force empty -->
<field name="domain">[('is_share','=',True)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new share product.
</p>
</field>
</record>
<!-- overriding product views to not display share product in the purchase and sale views-->
<record id="product.product_normal_action" model="ir.actions.act_window">
<field name="name">Product</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="product.product_search_form_view"/>
<field name="view_id" eval="False"/> <!-- Force empty -->
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you sell, whether it's
a physical product, a consumable or a service you offer to
customers.
</p><p>
The product form contains information to simplify the sale
process: price, notes in the quotation, accounting data,
procurement methods, etc.
</p>
</field>
</record>
<record id="product.product_template_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="view_id" ref="product.product_template_kanban_view"/>
<field name="context">{"search_default_filter_to_sell":1}</field>
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you sell, whether it's a physical product, a consumable or a service you offer to customers.
</p><p>
The product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc.
</p>
</field>
</record>
<record id="product.product_template_action_product" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="context">{"search_default_products": 1, 'default_type': 'product'}</field>
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p>
</field>
</record>
<record id="product.product_normal_action_puchased" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"search_default_filter_to_purchase":1}</field>
<field name="search_view_id" eval="False"/> <!-- Force empty -->
<field name="view_id" eval="False"/> <!-- Force empty -->
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you purchase, whether
it's a physical product, a consumable or services you buy to
subcontractants.
</p><p>
The product form contains detailed information to improve the
purchase process: prices, procurement logistics, accounting data,
available vendors, etc.
</p>
</field>
</record>
</data>
</openerp>