Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

How to Hide Cost Price and Sale Price for Users in Inventory and Manufacturing(Odoo 18 Community)

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
manufacturinginventory
3 Odpowiedzi
5101 Widoki
Awatar
ACTION CHIM

Hello,

I am using Odoo 18 Community Edition and I want to restrict certain users from viewing the cost price and sale price in the Inventory and Manufacturing modules. Is there a way to achieve this using access rights or record rules?


Thanks in advance

1
Awatar
Odrzuć
ACTION CHIM
Autor

Thanks for your answer! I am new to Odoo. Could you please provide a step-by-step guide on how to implement this?

Chris TRINGHAM

You can search for more detailed answers, but you need to understand how Odoo works and that is beyond the scope of a Help question and answer (in my opinion). I did write one more detailed answer a while back (https://www.odoo.com/forum/help-1/re-how-to-disable-update-cost-on-sales-user-176326/#answer-176326) and there is some useful information on my website http://odootricks.tips/

Awatar
Chris TRINGHAM
Najlepsza odpowiedź

Yes, you can limit access based on User Access Groups, something like this (in an Extension View):

<data>
  <xpath expr="//field[@name='order_line']" position="attributes">
    <attribute name="groups">base.group_erp_manager</attribute>
  </xpath>

</data>
0
Awatar
Odrzuć
Awatar
ACTION CHIM
Autor Najlepsza odpowiedź

Thanks guys for the help, I found a free app to hide cost price by Cybrosys Techno Solutions
for the sale price I have tried to do the same thing but it did not work here is the code and the error I am getting if someone can help:

/security/hide_sell_price_groups.xml

<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <data>

        <!-- Access to the sell price -->

        <record id="groups_view_sell_price" model="res.groups">

            <field name="name">View Sell Price</field>

            <field name="users" eval="[Command.link(ref('base.user_root')), Command.link(ref('base.user_admin'))]"/>

        </record>

    </data>

</odoo>

/views/product_product_views.xml

<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <!-- Product Variant Form View -->

    <record id="product_normal_form_view" model="ir.ui.view">

        <field name="name">product.product.view.form.inherited.hide.sell.price</field>

        <field name="model">product.product</field>

        <field name="inherit_id" ref="product.product_normal_form_view"/>

        <field name="arch" type="xml">

            <field name="lst_price" position="attributes">

                <attribute name="groups">hide_sell_price.groups_view_sell_price</attribute>

            </field>

        </field>

    </record>

    <!-- Product Variant Tree View -->

    <record id="product_product_tree_view" model="ir.ui.view">

        <field name="name">product.product.view.tree.inherited.hide.sell.price</field>

        <field name="model">product.product</field>

        <field name="inherit_id" ref="product.product_product_tree_view"/>

        <field name="arch" type="xml">

            <field name="lst_price" position="attributes">

                <attribute name="groups">hide_sell_price.groups_view_sell_price</attribute>

            </field>

        </field>

    </record>

    <record id="product_variant_easy_edit_view" model="ir.ui.view">

        <field name="name">product.product.view.tree.inherited.hide.sell.price</field>

        <field name="model">product.product</field>

        <field name="inherit_id" ref="product.product_variant_easy_edit_view"/>

        <field name="arch" type="xml">

            <field name="lst_price" position="attributes">

                <attribute name="groups">hide_sell_price.groups_view_sell_price</attribute>

            </field>

        </field>

    </record>

</odoo>

/views/product_template_views.xml

<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <!-- Product Template Form View -->

    <record id="product_template_form_view" model="ir.ui.view">

        <field name="name">product.template.view.form.inherit.hide.sell.price</field>

        <field name="model">product.template</field>

        <field name="inherit_id" ref="product.product_template_form_view"/>

        <field name="arch" type="xml">

            <field name="lst_price" position="attributes">

                <attribute name="groups">hide_sell_price.groups_view_sell_price</attribute>

            </field>

        </field>

    </record>

    <!-- Product Template Tree View -->

    <record id="product_template_tree_view" model="ir.ui.view">

        <field name="name">product.template.view.tree.inherit.hide.sell.price</field>

        <field name="model">product.template</field>

        <field name="inherit_id" ref="product.product_template_tree_view"/>

        <field name="arch" type="xml">

            <field name="lst_price" position="attributes">

                <attribute name="groups">hide_sell_price.groups_view_sell_price</attribute>

            </field>

        </field>

    </record>

</odoo>

and here is the error

odoo.tools.convert.ParseError: while parsing /home/odoo/odoo18/custom_addons/hide_sell_price/views/product_template_views.xml:4

Error during parsing or validation of the view:

The element <field name="lst_price"> cannot be located in the parent view


{

  "file": "/home/odoo/odoo18/custom_addons/hide_sell_price/views/product_template_views.xml",

  "line": 1,

  "name": "product.template.view.form.inherit.hide.sell.price",

  "view": ir.ui.view(3570,),

  "view.model": "product.template",

  "view.parent": ir.ui.view(470,),

  "xmlid": "product_template_form_view"

}

0
Awatar
Odrzuć
Awatar
Lars Aam
Najlepsza odpowiedź

If you have the Studio app installed (extra cost): 

Open the view with fields you want to restrict access.  Open studio.  There click on the field.  On the left side down, you will see 'Limit Visibility to fields'.  Careful, you can mess up.  I recommend you know the basics on managing access rights.

The result is a code like described by Chris.

The studio app then adds an extension view that is inherited in the basic view.   You avoid modifying Odoo standard code.

Studio app is excellent for those that do not know coding. But comes with a warning: You can mess up, and this might not work after updated version.

0
Awatar
Odrzuć
Chris TRINGHAM

Thanks Lars - that's how I created the Extension View in my answer, but the question was about Community Edition so that's not an option :-)

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Blank BoM not sending MO to draft Rozwiązane
manufacturing inventory
Awatar
Awatar
Awatar
Awatar
3
wrz 25
2351
Creating many manufactured products with serial numbers Rozwiązane
manufacturing inventory
Awatar
Awatar
2
sie 25
8709
Compute Theoretical Stock level for manufactured product from components
manufacturing inventory
Awatar
0
lis 24
1962
Reservation stock going to not available while there is stock
manufacturing inventory
Awatar
1
paź 24
2311
Sales Management for Manufactured Items Tracked by Serial Number
manufacturing inventory
Awatar
Awatar
1
mar 24
1955
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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