我有这个问题
(文档标题:采购申请,操作:阅读)
我能找到原因吗?这是我的代码
安全.xml
<record id="group_grupos_requis" model="res.groups">
<field name="name">Solo Requisiciones</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_grupos_requis_hide" model="res.groups">
<field name="name">Puede Manipular Requisiciones</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_grupos_requis_aproval" model="res.groups">
<field name="name">Puede Confirmar Requisiciones</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record model="ir.rule" id="purchase_requisition_comp_rule">
<field name="name">Purchase Requisition multi-company</field>
<field name="model_id" ref="model_purchase_requisition"/>
<field name="domain_force">[('message_follower_ids.partner_id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4,ref('purchase.group_grupos_requis'))]"/>
</record>
<record model="ir.rule" id="purchase_requisition_all_rule">
<field name="name">Purchase Requisition Manager all</field>
<field name="model_id" ref="model_purchase_requisition"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('purchase.group_grupos_requis_hide')), (4,ref('purchase.group_grupos_requis_aproval'))]"/>
</record>
<record model="ir.rule" id="purchase_requisition_all_rule_line">
<field name="name">Purchase Requisition Manager line all</field>
<field name="model_id" ref="model_purchase_requisition_line"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="global" eval="True"/>
</record>
<record model="ir.rule" id="purchase_requisition_rh_rule">
<field name="name">Purchase Requisition RH</field>
<field name="model_id" ref="model_purchase_requisition"/>
<field name="domain_force">[('solo_rh', '!=', False)]</field>
<field name="groups" eval="[(4,ref('hr.group_hr_manager'))]"/>
</record>
我试图在模块mail_followers中提供创建的访问权限,但什么也没有,问题是当我将purchase_requisition_comp_rule规则与其他规则一起使用时,我可以创建一个请购单,当我使用具有此选项的用户时,无法创建带有捕获的请购单行的请购单,但是如果我将该行留空,我可以记录它,然后它让我添加行并保存它,这是非常罕见的
我只是添加这个
<record model="ir.rule" id="purchase_requisition_comp_rule">
<field name="name">Purchase Requisition multi-company</field>
<field name="model_id" ref="model_purchase_requisition"/>
<field name="domain_force">['|', ('create_uid', '=', user.id), ('message_follower_ids.partner_id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4,ref('purchase.group_grupos_requis'))]"/>
</record>