Different permissions based on workflow state

I need to configure a different resolution for an object based on its workflow state. For example, a "group of managers" can edit an object only if state = draft, but a "super-manager of a group" can edit it, also if state = checked.

It seems impossible to use ir.model.access, and I am evaluating whether this can be done with ir.rule. It seems, not...

Is there a way officialfor this or do I need to implement this function (perhaps by adding a condition to the ir.model.access mechanism).

+4
source share
4 answers

ir.model.access, , Unix CRUD, .

, - ir.rule, . , write unlink state, . [(1,'=',1)], , "-". . .
:

  • , read, , , .
  • , , , attrs , . . .
  • "" .
  • ir.rule , , , (: 7,0).

, ir.rule , .

, , API- ORM: fields_view_get ( , ) CRUD ( )

+5

-. 2 .

  • .

  • .

attrs = {'readonly': [('state', '! =', 'draft')]}

.

- .

+1

, , : Project Issues " " , . GUI, @odony, .

: enter image description here:

, : :

, write, ; write, .

" " - case_open(). , , , . - . , , case_open() , write.

0

... , char (, "test_123" ) sale.order, " ", " ". , , , , "test_123" "Sale Manger"

, (is_group_manager), True, " ", "", . xml "test_123" attrs="{'readonly':[('is_group_manager','=',0)]}"

<field name="is_group_manager" invisible="1"/>
<field name="test_123" attrs="{'readonly':[('is_group_manager','=',0)]}"/>

This will only work in openerp v6.0. Perhaps this will be useful for you. :)

0
source

All Articles