İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Only show form field if a certain tag is set

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
projectformtaskinvisiblestudio
2 Cevaplar
1964 Görünümler
Avatar
Björn

Hi all,


I want to show a form field of a project task only if the tag "PoC" is set. I tried the invisible condition:


[["tag_ids","=","PoC"]]

But it doesn't work. The field is always hidden with this condition, no matter if the tag is set or not. I have some automation's which also get triggered when a PoC tag is set. There the domain looks like this:


[["tag_ids.name","=","PoC"]]

Which works nicely for automation but if I try to use it for the invisible condition I get this error:


Error while validating view near:

<form string="Task" class="o_form_project_tasks" js_class="project_form" __validate__="1">
                    <field name="allow_subtasks" invisible="1"/>
                    <field name="is_closed" invisible="1"/>

Invalid composed field tag_ids.name in attrs ({"invisible": [["tag_ids.name","=","PoC"]]})

Any hints how to only show a form field if the tag "PoC" is set?


Thanks a lot!


0
Avatar
Vazgeç
Avatar
J.A. Daniel Göppner
En İyi Yanıt

Hi Björn

as tag_ids is a manytomany I woul try to use 'in'

[["tag_ids.name","in","[PoC]"]]

or 

[["tag_ids","in","[your_id]"]]


Alternative you can create a computed field


display_fieldx = fields.Boolean(compute='_compute_display_fieldx')

@api.depends('tag_ids')
def _compute_display_fieldx(seld)
​for rec in self:
​ ​rec = any(tag_id.name == 'PoC' for tag_id rec.tag_ids)


then in form view
<field name="display_fieldx" invisible="1"/>

and use attrs ({"invisible": [["display_fieldx","=",False ]]}) for your field




hope this helps

Daniel

2
Avatar
Vazgeç
Avatar
Björn
Üretici En İyi Yanıt

Hi Daniel,


[["tag_ids","in","[your_id]"]]

gets accepted and it looks good, also the "visual" part of the rule builder (unfortunately I don't have enough karma points to post a screenshot or even a link to a screenshot :( ) 


But the field is shown afterward in all forms, no matter if the tag is set or not.


The other suggestion:

[["tag_ids.name","in","[PoC]"]]


Doesn't work, I get again a error message that tag_ids.name is not known:

Error while validating view near:

<form string="Task" class="o_form_project_tasks" js_class="project_form" __validate__="1">
                    <field name="allow_subtasks" invisible="1"/>
                    <field name="is_closed" invisible="1"/>

Invalid composed field tag_ids.name in attrs ({"invisible": [["tag_ids.name","in",["PoC"]]]})


I have the feeling that we are close to the solution but something is still missing.


Thanks!

Björn

0
Avatar
Vazgeç
J.A. Daniel Göppner

Hi Björn
i updated my answer with a second appraoch, hope this helps

Björn
Üretici

Hi Jan,

I got it now working. First I had to find the ID of the tag which was not that easy. I inspected the HTML code to find it, than I had to turn "in" to "not in". This worked than:

[["tag_ids","not in",[5]]]

Thanks a lot for all your ideas and support!

Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
How to open the project form view instead of task view in Odoo 17 CE?
project form task tree kanban
Avatar
Avatar
Avatar
2
Tem 24
4959
Customize the Portal view
project task portal studio v15
Avatar
Avatar
1
Şub 23
6703
Hide column in many2many field Çözüldü
project xml task many2many invisible
Avatar
Avatar
1
Tem 19
6269
v16 Tasks visibility
project task
Avatar
Avatar
1
Haz 23
4126
Create a user who can only see project and task menu Çözüldü
project task
Avatar
Avatar
1
Kas 22
4545
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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