Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

How to hide fields in OpenERP7

Odebírat

Get notified when there's activity on this post

This question has been flagged
fieldsv7customizehide
3 Odpovědi
19171 Zobrazení
Avatar
TestUser

I read the help about field-access-rights. (My karma is insufficient to publish links)

and thought it should work - but didn't.

I want to hide the product price to a specific user group. I just want to change the visibility to this one field. I don't want to change any python code or xml file. It worked in version 6.1 and in the link above it says it should also work in version 7.

So I opened the model for product in database structure and said edit... I clicked on the price field and I was able to add a user group for this price field. I saved the field (and it worked) but I still had to save the model but that doesn't work and the field change were undone. When I do this I get an error message saying: Properties of an elementary field can't be changed that way. Please do this by adapting your python code - ideally with your own modul.

Is it or is it not possible to change just a single fields visibility to a group... with no python code or xml changes...?

3
Avatar
Zrušit
Avatar
Francesco OpenCode
Nejlepší odpověď

To show a field in relation of a group, you can use this code:

<xpath expr="//field[@name='order_line']/tree//field[@name='tax_id']" position="replace">
    <field name="company_id" groups="your_group"/>
</xpath>
4
Avatar
Zrušit
TestUser
Autor

Thank you too. My question is solved now.

Francesco OpenCode

Sounds Good...:)

Christophe

Where do you put this code?

Avatar
patrick
Nejlepší odpověď

I do not know of a way of changing (and keeping) changes to screen fields, without modifying xml files.

It is possible to change the visibility of a field on the screen, you have to modify or create an XML-file. The advantage is also that this way you can reload the database without loosing your changes.

When a field is invisibile, it can store / keep values and/or the values will be stored in the database when saving the data. Sometimes a field is defined multiple times on a screen, so you hide one, and the other is still visible.

Example of hiding a field (in this case, hiding the taxes on sale.order.line):

  <xpath expr="//field[@name='order_line']/tree//field[@name='tax_id']" position="replace">
      <field name="tax_id" invisible="1"/>
  </xpath>

It is also possible to use attr{} so you can make it invisible depending on some things.

  <xpath expr="//field[@name='order_line']/tree//field[@name='tax_id']" position="replace">
      <field name="tax_id" attrs={'invisible':[('field name or property', '=', 'some vaue')]}/>
  </xpath>

Hope this helps you a little.

5
Avatar
Zrušit
TestUser
Autor

Thank you very much. Is it possible to hide the field depending on a user group?

Priyesh Solanki (pso)

You can create a new group or use existing one and assign that group on the particular field like this: <field name="price" groups="NEW_GROUP_XML_ID"/>

Thanks, Priyesh Solanki

Avatar
kitcle
Nejlepší odpověď

try it.  Sure!

            <field name="arch" type="xml">    
                <xpath expr="//field[@name='order_line']/tree//field[@name='price_unit']" position="inside">
                    <field name="serial_no"/>
                </xpath>
            </field>

0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
How can we get invisible field to visible back in v15? Vyřešeno
fields customize hide undo Studio
Avatar
Avatar
Avatar
2
srp 22
5256
How to define a field which is visible that by the one who has it to create but not the others?
fields hide
Avatar
Avatar
2
bře 15
5733
field restriction for owner (salesperson)
fields v7
Avatar
0
bře 15
4062
How to hide fields? Vyřešeno
fields hide
Avatar
Avatar
Avatar
3
bře 15
30040
Show a field on specific stage (Recruiting app - 16.0 version)
fields customize phases
Avatar
Avatar
Avatar
3
čvn 23
3200
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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