odoo/ext/3rd-party-addons/website_customer_group/views/customer_group_view.xml

68 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2016-Present Webkul Software Pvt. Ltd. (<https://webkul.com/>) -->
<!-- See LICENSE file for full copyright and licensing details. -->
<!-- License URL : <https://store.webkul.com/license.html/> -->
<odoo>
<record model="ir.ui.view" id="customer_group_treeview">
<field name="name">Customer Group Form</field>
<field name="model">customer.group</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="name">
<field name="name"></field>
<field name="product_visible" />
<field name="product_cat_ids"></field>
<field name="create_date"></field>
</tree>
</field>
</record>
<record model="ir.ui.view" id="customer_group_formview">
<field name="name">customer Group Tree</field>
<field name="model">customer.group</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Group Configuration Form">
<sheet>
<field name="show_customers" invisible="1"/>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="toggle_show_hide" type="object" icon="fa-user" string="Show Customers" attrs="{'invisible':[('show_customers','==',True)]}"></button>
<button class="oe_stat_button" name="toggle_show_hide" type="object" icon="fa-times" attrs="{'invisible':[('show_customers','==',False)]}" string="Hide Customers"></button>
</div>
<group>
<label for="name" string="Name" />
<div name="name">
<div class="oe_inline">
<h2><field name="name" placeholder="Group Name" style="width:50%;" required="1"></field></h2>
</div>
</div>
<label for="product_visible" string="Visible Product on Website For This Group" />
<div name="product_visible">
<div class="oe_inline">
<field name="product_visible" widget="radio" nolabel="1" />
<field name="product_cat_ids" attrs="{'invisible':[('product_visible','==','all')]}" widget="many2many_tags" placeholder="Select Categories" />
</div>
</div>
<field name="group_pricelist_id" placeholder="Select Pricelist(optional)" />
</group>
<center><i class="fa fa-users fa-2x" style="margin-top:36px;" attrs="{'invisible':[('show_customers','==',False)]}"><label for="customer_ids" string="Customers in Group"/></i></center>
<field name="customer_ids" placeholder="ADD Customers" attrs="{'invisible':[('show_customers','==',False)]}" readonly="1" />
</sheet>
</form>
</field>
</record>
<record id="action_customer_group" model="ir.actions.act_window">
<field name="name">Customer Group</field>
<field name="res_model">customer.group</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="customer_group_treeview"></field>
</record>
<menuitem id="menu_cutomer_group" name="Customer Group" parent="sale.menu_sale_config" action="action_customer_group" sequence="1" />
</odoo>