Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
7817 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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.

Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 17
3977
1
thg 11 24
1427
3
thg 4 23
17974
1
thg 12 22
14131
1
thg 3 15
6438