Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

User Own Documents Only but for Contacts - Odoo 16

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
salescrmcontactsrecord_rules
2 Replies
4504 Tampilan
Avatar
Kristopher

Hello,

I'm using Odoo community edition version 16. I would like to limit contact visibility like it is done for leads (In user settings I just select "User: Own Documents Only"). I would like to do the same but for Customers.

I search the web (and this forum) and fount a Record Rules mechanism. Unfortunately in my case it doesn't work well. I try to prepare a rules like "Personal Leads" and "All Leads", but for Contact model - but it doesn't work. I think there is a conflict with "res.partner.rule.private.employee". I tried to resolve it, but I broke the whole system, and need to restore database to fix it :/

How to limit the contact visibility for some users (maybe in Odoo 16 there is an easier way)?

0
Avatar
Buang
Avatar
Kristopher
Penulis Jawaban Terbai

Hi, Thank you for the answer, but it's a bit to detailed for me (I'm an Odoo beginner)

Where should I put all this xml statements? I an addons directory there is a "contacts" directory, but I can't find there similar lines. Should I create a new file or a new addon?

What is security group? Is it a group like "User: Own Documents Only" or "Internal User"?

What is the "module"? (As I understand the "model" is a database name, and a filed in developer mode Record Rule)


Ok, I think I got a solution. I have to deactivate private record rule for internal users and assign user as it's own salesperson in contacts. Now it seems to work...

1
Avatar
Buang
Franco Helguera

Whenever i try your solution, the user cant log in because this error : Due to security restrictions, you are not allowed to access 'User' (res.users) records.

Records: user1 (id=11)
User: user1 (id=11)

This restriction is due to the following rules:

Contact your administrator to request access if necessary.

Implicitly accessed through 'User' (res.users).

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Jawaban Terbai

Hi,

By following these steps you can create a new rule for the partners.

1. Hope you have a module category for the module to add the security groups.

eg:

<record id="module_module_name" model="ir.module.category">
        <field name="name">Module Name</field>
        <field name="description">Access for Module Name</field>
        <field name="sequence">50</field>
 </record>

2. The next step is to create the security group. You can refer to the code below.

<record id="module_name_own_documents" model="res.groups">
        <field name="name">Own Timesheets Only</field>
        <field name="category_id" ref="your category id"/>
</record>

3. Next, add access rights for the newly created group in your security file.

eg: 

access_model_name_own_documents,access.model.name.own.documents,model_model_name,module_name_own_documents,1,1,1,0 

4. Add a field in your model for the user of the corresponding employee.

user_id = fields.Many2one('res.users', string='User',related='partner_id.user_id',help='The user of the partner')

5. And last, create the rule for viewing and creating own documents.

<record id="model_name_rule_user" model="ir.rule">
    <field name="name">Model Name: Own Records</field>
    <field name="model_id" ref="model_model_name"/>
    <field name="domain_force">[('user_id', '=', user.id)]</field>
    <field name="groups" eval="[(4, ref('module_name.user_group'))]"/>
</record>


Regards

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
Unable to delete contacts of employees | Odoo Crm Sales
sales crm contacts customers
Avatar
Avatar
1
Mei 24
3198
Connecting multiple contacts to one company Diselesaikan
sales crm customer contacts
Avatar
Avatar
Avatar
2
Okt 23
6708
Create res.partner record rules by user sales.team
contacts record_rules
Avatar
Avatar
Avatar
Avatar
3
Okt 25
2676
Generate CRM opportunity from sales quotation
sales crm
Avatar
Avatar
Avatar
2
Agu 25
4859
CRM, res_partner and fields Diselesaikan
crm contacts
Avatar
Avatar
2
Jun 25
2948
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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