تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
174 أدوات العرض

I have 2 companies that each have their own sales report. But right now both companies see both reports. How can I make report A invisible for company B, and Report B invisible for company A.

Ever since the upgrade for building reports it has made it very hard for me.

الصورة الرمزية
إهمال
أفضل إجابة

Hi Michael,

Reports don’t have company restrictions by default, but you can handle it in two ways:

  1. Security groups
    • Create a group for each company.
    • Assign the group to the users of that company.
    • In Technical → Reporting → Reports, open your report and set the group that should see it.
  2. Company condition in QWeb (if you’re editing the template)
    • Add a condition like:

      <t t-if="user.company_id.id == 1"> … report content … </t>

    This way only the matching company sees that report.

The cleanest way is via groups per company so users of company A don’t even see the menu/report for company B.

Hope this helps!

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

In Odoo, a **record rule** lets you restrict access to records based on conditions, such as the user’s current company. To make reports company-specific, you can create a record rule on the report’s model (for example, `ir.actions.report` or `spreadsheet.dashboard`) and set the domain to `[( 'company_id', '=', user.company_id.id )]`. This ensures that when a user is logged into Company A, they only see records (reports) assigned to Company A, and when logged into Company B, they only see records assigned to Company B. In short, the record rule automatically filters data per company so each company only sees its own reports without manual intervention.


More details, please refer to the links:

1. https://www.cybrosys.com/blog/how-to-create-record-rules-in-odoo-17

2. https://www.odoo.com/documentation/18.0/developer/reference/backend/security.html#record-rules

3. https://www.cybrosys.com/blog/record-rules-in-odoo-15


Hope it helps.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
2827
0
نوفمبر 19
8
1
فبراير 25
3681
Custom Report V17 تم الحل
1
أبريل 24
1785
2
مارس 24
4742