LaOsaCoop/Odoo16#14 add pos_hide_customerlist

This commit is contained in:
Luis 2025-05-12 12:17:37 +02:00
parent ebb6b6efce
commit 468e3267ec
3 changed files with 36 additions and 0 deletions

View file

View 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",
}

View 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);