LaOsaCoop/Odoo16#14 add pos_hide_customerlist
This commit is contained in:
parent
ebb6b6efce
commit
468e3267ec
3 changed files with 36 additions and 0 deletions
0
pos_hide_partnerlist/__init__.py
Normal file
0
pos_hide_partnerlist/__init__.py
Normal file
17
pos_hide_partnerlist/__manifest__.py
Normal file
17
pos_hide_partnerlist/__manifest__.py
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"name": "POS Hide Customer List Until Search",
|
||||||
|
"version": "16.0.1.0.0",
|
||||||
|
"summary": "Hide the customer list until the search bar is used",
|
||||||
|
"category": "Point of Sale",
|
||||||
|
"author": "Criptomart",
|
||||||
|
"website": "",
|
||||||
|
"depends": ["point_of_sale"],
|
||||||
|
"assets": {
|
||||||
|
"point_of_sale.assets": [
|
||||||
|
"pos_hide_partnerlist/static/src/js/HideCustomerList.js",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"installable": True,
|
||||||
|
"application": False,
|
||||||
|
"license": "LGPL-3",
|
||||||
|
}
|
||||||
19
pos_hide_partnerlist/static/src/js/HideCustomerList.js
Normal file
19
pos_hide_partnerlist/static/src/js/HideCustomerList.js
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
/** @odoo-module **/
|
||||||
|
|
||||||
|
import {Component} from "point_of_sale.Registries";
|
||||||
|
import PartnerListScreen from "point_of_sale.PartnerListScreen";
|
||||||
|
|
||||||
|
|
||||||
|
export const HidePartnerListScreen = (PartnerListScreen) =>
|
||||||
|
class extends PartnerListScreen {
|
||||||
|
|
||||||
|
get partners() {
|
||||||
|
if (!this.state.query ){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return super.partners;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Component.extend(PartnerListScreen, HidePartnerListScreen);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue