Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Hide the new Sales button in Odoo 17

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
salesdebugattrs
1 Răspunde
1582 Vizualizări
Imagine profil
Audaldo Hackins

Create a new group

Hide new

Hide new has the person who shouldn't see the button

Show new

Views are shown

I put this code referencing the button name and the other one referencing the tree, but they don't work for me.

<xpath expr="//header/button[@name='316']" position="attributes">

  <attribute name="groups">sales_team.ocultar_nuevo</attribute>

</xpath>

<!--

<xpath expr="//tree" position="attributes" groups="sales_team.ocultar_nuevo">

  <attribute name="create">false</attribute>

</xpath>-->

<xpath expr="//header/button[@name='316']" position="attributes">

  <attribute name="groups">sales_team.mostrar_nuevo</attribute>

</xpath>

<!--

<xpath expr="//tree" position="attributes" groups="sales_team.mostrar_nuevo">

  <attribute name="create">true</attribute>

</xpath>-->

I even looked for the main view sale.order and added the group there and it still doesn't show up, that was the first thing I did before creating the inherited views



Thank you very much for everything, and I hope you can help me.

Best regards



0
Imagine profil
Abandonează
Christoph Farnleitner

In your screens you're applying a group on the Create Invoice button / refer to an action 316 (Create invoice in your setup), in the subject you talk about new Sales. What do you want to accomplish exactly? Do you want to prevent specific users from creating Sale Orders? Because this should be handled by groups only - without any view modification. For this to be a meaningful setup in terms of the general structure, you may refer to https://www.odoo.com/de_DE/forum/hilfe-1/new-group-in-the-sales-category-in-odoo-17-279845#answer-279850 (different topic, but it outlines how groups in general interact with each other). In short, you probably want to define a group prior to group_sale_salesman_all_leads, i.e. group_sale_salesman_all_leads_read_only and set it and its predecessors 1,0,0,0 (read only - or 1,1,0,0 read and write but no create).

Audaldo Hackins
Autor

That's right, I wish people in groups couldn't create sell orders.
I had created two groups, one for hiding and one for viewing. I did this because when I hid the person and removed them from the hide group, they wouldn't see the button again.

Audaldo Hackins
Autor

I really just want to hide the New button.

I was doing this based on a group; I created two because when I hid and removed the person from the group, they wouldn't see the button even though they weren't part of that group.

The question is, is it possible to do it on the

<xpath expr="//header/button[@name='316']" position="attributes">

Or on this

<attribute name="groups">sales_team.show_new</attribute>


</xpath>

Audaldo Hackins
Autor

Thanks for your response.

The issue is, if the person is in the CRM module and needs to create a quote, they do this based on the sale.order module. Since the checkbox is not selected, an error will be thrown. How can this be resolved with your module, or how would it be done?

Christoph Farnleitner

'That's right, I wish people in groups couldn't create sell orders.' and 'I really just want to hide the New button.' - which one is it? When randomly changing requirements, things get messy - and cumbersome. Consider phrasing a new question that covers all the aspects of what you actually want to achieve and what you've done so far to try to achieve it.
Also, the question 'Why are we even trying to do this?' seems fair at this point: 'Users should be able to create SO - but only from those buttons I want them to use.' - why is that? What kind of users are we dealing with? Are these external sales persons meant to work on assigned leads only? Should they then really not be able to provide you with new Sales when they just happen to know someone who wants to buy your goods or services?

Audaldo Hackins
Autor

This is the code that hides the button again.
<xpath expr="//tree" position="attributes" groups="sales_team.ocultar_nuevo">
<attribute name="create">false</attribute>
</xpath>

Audaldo Hackins
Autor

Thank you very much.

I understood what you were saying about groups and levels. Just one question: when creating the group and making the call in the view inherited from sale.order.tree, why is the button hidden once if the user hasn't been added to the group?

Oh, yes, I created the group as a technical group.

Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,


To hide the new button in the 'sale.order', you must remove the create access for the user group.

1- Enable developer mode.

2- Go to the user group.

      Settings > Users & Companies > Groups 

      You can just select your user group that needs to hide the New button.

3- Disable the create access for the sales model as follows.



4-  If you log in as the user in that user group, you can see that the 'New' button is invisible.


Hope it helps

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to hide units of measure in PDF reports?
sales debug pdf
Imagine profil
Imagine profil
Imagine profil
3
oct. 25
655
How to keep footer always at the bottom of the very last page in QWeb PDF report
sales debug pdf
Imagine profil
Imagine profil
Imagine profil
2
aug. 25
1336
POS error -invalid field, res.partnert.phone_mobile_search in leaf-
configuration sales debug
Imagine profil
Imagine profil
1
feb. 25
1888
how to put fields under a single condition in form view (odoo version 17)
development accounting debug attrs
Imagine profil
Imagine profil
Imagine profil
2
iun. 25
3596
How do you get shop_id from company_id?
attrs
Imagine profil
Imagine profil
Imagine profil
2
nov. 25
218
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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