本文介绍了如何从odoo中的组中删除隐式ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试删除购买用户组中的 implied ids .这是采购订单中的实际组

I am trying to remove implied ids of purchase user group.This is actual group in purchase order

<record id="group_purchase_manager" model="res.groups">
    <field name="name">Manager</field>
    <field name="category_id" ref="base.module_category_purchase_management"/>
    <field name="implied_ids" eval="[(4, ref('group_purchase_user'))]"/>
    <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

然后,我尝试删除自定义模块中隐含的组

Then I am trying to remove implied of the group in my custom module

<record id="purchase.group_purchase_manager" model="res.groups">
    <field name="name">Manager</field>
    <field name="category_id" ref="base.module_category_purchase_management"/>
    <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

我也尝试了另一种

<record id="purchase.group_purchase_manager" model="res.groups">
    <field name="implied_ids" eval="False"/>
</record>

不幸的是,两者都不起作用.

unfortunately both will not work.

我在UI中检查了购买/危险的组,但是继承的购买/用户的组仍然存在.

I checked the groups of purchases/Manger in UI but the inherited group purchases/User still there.

如何从采购经理组中删除隐含的ID ?

How to remove implied ids from purchase manager group??

推荐答案

您可以尝试以下代码.

<record id="purchase.group_purchase_manager" model="res.groups">
    <field name="name">Manager</field>
    <field name="category_id" ref="base.module_category_purchase_management"/>
    <field name="implied_ids" eval="[(4, ref('purchase.group_purchase_user'))]"/>
    <field name="users" eval="[(3, ref('base.user_root'))]"/>
</record>

借助 3 ,我们将剪切/删除两个对象之间的关系,而无需删除目标ID (ref('base.user_root')).

With help of 3, we will cut/delete relationship between two objects without delete target ID (ref('base.user_root')).

我还没有测试.

这篇关于如何从odoo中的组中删除隐式ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 12:54