Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3736 Näkymät

I have a py file and have set some read only states like this

READONLY_STATES = {

'waiting_admin_approval': [('readonly', True)], 

'done': [('readonly', True)],

'cancel': [('readonly', True)],

}

I have applied this states to the order line and it works fine.  But I need to make the field editable to the purchase manager and read only to the sales person when the order is in the 'waiting_admin_approval' state. 

Is it possible to update the state or override the state value in the view file ?

Thanks in advance.


Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
heinäk. 17
4852
1
helmik. 16
4302
2
lokak. 15
5375
1
kesäk. 19
5069
1
huhtik. 19
5647