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
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    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

How to hide a tab

Abonare

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

Această întrebare a fost marcată
formemployeetabsodoov10
5 Răspunsuri
7913 Vizualizări
Imagine profil
AlexMercer

Hi guys! I am new of Odoo, and I am studying how does this framework works! 

I am trying to figure out how to hide a tab from a form of a user group, I try to explain better: I need to hide a tab "certifications" in employees form but not for group users of "Manager" and "Administrator" ... how to do this??

Inside the employees form view, I have created a tab using this code:


<xpath expr="//page[last()]" position="after">

           <page name="certifications" string="Certifications">

                    <group>

                        <group>

                            <field name="corso_formazione_base"/>

                            <field name="corso_preposto"/>

                            <field name="corso_antincendio"/>

                            <field name="corso_primo_soccorso"/>

                        </group>

                        <group>

                            <field name="corso_ambienti_confinati"/>

                            <field name="corso_rls"/>

                            <field name="corso_pas_pev_pei"/>

                            <field name="corso_uso_ple"/>

                        </group>

                    </group>

                </page>

            </xpath>



0
Imagine profil
Abandonează
DHA Medic

# -*- coding: utf-8 -*-

from odoo import api, fields, models, exceptions

from datetime import datetime,date

from odoo import SUPERUSER_ID

class IEmployee(models.Model):

_inherit = "?????"

perm = fields.Boolean(string="Permission", store=False, compute="check_perm", default=True)

@api.one

def check_perm(self):

cuid = self.env.uid

if SUPERUSER_ID == cuid:

self.perm = True

else:

user = self.env['res.users'].browse(self.env.uid)

group_hr_manager = user.has_group('hr.group_hr_manager')

if group_hr_manager == True:

self.perm = True

else:

self.perm = False

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

<field name="name">hr.employee.community</field>

<field name="model">hr.employee</field>

<field name="inherit_id" ref="hr.view_employee_form"/>

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

<xpath expr="//field[@name='category_ids']" position="after">

<field name="perm" invisible="True"/>

</xpath>

<xpath expr="//page[@name='certifications']" position="attributes">

<attribute name="attrs">{'invisible': [('perm','=',False)]}</attribute>

</xpath>

</field>

</record>

# I haven't test it

#you must debug it, you should use position="replace"

#https://pastebin.com/4uGjMA2L Python

#https://pastebin.com/rpaM5nRB XML

#Odoo 11 community

Sehrish

Hope this will helps: https://plus.google.com/collection/0hcEWE

Imagine profil
subbarao
Cel mai bun răspuns

You can try this 
<page name="certifications" string="Certifications" groups="base.group_hr_manager">

3
Imagine profil
Abandonează
Imagine profil
Mitul Shingala
Cel mai bun răspuns

hello,

assign the  manager group on the tab

 <page name="certifications" string="Certifications" groups="base.group_hr_manager'>

</page>
1
Imagine profil
Abandonează
Imagine profil
AlexMercer
Autor Cel mai bun răspuns

thank you very much!! I am going to try this! really thanks :D

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
Odoo10 Custom Form Doesn't Save
form customization odoov10
Imagine profil
0
mai 19
4193
Odoo chatter open by default with "Log internal note" Rezolvat
form chatter odoo10 odoov10
Imagine profil
1
iul. 18
6113
What parent stands for in notebook from view Rezolvat
accounting form parent form_view odoov10
Imagine profil
Imagine profil
Imagine profil
3
feb. 21
11901
Kanban quick create redirect to "New" form. Rezolvat
form create kanban v10 odoov10
Imagine profil
1
sept. 18
5113
Find record by uid
domain form find uid odoov10
Imagine profil
Imagine profil
1
apr. 18
5158
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