You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何限制用户编辑非本人创建的产品?

Troubleshooting Your Product Edit Permission Rule

Hey there! Let's break down why your rule [('create_uid','in',[user.id])] isn't working as expected to restrict users from editing products they didn't create. Here are the most common fixes to check:

  • Make sure you're targeting the right permission type
    When setting up the record rule, double-check that you've selected Write in the "Access Rights" section (depending on your Odoo version). If you only applied this rule to "Read" access, it won't block edits at all.

  • Verify no conflicting rules are overriding yours
    Odoo's record rules work on an "allow-all-if-any-rule-allows" basis. If the user's group has another rule that grants write access to all products (like a default "Product Manager" rule), your restrictive rule will be ignored. Go to your user's assigned groups and audit all record rules for the product model to remove or adjust conflicting ones.

  • Simplify your domain expression (optional but cleaner)
    Since you're checking against a single user ID, you can simplify your domain to [('create_uid', '=', user.id)]—this does the exact same thing but is more readable. The in operator works here, but using = is more straightforward for single values.

  • Ensure the rule is active and applied to the right model/group

    • Confirm the "Active" checkbox is ticked on your record rule.
    • Make sure the rule is linked to the correct product model (usually product.product or product.template, depending on your setup).
    • Check that the rule is assigned to the user group your target users belong to—if it's only on an admin group, regular users won't be affected.
  • Test with a fresh user session
    Sometimes Odoo caches permission data. Log out and back in as the test user after making changes to the rule, then try editing a product created by someone else. If it still doesn't work, check the technical logs (Settings > Technical > Logs) for any permission-related errors that might give you more clues.

内容的提问来源于stack exchange,提问作者Jon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 09:18:16