diff options
| author | Amit Mendapara <ame@tinyerp.com> | 2008-09-22 18:49:45 +0530 |
|---|---|---|
| committer | Amit Mendapara <ame@tinyerp.com> | 2008-09-22 18:49:45 +0530 |
| commit | c8f452b00070c3ff6d1a34a32333190fe88e8a0c (patch) | |
| tree | f12e363b8c4c25820e1389ca0ab8ca45b867b0c0 /addons/process | |
| parent | 3128a6f16a38c243dc79ca461a6ee2d8aff78fe7 (diff) | |
Roles for Process transition.
bzr revid: ame@tinyerp.com-20080922131945-740do6g3tbo1ipls
Diffstat (limited to 'addons/process')
| -rw-r--r-- | addons/process/process.py | 5 | ||||
| -rw-r--r-- | addons/process/process_view.xml | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/addons/process/process.py b/addons/process/process.py index 16c16805e18..73af1beffec 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -169,6 +169,10 @@ class process_process(osv.osv): role = {} role['name'] = r.role_id.name roles.append(role) + for r in tr.role_ids: + role = {} + role['name'] = r.name + roles.append(role) transitions[tr.id] = data g = tools.graph(nodes.keys(), map(lambda x: (x['source'], x['target']), transitions.values())) @@ -238,6 +242,7 @@ class process_transition(osv.osv): 'target_node_id': fields.many2one('process.node', 'Target Node', required=True, ondelete='cascade'), 'action_ids': fields.one2many('process.transition.action', 'transition_id', 'Buttons'), 'transition_ids': fields.many2many('workflow.transition', 'process_transition_ids', 'ptr_id', 'wtr_id', 'Workflow Transitions'), + 'role_ids': fields.many2many('res.roles', 'process_transition_roles_rel', 'tid', 'rid', 'Roles'), 'note': fields.text('Description', translate=True), } process_transition() diff --git a/addons/process/process_view.xml b/addons/process/process_view.xml index 20015d17e64..d5ae44a2a55 100644 --- a/addons/process/process_view.xml +++ b/addons/process/process_view.xml @@ -63,6 +63,9 @@ </field> </page> <page string="Roles Required"> + <field name="role_ids" colspan="4" nolabel="1"/> + </page> + <page string="Roles from Workflow"> <field name="transition_ids" colspan="4" nolabel="1"/> </page> <page string="Extra Information"> @@ -189,6 +192,9 @@ </field> </page> <page string="Roles Required"> + <field name="role_ids" colspan="4" nolabel="1"/> + </page> + <page string="Roles from Workflow"> <field name="transition_ids" colspan="4" nolabel="1"/> </page> <page string="Extra Information"> @@ -276,9 +282,13 @@ </form> </field> </page> - <page string="Roles"> - <field name="transition_ids" nolabel="1" colspan="4"/> - </page><page string="Notes"> + <page string="Roles Required"> + <field name="role_ids" colspan="4" nolabel="1"/> + </page> + <page string="Roles from Workflow"> + <field name="transition_ids" colspan="4" nolabel="1"/> + </page> + <page string="Notes"> <field name="note" nolabel="1" colspan="4"/> </page> </notebook> |
