コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
22903 ビュー

base.group_user can edit project.issue in every stage. portal.group_portal can edit SOME fields of the issue only in NEW stage. In two other stages (of all 7) portal user can press buttons Accept or Reject and change the stage value of the issue. I can't limit rights to record, because I need to change the value of the stage. I think I have to limit rights to some fields on the view.xml:

if the user group = portal.group_portal and stage_id != new readonly="1"

How to implement this condition to a single field?

アバター
破棄
最善の回答

add this code in your xml file

 <field name="field_name"  attrs="{'readonly':[('stage_id','!=','new')]}"/>

and in your python file, specify

field_name :  fields.char('Field Label',size=32,read=['portal.group_portal'])
アバター
破棄
関連投稿 返信 ビュー 活動
3
12月 23
90989
3
9月 21
5096
1
6月 19
7649
11
9月 16
19585
1
9月 15
8944