Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Hide upload button in odoo 18

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
salesuploadbuttons
2 Réponses
212 Vues
Avatar
Agent

I’m trying to hide the upload button, as many people may be seeing it (image attached).

And I found the files in the Odoo v18 repository where this functionality is added:

in account:

odoo/odoo/addons/account/static/src/components/account_file_uploader

odoo/odoo/addons/account/static/src/views/file_upload_list

in sales:

odoo/odoo/addons/sale/static/src/views/sale_onboarding_list

odoo/odoo/addons/sale/static/src/views/sale_onboarding_kanban
I’m trying to hide the button in the sales module for a specific group I created using JavaScript, but I’m not getting it to work.

Here’s my code:

/** u/odoo-module **/

import { patch } from “@web/core/utils/patch”;

import { SaleListRenderer } from “@sale/views/sale_onboarding_list/sale_onboarding_list_renderer”;

import { useService } from “@web/core/utils/hooks”;

patch(SaleListRenderer.prototype, {

setup() {

super.setup?.();

this.user = useService(“user”);

},

mounted() {

super.mounted?.();

if (this.user.hasGroup(“modulo.grupo_restringido”)) {

const uploadButton = this.el.querySelector(“.o_button_upload_bill, a”);

if (uploadButton) {

uploadButton.style.display = “none”;

}

}

},

});
First, I checked the console and found that o_button_upload_bill wasn’t there.
Then I tried using a query selector that did contain:

querySelector('button[data-hotkey="shift+i"]')

When I check the console to see if it finds the button using the second querySelector, I can’t get it to disappear for the group I set. Can someone please help me?

0
Avatar
Ignorer
Avatar
Nikhil Nakrani
Meilleure réponse

Hi Agent,

I hope you are doing well,

addons -> account module -> static -> src -> views -> account_move_list folder -> account_move_list_controller.xml

just comment out here for testing using account module upgrade.


Then you need revert the changes and inherit view in your custom module and remove that template.

Note : your custom module manifest file depends account module must be add.

No need any js file.

Thanks.

2
Avatar
Ignorer
Agent
Auteur

Hi Nikhil Nakrani!,
Thank you so much for your time, I'll be testing it!

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Meilleure réponse
Hi,


To hide a button in the account move list view, you can modify the QWeb template. One approach is to replace the entire section containing the upload button with an empty comment, effectively hiding it. Another option is to replace the button itself with an empty element, removing it from the view. The best method depends on the specific context and how the visibility of the button is controlled. After making changes, remember to clear your browser cache and restart the Odoo service.

Try the following code

<templates>

    <t t-name="account.AccountMoveListView.Buttons" t-inherit="account.FileuploadListView.Buttons" t-inherit-mode="primary">
        <xpath expr="//t[@t-call='account.DocumentViewUploadButton']" position="replace">
<!--            <t t-if="showUploadButton" t-call="account.AccountViewUploadButton"/>-->
        </xpath>
    </t>

</templates>


Hope it helps

1
Avatar
Ignorer
Agent
Auteur

Hi Cybrosys!
Thanks for your help, the idea is to hide the button for specific groups
I'll be testing the changes!!

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Where is the Sales Order Confirmation Email Button
sales email buttons
Avatar
Avatar
1
mars 15
8315
Subject: How to Import Combo Products with Options into Sale Orders via Excel (Multi-Company) – Odoo 18
sales product upload quotation
Avatar
0
juin 25
930
Cannot make Sales Quotation to one Customer
sales
Avatar
Avatar
2
nov. 25
400
How to allow quotation requests (RFQ) from the eCommerce instead of direct sales
sales
Avatar
Avatar
1
oct. 25
892
Products Image
sales
Avatar
Avatar
2
oct. 25
475
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now