提交一版本 测试
This commit is contained in:
@@ -140,6 +140,19 @@ class SoongWorkflowNode(models.Model):
|
||||
remove_ids = record.button_ids.filtered(lambda r: r.name in ["结束"])
|
||||
record.button_ids = [(3, remove_id.id) for remove_id in remove_ids]
|
||||
|
||||
def btn_role_sync(self):
|
||||
for record in self:
|
||||
now_btn = record.button_ids.filtered(lambda r: r.name in ["转交"])
|
||||
for btn in now_btn:
|
||||
other_btn = record.button_ids.filtered(lambda r: r.name not in ["转交"])
|
||||
other_btn.write({
|
||||
"btn_hide": btn.btn_hide,
|
||||
"review_type": btn.review_type,
|
||||
"reviewer_id": btn.reviewer_id.id,
|
||||
"reviewer_group_id": btn.reviewer_group_id.id,
|
||||
"users_role_id": btn.users_role_id.id
|
||||
})
|
||||
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, values):
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Buttons">
|
||||
<button name="btn_role_sync"
|
||||
string="角色同步按钮"
|
||||
type="object"
|
||||
class="oe_highlight"/>
|
||||
<field name="button_ids" mode="tree" context="{'default_node_id':id}"/>
|
||||
</page>
|
||||
<page string="Fields">
|
||||
|
||||
Reference in New Issue
Block a user