[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:
parent
33a749dbef
commit
d70acc176b
|
@ -2,11 +2,6 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<record id="res_roles_invoice0" model="res.roles">
|
|
||||||
<field eval=""""Invoice"""" 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">
|
<record id="wkf" model="workflow">
|
||||||
<field name="name">account.invoice.basic</field>
|
<field name="name">account.invoice.basic</field>
|
||||||
<field name="osv">account.invoice</field>
|
<field name="osv">account.invoice</field>
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<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 -->
|
<!-- Workflow definition -->
|
||||||
|
|
||||||
<record model="workflow" id="wkf_crossovered_budget">
|
<record model="workflow" id="wkf_crossovered_budget">
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<record id="PE_ADMIN" model="res.roles">
|
|
||||||
<field name="name">Email Administrator</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="wkf_email_template_setting" model="workflow">
|
<record id="wkf_email_template_setting" model="workflow">
|
||||||
<field name="name">Email Template Workflow</field>
|
<field name="name">Email Template Workflow</field>
|
||||||
<field name="osv">email_template.account</field>
|
<field name="osv">email_template.account</field>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<record id="process_transition_employeeuser0" model="process.transition">
|
<record id="process_transition_employeeuser0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Link a user to an employee"""" name="name"/>
|
<field eval=""""Link a user to an employee"""" name="name"/>
|
||||||
<field eval=""""The field Relate'd user in the Employee form allows to link the OpenERP user (and his rights and role) to the employee."""" name="note"/>
|
<field eval=""""The Related user field on the Employee form allows to link the OpenERP user (and her rights) to the employee."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_openerpuser0"/>
|
<field model="process.node" name="target_node_id" ref="process_node_openerpuser0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_employee0"/>
|
<field model="process.node" name="source_node_id" ref="process_node_employee0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -2,16 +2,6 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<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 -->
|
<!-- Workflow definition -->
|
||||||
|
|
||||||
<record id="wkf_expenses" model="workflow">
|
<record id="wkf_expenses" model="workflow">
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
HR / Employees / Employees
|
HR / Employees / Employees
|
||||||
then select the ones you want to choose, click on the print icon and select the option
|
then select the ones you want to choose, click on the print icon and select the option
|
||||||
'Print Summary of Employee's Holidays'
|
'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
|
Administration / Users / Users
|
||||||
for example, you maybe will do it for the user 'admin'
|
for example, you maybe will do it for the user 'admin'
|
||||||
.
|
.
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<!-- Roles definition -->
|
|
||||||
|
|
||||||
<record model="res.roles" id="HR_holidays">
|
|
||||||
<field name="name">Leaves Manager</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Workflow definition -->
|
<!-- Workflow definition -->
|
||||||
|
|
||||||
<record model="workflow" id="wkf_holidays">
|
<record model="workflow" id="wkf_holidays">
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<!-- Roles definition -->
|
|
||||||
|
|
||||||
<record id="HR" model="res.roles">
|
|
||||||
<field name="name">Timesheets validation</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Workflow definition -->
|
<!-- Workflow definition -->
|
||||||
|
|
||||||
<record id="wkf_timesheet" model="workflow">
|
<record id="wkf_timesheet" model="workflow">
|
||||||
|
|
|
@ -96,10 +96,6 @@
|
||||||
Process Transition
|
Process Transition
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<record id="res_roles_hr0" model="res.roles">
|
|
||||||
<field eval=""""HR"""" name="name"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="process_transition_attendancetimesheet0" model="process.transition">
|
<record id="process_transition_attendancetimesheet0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Sign in/out"""" name="name"/>
|
<field eval=""""Sign in/out"""" name="name"/>
|
||||||
|
|
|
@ -1925,8 +1925,7 @@ class bi_auto_configure_wizard(osv.osv_memory):
|
||||||
table_new = dbtab_obj.write(cr, uid, tables['id'], end_user_name)
|
table_new = dbtab_obj.write(cr, uid, tables['id'], end_user_name)
|
||||||
if not(tables['table_db_name'].startswith('ir') or \
|
if not(tables['table_db_name'].startswith('ir') or \
|
||||||
tables['table_db_name'].startswith('wkf') or \
|
tables['table_db_name'].startswith('wkf') or \
|
||||||
tables['table_db_name'].startswith('res_groups') or \
|
tables['table_db_name'].startswith('res_groups')) and \
|
||||||
tables['table_db_name'].startswith('res_role')) and \
|
|
||||||
tables['table_db_name'] not in ['inherit', 'user_rule_group_rel',\
|
tables['table_db_name'] not in ['inherit', 'user_rule_group_rel',\
|
||||||
'group_rule_group_rel']:
|
'group_rule_group_rel']:
|
||||||
vals = {}
|
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('wkf')) or \
|
||||||
(table['table_db_name'].startswith('res_groups')) or \
|
(table['table_db_name'].startswith('res_groups')) or \
|
||||||
(table['table_db_name'] in \
|
(table['table_db_name'] in \
|
||||||
['inherit', 'res_roles', 'user_rule_group_rel', \
|
['inherit', 'user_rule_group_rel', \
|
||||||
'res_roles_users_rel', 'group_rule_group_rel']):
|
'group_rule_group_rel']):
|
||||||
vals['hide'] = True
|
vals['hide'] = True
|
||||||
vals['active'] = False
|
vals['active'] = False
|
||||||
make_id.append(table['id'])
|
make_id.append(table['id'])
|
||||||
|
|
|
@ -7,12 +7,6 @@
|
||||||
<field name="on_create">True</field>
|
<field name="on_create">True</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Roles definition -->
|
|
||||||
|
|
||||||
<record model="res.roles" id="role_pos">
|
|
||||||
<field name="name">POS - Confirmation</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!--Activities-->
|
<!--Activities-->
|
||||||
|
|
||||||
<record model="workflow.activity" id="act_draft">
|
<record model="workflow.activity" id="act_draft">
|
||||||
|
|
|
@ -19,9 +19,8 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import netsvc
|
import pooler
|
||||||
import pooler, tools
|
import tools
|
||||||
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
|
|
||||||
class Env(dict):
|
class Env(dict):
|
||||||
|
@ -139,7 +138,7 @@ class process_process(osv.osv):
|
||||||
if node.model_id and node.model_id.model == res_model:
|
if node.model_id and node.model_id.model == res_model:
|
||||||
try:
|
try:
|
||||||
data['active'] = eval(node.model_states, expr_context)
|
data['active'] = eval(node.model_states, expr_context)
|
||||||
except Exception, e:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not data['active']:
|
if not data['active']:
|
||||||
|
@ -169,23 +168,19 @@ class process_process(osv.osv):
|
||||||
button['state'] = b.state
|
button['state'] = b.state
|
||||||
button['action'] = b.action
|
button['action'] = b.action
|
||||||
buttons.append(button)
|
buttons.append(button)
|
||||||
data['roles'] = roles = []
|
data['groups'] = groups = []
|
||||||
for r in tr.transition_ids:
|
for r in tr.transition_ids:
|
||||||
if r.role_id:
|
if r.group_id:
|
||||||
role = {}
|
groups.append({'name': r.group_id.name})
|
||||||
role['name'] = r.role_id.name
|
for r in tr.group_ids:
|
||||||
roles.append(role)
|
groups.append({'name': r.name})
|
||||||
for r in tr.role_ids:
|
|
||||||
role = {}
|
|
||||||
role['name'] = r.name
|
|
||||||
roles.append(role)
|
|
||||||
transitions[tr.id] = data
|
transitions[tr.id] = data
|
||||||
|
|
||||||
# now populate resource information
|
# now populate resource information
|
||||||
def update_relatives(nid, ref_id, ref_model):
|
def update_relatives(nid, ref_id, ref_model):
|
||||||
relatives = []
|
relatives = []
|
||||||
|
|
||||||
for tid, tr in transitions.items():
|
for dummy, tr in transitions.items():
|
||||||
if tr['source'] == nid:
|
if tr['source'] == nid:
|
||||||
relatives.append(tr['target'])
|
relatives.append(tr['target'])
|
||||||
if tr['target'] == nid:
|
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'),
|
'target_node_id': fields.many2one('process.node', 'Target Node', required=True, ondelete='cascade'),
|
||||||
'action_ids': fields.one2many('process.transition.action', 'transition_id', 'Buttons'),
|
'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'),
|
'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),
|
'note': fields.text('Description', translate=True),
|
||||||
}
|
}
|
||||||
process_transition()
|
process_transition()
|
||||||
|
|
|
@ -151,8 +151,6 @@
|
||||||
<field name="transition_id" ref="transition_confirm_quotation"/>
|
<field name="transition_id" ref="transition_confirm_quotation"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- TODO: Transition roles (workflow transition ids) -->
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -282,9 +282,12 @@
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page string="Roles from Workflow">
|
<page string="Workflow Transitions">
|
||||||
<field name="transition_ids" colspan="4" nolabel="1"/>
|
<field name="transition_ids" colspan="4" nolabel="1"/>
|
||||||
</page>
|
</page>
|
||||||
|
<page string="Associated Groups">
|
||||||
|
<field name="group_ids" colspan="4" nolabel="1"/>
|
||||||
|
</page>
|
||||||
<page string="Notes">
|
<page string="Notes">
|
||||||
<field name="note" nolabel="1" colspan="4"/>
|
<field name="note" nolabel="1" colspan="4"/>
|
||||||
</page>
|
</page>
|
||||||
|
|
|
@ -133,10 +133,6 @@
|
||||||
Process Transition
|
Process Transition
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<record id="res_roles_salesman0" model="res.roles">
|
|
||||||
<field eval=""""Salesman"""" name="name"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="process_transition_confirmquotation0" model="process.transition">
|
<record id="process_transition_confirmquotation0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Confirm Quotation"""" name="name"/>
|
<field eval=""""Confirm Quotation"""" name="name"/>
|
||||||
|
|
Loading…
Reference in New Issue