Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
7785 มุมมอง

I try to simply duplicate the Warehouse/Manager group so I can define a new group with less permissions.


But I got:

"Constraint Error

The name of the group must be unique within an application!"

It seems like the duplicate function is not changing the name to "Manager (Copy)" or something like that.

Thanks

อวตาร
ละทิ้ง

I think this is a bug, extensively reported, as can be seen at the web. It happens not only with groups, but with journals also. Seems that the "duplicate" function only works OK when there is not a constraint. It should work even if the constraint exists, in order to allow to reproduce every property of the record, except the name.

คำตอบที่ดีที่สุด

It is a long standing bug that has to do with the specific context.

It was as simple as adding:

context.pop('lang', False)

before the call to Super


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

You can Export the user group to xls/csv and Import it with another value in 'Name' field. This makes a duplicate and you can adjust the new entry as you wish. Tested and works fine.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

If it is a new group then new name . answer is in your question !..

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 17
3973
1
พ.ย. 24
1408
3
เม.ย. 23
17938
How to add an user to a group แก้ไขแล้ว
1
ธ.ค. 22
14104
How to create Groups? แก้ไขแล้ว
1
มี.ค. 15
6425