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.
253 lines
16 KiB
253 lines
16 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<!-- form view -->
|
|
<record model="ir.ui.view" id="master_search_form">
|
|
<field name="name">Search</field>
|
|
<field name="model">master.search</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Search">
|
|
<style>
|
|
.o_control_panel{display: none;}
|
|
</style>
|
|
<script>
|
|
$(document).ready(function(){
|
|
// Disable click events of tree view for history
|
|
$(".disable_open").unbind("click");
|
|
if ($(".oe_search_bgnd").length > 0){document.title = 'Search';}
|
|
});
|
|
</script>
|
|
<sheet>
|
|
<div class="row oe_search_bgnd"
|
|
style="padding: 24px 32px;background-color:#e5e4f9;border-radius: 5px;">
|
|
<div class="col-12 col-md-8 col-xl-8">
|
|
<label for="search_string" string="Search " style="display: inline-block;"
|
|
class="oe_read_only"/>
|
|
<field name="search_string" default_focus="1" class="search_input"
|
|
style="width: 80%; display: inline-block;margin-right: 0px;block-size: 32px;"
|
|
placeholder="Type here to search.."/>
|
|
<button name="action_clear_search"
|
|
type="object" class="fa fa-times oe_edit_only btn_master_search"/>
|
|
<button name="action_search"
|
|
type="object"
|
|
class="fa fa-search oe_search_btn btn_master_search oe_edit_only"/>
|
|
<div class="not-allowed">Regular expressions are not allowed in search!</div>
|
|
<div>
|
|
<label for="match_entire" string="Match Phrase :" style="display: inline-block;"/>
|
|
<field name="match_entire" style="display: inline-block; margin-left: 10px;"/>
|
|
</div>
|
|
<div style="display: block;">
|
|
<label for="search_by" string="Search For :" class="oe_read_only"/>
|
|
<field name="search_by" widget="radio" options="{'horizontal': true}"/>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-md-4 col-xl-4">
|
|
<div style="display: block;">
|
|
<label for="search_mode" string="Mode :" class="oe_read_only"/>
|
|
<field name="search_mode" widget="radio" nolabel="1"
|
|
options="{'horizontal': false}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Recent Searches
|
|
<div style="float: right;">
|
|
<field name="history_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
|
|
<field name="master_search_ids">
|
|
<tree create="0" class="disable_open">
|
|
<field name="search_string" class="re_search oe_key"/>
|
|
<field name="search_mode" string="Mode" class="re_search"/>
|
|
<field name="search_by" string="Type" class="re_search"/>
|
|
<!--<field name="create_date" string="Date" optional="hide" class="re_search"/>-->
|
|
<button style="display: inline-block;" name="action_unlink_search"
|
|
type="object" class="fa fa-trash"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
|
|
<div attrs="{'invisible':[('search_by', 'not in', ('any', 'customer'))]}" class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Customer Search Results
|
|
<div style="float: right;">
|
|
<field name="customer_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
|
|
<field name="customer_ids">
|
|
<tree create="0" delete="0">
|
|
<field name="name"/>
|
|
<field name="email"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
<div attrs="{'invisible':[('search_by', 'not in', ('any', 'product'))]}" class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Product Search Results
|
|
<div style="float: right;">
|
|
<field name="product_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree"
|
|
name="products">
|
|
<field name="product_ids">
|
|
<tree create="0" delete="0">
|
|
<field name="name" string="Name"/>
|
|
<field name="default_code" string="Code"/>
|
|
<field name="description" string="Description"/>
|
|
<field name="type" string="Product Type"/>
|
|
<field name="categ_id" string="Category"/>
|
|
<field name="uom_id" string="Base UoM" optional="hide"/>
|
|
<field name="qty_available" string="Stock"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
<div attrs="{'invisible':[('search_by', 'not in', ('any', 'transaction details'))]}"
|
|
class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Inventory Search Results
|
|
<div style="float: right;">
|
|
<field name="transaction_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
|
|
<field name="transaction_details">
|
|
<tree create="0" delete="0">
|
|
<field name="name" string="Trans. # "/>
|
|
<field name="date_done" string="Transaction Date"/>
|
|
<field name="picking_type_id" string="Transaction Type"/>
|
|
<field name="partner_id" string="Reference Name"/>
|
|
<field name="state" string="Transaction Status"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
<div attrs="{'invisible':[('search_by', 'not in', ('any', 'sale details'))]}"
|
|
class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Sale Search Results
|
|
<div style="float: right;">
|
|
<field name="sale_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
|
|
<field name="sale_details">
|
|
<tree create="0" delete="0">
|
|
<field name="name" string="Trans. # "/>
|
|
<field name="partner_id" string="Customer"/>
|
|
<field name="pricelist_id" string="Pricelist"/>
|
|
<field name="payment_term_id" string="Payment Term"/>
|
|
<field name="state" string="Status"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
<div attrs="{'invisible':[('search_by', 'not in', ('any', 'purchase details'))]}"
|
|
class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Purchase Search Results
|
|
<div style="float: right;">
|
|
<field name="purchase_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
|
|
<field name="purchase_details">
|
|
<tree create="0" delete="0">
|
|
<field name="name" string="Trans. # "/>
|
|
<field name="partner_id" string="Customer"/>
|
|
<field name="state" string="Status"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
<div attrs="{'invisible':[('search_by', 'not in', ('any', 'account details'))]}"
|
|
class="oe_result_div">
|
|
<div style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
|
|
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
|
|
class="oe_search_tab">
|
|
Accounting Search Results
|
|
<div style="float: right;">
|
|
<field name="account_count" class="oe_tab_count" readonly="1"/>
|
|
Records Found
|
|
<span class="oe_drop_down">
|
|
<i style="color: #fff !important; font-size: 16px;" class="fa fa-caret-down"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
|
|
<field name="account_details">
|
|
<tree create="false" delete="false" edit="false">
|
|
<field name="name" string="Trans. # "/>
|
|
<field name="partner_id" string="Customer"/>
|
|
<field name="state" string="Status"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</div>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<!-- actions opening views on models -->
|
|
<record model="ir.actions.act_window" id="master_search_action">
|
|
<field name="name">Search</field>
|
|
<field name="res_model">master.search</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="context">{'active_test': False, 'search_default_filter_active': 1}</field>
|
|
</record>
|
|
|
|
<!-- Search root menu -->
|
|
<menuitem id="master_search_root" name="Search" action="master_search_action"
|
|
web_icon="master_search,static/description/icon.png"
|
|
sequence="2" groups="master_search.master_search_read"/>
|
|
</data>
|
|
</odoo>
|
|
|