Good day everyone, could you help me with the code to hide the client selection button in the Odoo 18 post, I have been trying but I have not been able to achieve it, I have seen tutorials but unfortunately only for Odoo 16 and it does not serve as an example, I understand that I must create two files, a js and an xml, but I still do not get results, in the same way know how I can modify this in the Odoo views from the graphical interface, thanks for your support.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
1
Beantwoorden
906
Weergaven
Step-by-Step Implementation:
1.Create a custom module
Directory structure:
pos_hide_customer_button/ ├── __init__.py ├── __manifest__.py ├── static/ │ └── src/ │ └── js/ │ └── pos_hide_customer_button.js ├── views/ │ └── assets.xml
2. __manifest__.py
{ 'name': 'POS Hide Customer Button', 'version': '1.0', 'category': 'Point of Sale', 'summary': 'Hide customer button in POS screen', 'depends': ['point_of_sale'], 'data': [ 'views/assets.xml', ], 'assets': { 'point_of_sale._assets_pos': [ 'pos_hide_customer_button/static/src/js/pos_hide_customer_button.js', ], }, 'installable': True, 'auto_install': False, 'license': 'LGPL-3', }
3. views/assets.xml
<?xml version="1.0" encoding="UTF-8"?> <odoo> <template id="assets_pos" inherit_id="point_of_sale.assets"> <xpath expr="." position="inside"> <script type="module" src="/pos_hide_customer_button/static/src/js/pos_hide_customer_button.js"/> </xpath> </template> </odoo>
4. static/src/js/pos_hide_customer_button.js
/** @odoo-module **/ import { PosComponent } from "@point_of_sale/app/components/pos_component"; import ProductScreen from "@point_of_sale/app/screens/product_screen/product_screen"; import { patch } from "@web/core/utils/patch"; patch(ProductScreen.prototype, { setup() { super.setup(); // Hide the customer button by not rendering it at all this.showCustomerButton = false; }, });
5. Restart and Update
Or update from the Apps menu:
- Activate Developer Mode.
- Go to Apps > Update Apps List.
- Search POS Hide Customer Button and install it.
Optional: Hide via Odoo Studio (GUI)
If you have Odoo Studio (Enterprise) :
- Open POS > Settings > UI Configuration.
- Use Studio to edit the POS screen.
- Try hiding the customer button by editing screen widgets. (This is limited; not always available for POS.)
Thanks & Regards,
Email: contact@datainteger.com
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
1
mrt. 24
|
2567 | ||
How to open POS from another module?
Opgelost
|
|
1
nov. 18
|
4718 | |
|
2
mrt. 15
|
4507 | ||
|
1
jun. 25
|
933 | ||
|
2
feb. 25
|
1613 |
Thanks a lot it works