[REM] all: modules: removed all remaining references to res.roles, replaced by specific res.groups

bzr revid: odo@openerp.com-20101014000258-7ay7so7gp8ki5iy6
This commit is contained in:
Olivier Dony 2010-10-14 02:02:58 +02:00
parent 33a749dbef
commit d70acc176b
15 changed files with 19 additions and 74 deletions

View File

@ -2,11 +2,6 @@
<openerp>
<data>
<record id="res_roles_invoice0" model="res.roles">
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
<field name="description">Assign this role to the persons that should have the rights to confirm a draft invoice.</field>
</record>
<record id="wkf" model="workflow">
<field name="name">account.invoice.basic</field>
<field name="osv">account.invoice</field>

View File

@ -2,11 +2,6 @@
<openerp>
<data>
<record model="res.roles" id="crossovered_budget_role">
<field name="name">Crossovered Budget Validation</field>
<field name="description">Assign this role to the persons that should have the rights to Approve a confirm Budgets.</field>
</record>
<!-- Workflow definition -->
<record model="workflow" id="wkf_crossovered_budget">

View File

@ -2,10 +2,6 @@
<openerp>
<data>
<record id="PE_ADMIN" model="res.roles">
<field name="name">Email Administrator</field>
</record>
<record id="wkf_email_template_setting" model="workflow">
<field name="name">Email Template Workflow</field>
<field name="osv">email_template.account</field>

View File

@ -53,7 +53,7 @@
<record id="process_transition_employeeuser0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link a user to an employee&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The field Relate'd user in the Employee form allows to link the OpenERP user (and his rights and role) to the employee.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;The Related user field on the Employee form allows to link the OpenERP user (and her rights) to the employee.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_openerpuser0"/>
<field model="process.node" name="source_node_id" ref="process_node_employee0"/>
</record>

View File

@ -2,16 +2,6 @@
<openerp>
<data>
<!-- Roles definition -->
<record id="HR" model="res.roles">
<field name="name">Human Resources - Expenses</field>
</record>
<record id="HR_INV" model="res.roles">
<field name="name">Human Resources - Expenses invoice</field>
</record>
<!-- Workflow definition -->
<record id="wkf_expenses" model="workflow">

View File

@ -43,7 +43,7 @@
HR / Employees / Employees
then select the ones you want to choose, click on the print icon and select the option
'Print Summary of Employee's Holidays'
- The wizard allows you to choose if you want to print either the Confirmed & Validated holidays or only the Validated ones. These states must be set up by a user from the group 'HR' and with the role 'holidays'. You can define these features in the security tab from the user data in
- The wizard allows you to choose if you want to print either the Confirmed & Validated holidays or only the Validated ones. These states must be set up by a user from the group 'HR'. You can define these features in the security tab from the user data in
Administration / Users / Users
for example, you maybe will do it for the user 'admin'
.

View File

@ -2,12 +2,6 @@
<openerp>
<data>
<!-- Roles definition -->
<record model="res.roles" id="HR_holidays">
<field name="name">Leaves Manager</field>
</record>
<!-- Workflow definition -->
<record model="workflow" id="wkf_holidays">

View File

@ -2,12 +2,6 @@
<openerp>
<data>
<!-- Roles definition -->
<record id="HR" model="res.roles">
<field name="name">Timesheets validation</field>
</record>
<!-- Workflow definition -->
<record id="wkf_timesheet" model="workflow">

View File

@ -96,10 +96,6 @@
Process Transition
-->
<record id="res_roles_hr0" model="res.roles">
<field eval="&quot;&quot;&quot;HR&quot;&quot;&quot;" name="name"/>
</record>
<record id="process_transition_attendancetimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Sign in/out&quot;&quot;&quot;" name="name"/>

View File

@ -1925,8 +1925,7 @@ class bi_auto_configure_wizard(osv.osv_memory):
table_new = dbtab_obj.write(cr, uid, tables['id'], end_user_name)
if not(tables['table_db_name'].startswith('ir') or \
tables['table_db_name'].startswith('wkf') or \
tables['table_db_name'].startswith('res_groups') or \
tables['table_db_name'].startswith('res_role')) and \
tables['table_db_name'].startswith('res_groups')) and \
tables['table_db_name'] not in ['inherit', 'user_rule_group_rel',\
'group_rule_group_rel']:
vals = {}
@ -1999,8 +1998,8 @@ class bi_auto_configure_wizard(osv.osv_memory):
table['table_db_name'].startswith('wkf')) or \
(table['table_db_name'].startswith('res_groups')) or \
(table['table_db_name'] in \
['inherit', 'res_roles', 'user_rule_group_rel', \
'res_roles_users_rel', 'group_rule_group_rel']):
['inherit', 'user_rule_group_rel', \
'group_rule_group_rel']):
vals['hide'] = True
vals['active'] = False
make_id.append(table['id'])

View File

@ -7,12 +7,6 @@
<field name="on_create">True</field>
</record>
<!-- Roles definition -->
<record model="res.roles" id="role_pos">
<field name="name">POS - Confirmation</field>
</record>
<!--Activities-->
<record model="workflow.activity" id="act_draft">

View File

@ -19,9 +19,8 @@
#
##############################################################################
import netsvc
import pooler, tools
import pooler
import tools
from osv import fields, osv
class Env(dict):
@ -139,7 +138,7 @@ class process_process(osv.osv):
if node.model_id and node.model_id.model == res_model:
try:
data['active'] = eval(node.model_states, expr_context)
except Exception, e:
except Exception:
pass
if not data['active']:
@ -169,23 +168,19 @@ class process_process(osv.osv):
button['state'] = b.state
button['action'] = b.action
buttons.append(button)
data['roles'] = roles = []
data['groups'] = groups = []
for r in tr.transition_ids:
if r.role_id:
role = {}
role['name'] = r.role_id.name
roles.append(role)
for r in tr.role_ids:
role = {}
role['name'] = r.name
roles.append(role)
if r.group_id:
groups.append({'name': r.group_id.name})
for r in tr.group_ids:
groups.append({'name': r.name})
transitions[tr.id] = data
# now populate resource information
def update_relatives(nid, ref_id, ref_model):
relatives = []
for tid, tr in transitions.items():
for dummy, tr in transitions.items():
if tr['source'] == nid:
relatives.append(tr['target'])
if tr['target'] == nid:
@ -349,7 +344,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'),
'group_ids': fields.many2many('res.groups', 'process_transition_group_rel', 'tid', 'rid', string='Required Groups'),
'note': fields.text('Description', translate=True),
}
process_transition()

View File

@ -151,8 +151,6 @@
<field name="transition_id" ref="transition_confirm_quotation"/>
</record>
<!-- TODO: Transition roles (workflow transition ids) -->
</data>
</openerp>

View File

@ -282,9 +282,12 @@
</form>
</field>
</page>
<page string="Roles from Workflow">
<page string="Workflow Transitions">
<field name="transition_ids" colspan="4" nolabel="1"/>
</page>
<page string="Associated Groups">
<field name="group_ids" colspan="4" nolabel="1"/>
</page>
<page string="Notes">
<field name="note" nolabel="1" colspan="4"/>
</page>

View File

@ -133,10 +133,6 @@
Process Transition
-->
<record id="res_roles_salesman0" model="res.roles">
<field eval="&quot;&quot;&quot;Salesman&quot;&quot;&quot;" name="name"/>
</record>
<record id="process_transition_confirmquotation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm Quotation&quot;&quot;&quot;" name="name"/>