Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
22581 Visualizzazioni

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?

Avatar
Abbandona
Risposta migliore

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'])
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
dic 23
90253
3
set 21
4741
1
giu 19
7433
11
set 16
19268
1
set 15
8726