İç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

why an updated record (with the 'ir.attachment' field updated) can be read by an other user, but the new created record (with an attachment file uploaded) can't open by an other user?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
securityir.attachmentmail.thread
2 Cevaplar
3066 Görünümler
Avatar
FarmingWolf
  1. Base env : odoo17, windows 10
  2. I'm coding a new module, a new model , trying to diplay page fields changed history by inheriting the [mail] models:
     _inherit = ['mail.thread', 'mail.activity.mixin']
  3. the attachment field is defined as :
    op_contract_attachment_ids = fields.Many2many('ir.attachment', string="attach files", copy=False, tracking=False)
  4. "Access Denied by record rules for operation:...." pops up when an other user tries to open a newly created record with an attachment file, even though I added the user to the "Followers".
  5. In the create user's page, the attachment file isn't added to the message history column in the right part of the page when the record is newly created, and it is ok as expected.
  6. But, when the record is updated (delete the old attachment file and add a new one),the page can be opened by an other user without error message disregarding the login user is in the followers or not.
  7. If a new file is added without removing the old attachment file, the page is still can NOT be opened by an other user.
  8. After the page was edited and commited, the attachment files updated will be displayed in the message history column in the right part of the page. It seems like that the "tracking=False" in the field definition was disregarded.
  9. The newly created record CAN be opened without displaying the attachment filed in the page by an user who has NO access right to the field. I think this is because that I defined the attachment filed with groups specified in the XML file as:
  10. For the user who has no right to access to the attachment field:
    1. if a new file is added without removing the old one, he CAN NOT open the page
    2. if a new file is added with removing the old one, he can open the page, even though he is not a follower.
  11. In the "10.b" above, the attachment file field is not displayed in the page main body according to the "groups" specified. BUT the attachment file is displayed in the message history column in the right part of the page. And this is not  appreciated, because that user is NOT expected to see the attachment file.
  12. My ultimate objective is :
    1. Users in special groups(specified in secrurity.xml or in setting page) can open the newly created record.
    2. In the message history column, I need to control the attachment file displaying or not according to the login user's rights through system security settings or python code/xml  based logic control.
    3. In the message history column, the user who has no access rights to the attachment file, he can read other messages yet.
    4. If the attachment file update info is included in one message record, the user who has no access right to the attachment file can also read the rest part of the message record except the info about the attachment file field.

How should I do ?

Thanks a lot!


31 July, 2024



0
Avatar
Vazgeç
Avatar
Dương Nguyễn
En İyi Yanıt

If you still want to use the widget try to add _mail_post_access = 'read' to model like this


I test in holiday module it like this

0
Avatar
Vazgeç
Avatar
FarmingWolf
Üretici En İyi Yanıt

hi,every one,It seems like that the problem comes from the widget many2many_binary.

when I use the default view of ir.attachment without the widget=many2many_binary, everything is going well, the display, the rights, etc, except the view looks like a bit some kind of not so odoo... anyway logic is NO1.

I have been suffered from this problem for more than 24*3 hours. Fortunately,the answer came out after I posted this problem here.

Hope this info could help those who has the similar problems.

Thank you!!!

0
Avatar
Vazgeç
FarmingWolf
Üretici

to:Dương Nguyễn
Thanks you very much for your reply.
I tried _mail_post_access = 'read',page openning error fixed, but the attachment file is still displayed in the message history column although the field property is set as "tracking=False".

FarmingWolf
Üretici

to:Dương Nguyễn
Thanks you very much for your reply.
I can't reply to your comment, I do not know why. Maybe because I have not enough karma.
I tried _mail_post_access = 'read',page openning error fixed, but the attachment file is still displayed in the message history column although the field property is set as "tracking=False".

Dương Nguyễn

You 're welcome
By default many2many field has tracking = False already

FarmingWolf
Üretici

Thank you !
I have checked many2many_binay widget in more than 3 modules,setting tracking = False, and the attached files are all sent to the msg tracker. I do not know why.

Dương Nguyễn

Check my edited answer , i have tested in hr_holiday module and it only has attached file in the icon not in the chatter

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 can I restrict user access and permissions to a related ir.attachment record?
security ir.attachment
Avatar
0
Haz 20
6929
🟠 V13 - How to overwrite an existing file in chatter's attachment when uploading multiple files or a single file and run a code every upload?
chatter ir.attachment mail.thread
Avatar
0
Eki 20
6311
Mac Id restriction for Users in Odoo enterprise
security
Avatar
0
Ara 25
169
what is the differance between access right and record rules in odoo ? Çözüldü
security
Avatar
Avatar
Avatar
Avatar
Avatar
5
Eyl 25
15935
User Session Bug.
security
Avatar
0
Haz 25
1157
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