Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

Hide the new Sales button in Odoo 17

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
salesdebugattrs
1 Відповісти
1583 Переглядів
Аватар
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
Аватар
Відмінити
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
Автор

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
Автор

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
Автор

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
Автор

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
Автор

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.

Аватар
Cybrosys Techno Solutions Pvt.Ltd
Найкраща відповідь

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
Аватар
Відмінити
Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Related Posts Відповіді Переглядів Дія
How to hide units of measure in PDF reports?
sales debug pdf
Аватар
Аватар
Аватар
3
жовт. 25
656
How to keep footer always at the bottom of the very last page in QWeb PDF report
sales debug pdf
Аватар
Аватар
Аватар
2
серп. 25
1337
POS error -invalid field, res.partnert.phone_mobile_search in leaf-
configuration sales debug
Аватар
Аватар
1
лют. 25
1888
how to put fields under a single condition in form view (odoo version 17)
development accounting debug attrs
Аватар
Аватар
Аватар
2
черв. 25
3599
How do you get shop_id from company_id?
attrs
Аватар
Аватар
Аватар
2
лист. 25
218
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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