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.
64 lines
3.0 KiB
64 lines
3.0 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Extended product_template_search_view-->
|
|
<record id="product_template_search_view" model="ir.ui.view">
|
|
<field name="name">product.template.view.search.inherit.subscription.package</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_search_view"/>
|
|
<field name="priority">25</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//filter[@name='filter_to_sell']" position="before">
|
|
<filter string="Is Subscription Product"
|
|
name="filter_is_subscription"
|
|
domain="[('is_subscription','=',True)]"/>
|
|
<separator/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<!-- Extended product_template_form_view-->
|
|
<record id="product_template_only_form_view" model="ir.ui.view">
|
|
<field name="name">product.template.view.form.inherit.subscription.package</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
|
<field name="priority">25</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//page[@name='sales']" position="after">
|
|
<page name="subscription" string="Subscription">
|
|
<group>
|
|
<group name="subscription" string="Subscription">
|
|
<field name="is_subscription"/>
|
|
<field name="subscription_plan_id" required="is_subscription == True"
|
|
invisible="is_subscription != True"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<!-- Product template action-->
|
|
<record id="product_template_kanban_view" 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">kanban,tree,form,activity</field>
|
|
<field name="view_id" ref="product.product_template_kanban_view"/>
|
|
<field name="search_view_id" ref="product.product_template_search_view"/>
|
|
<field name="context">{
|
|
'search_default_filter_is_subscription': True,
|
|
'search_default_filter_to_sell':1,
|
|
'default_detailed_type':'service',
|
|
'default_is_subscription':True}
|
|
</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new product
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<!-- main menu-->
|
|
<menuitem id="subscription_menu_subscription_products"
|
|
name="Products"
|
|
parent="subscription_package.subscription_menu_subscriptions"
|
|
action="subscription_package.product_template_kanban_view"
|
|
sequence="9"/>
|
|
</odoo>
|
|
|