Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 odoo 中添加记录级别限制。我只想显示partners等于.current login userstate_idstate_id of current login user
partners
current login user
state_id
state_id of current login user
为此,您必须从设置/技术/安全/记录规则菜单中添加记录规则。你必须将对象设置为合作伙伴(res.partner)。需要像下面的代码一样设置规则定义(域过滤器)并保存它。
[('state_id','=',user.partner_id.state_id.id)]