@ -13,36 +13,25 @@
<script >
$(document).ready(function(){
$(".disable_open").unbind("click");
if ($(".oe_search_bgnd").length > 0){document.title = 'Search';}
$("#recent_searches").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#customer_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#product_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#inventory_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#sale_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#purchase_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#accounting_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
if ($(".oe_search_bgnd").length > 0){document.title =
'Search';}
function toggleDetailsTree($target) {
var element =
$target.closest('.oe_result_div').find('.oe_details_tree');
element.toggleClass('oe_details_tree--show');
}
$(document).on("click", ".expand_tile", function(event)
{
var $target = $(event.target);
if ($target.hasClass('expand_tile')) {
toggleDetailsTree($target);
} else if ($target.hasClass('history')) {
toggleDetailsTree($target);
} else if ($target.hasClass('dropdown')) {
toggleDetailsTree($target);
}
});
$('.o_radio_input').on('change', function(){
let targetEl = $(this).data().value;
$('.oe_details_tree').addClass('d-none');
@ -109,31 +98,43 @@
<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;"
<label for= "search_string" string= "Search "
style="display: inline-block;"
class="oe_read_only"/>
<field name= "search_string" default_focus= "1" class= "search_input"
<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" title="Search" class="fa fa-times oe_edit_only btn_master_search"/>
type="object" title="Search"
class="fa fa-times oe_edit_only btn_master_search"/>
<button name= "action_search"
type="object"
title="Search"
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 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;" />
<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}" />
<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"
<label for= "search_mode" string= "Mode :"
class="oe_read_only"/>
<field name= "search_mode" widget= "radio"
nolabel="1"
options="{'horizontal': false}"/>
</div>
</div>
@ -142,46 +143,60 @@
<div class= "oe_result_div" >
<div id= "recent_searches" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab" >
class="oe_search_tab expand_tile ">
Recent Searches
<div style= "float: right;" >
<field name= "history_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down"
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"
/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree" >
<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= "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"
title="Search" type="object" class="fa fa-trash"/>
<button style= "display: inline-block;"
name="action_unlink_search"
title="Search" type="object"
class="fa fa-trash"/>
</tree>
</field>
</div>
</div>
<div class= "oe_result_div" >
<div id= "customer_search_results" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
<div id= "customer_search_results"
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 accordion_tab">
class="oe_search_tab accordion_tab expand_tile ">
Customer Search Results
<div style= "float: right;" >
<field name= "customer_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down"
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"
/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree" >
<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" string= "Name" />
@ -193,27 +208,37 @@
<div class= "oe_result_div" >
<div id= "product_search_results" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
class="oe_search_tab accordion_tab expand_tile ">
Product Search Results
<div style= "float: right;" >
<field name= "product_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down" />
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree"
<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" />
<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>
@ -221,25 +246,33 @@
<div class= "oe_result_div" >
<div id= "inventory_search_results" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
class="oe_search_tab accordion_tab expand_tile ">
Inventory Search Results
<div style= "float: right;" >
<field name= "transaction_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down" />
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree" >
<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" />
<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>
@ -247,24 +280,31 @@
<div class= "oe_result_div" >
<div id= "sale_search_results" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
class="oe_search_tab accordion_tab expand_tile ">
Sale Search Results
<div style= "float: right;" >
<field name= "sale_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down" />
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree" >
<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= "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>
@ -273,22 +313,27 @@
<div class= "oe_result_div" >
<div id= "purchase_search_results" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
class="oe_search_tab accordion_tab expand_tile ">
Purchase Search Results
<div style= "float: right;" >
<field name= "purchase_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down" />
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree" >
<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= "partner_id"
string="Customer"/>
<field name= "state" string= "Status" />
</tree>
</field>
@ -297,22 +342,28 @@
<div class= "oe_result_div" >
<div id= "accounting_search_results" style= "background-color: # 5 f 5 e 9 7 ; c o l o r : # f f f ; w i d t h : 1 0 0 % ; p a d d i n g : 5 p x 1 0 p x ;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
class="oe_search_tab accordion_tab expand_tile ">
Accounting Search Results
<div style= "float: right;" >
<field name= "account_count" class= "oe_tab_count" readonly= "1" />
<div class= "history" 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;" title= "Search" class= "fa fa-caret-down" />
<i style= "color: #fff !important; font-size: 16px;"
title="Search"
class="fa fa-caret-down dropdown"/>
</span>
</div>
</div>
<div style= "height: 200px; overflow-y: scroll;width: 100%;" class= "oe_details_tree" >
<div style= "height: 200px; overflow-y: scroll;width: 100%;"
class="oe_details_tree">
<field name= "account_details" >
<tree create= "false" delete= "false" edit= "false" >
<tree create= "false" delete= "false"
edit="false">
<field name= "name" string= "Trans. # " />
<field name= "partner_id" string= "Customer" />
<field name= "partner_id"
string="Customer"/>
<field name= "state" string= "Status" />
</tree>
</field>
@ -329,11 +380,14 @@
<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>
<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"
<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>