[IMP ]added shortcuts to demo user, modified visibility of elements in employee views

bzr revid: fde@openerp.com-20101230170800-drbr5ie19trv0nxj
This commit is contained in:
Francois Degrave 2010-12-30 18:08:00 +01:00
parent 84be62444b
commit e494a992dd
9 changed files with 27 additions and 11 deletions

View File

@ -5,5 +5,12 @@
<field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
</record>
<record id="ir_ui_view_sc_calendar_demo" model="ir.ui.view_sc">
<field name="name">Meetings</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_demo"/>
<field name="res_id" ref="crm.menu_crm_case_categ_meet"/>
</record>
</data>
</openerp>

View File

@ -150,6 +150,7 @@ class hr_employee(osv.osv):
'partner_id': fields.related('address_home_id', 'partner_id', type='many2one', relation='res.partner', readonly=True, help="Partner that is related to the current employee. Accounting transaction will be written on this partner belongs to employee."),
'bank_account_id':fields.many2one('res.partner.bank', 'Bank Account', domain="[('partner_id','=',partner_id)]", help="Employee bank salary account"),
'work_phone': fields.char('Work Phone', size=32, readonly=False),
'mobile_phone': fields.char('Mobile', size=32, readonly=False),
'work_email': fields.char('Work E-mail', size=240),
'work_location': fields.char('Office Location', size=32),
'notes': fields.text('Notes'),

View File

@ -79,5 +79,12 @@
<field name="category_ids" eval="[(6, 0, [ref('category_trainee')])]"/>
</record>
<record id="ir_ui_view_sc_employees_demo" model="ir.ui.view_sc">
<field name="name">Employees</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_demo"/>
<field name="res_id" ref="hr.menu_open_view_employee_list_my"/>
</record>
</data>
</openerp>

View File

@ -37,14 +37,14 @@
</group>
<notebook colspan="6">
<page string="Personal Information">
<group col="2" colspan="2">
<group col="2" colspan="2" groups="base.group_hr_user">
<separator colspan="2" string="Social IDs"/>
<field name="ssnid"/>
<field name="sinid" groups="base.group_extended"/>
<field name="identification_id" groups="base.group_extended"/>
<field name="passport_id"/>
</group>
<group col="2" colspan="2">
<group col="2" colspan="2" groups="base.group_hr_user">
<separator string="Status" colspan="2"/>
<field name="gender"/>
<field name="marital" widget="selection"/>
@ -57,6 +57,7 @@
<field name="partner_id" invisible="1" />
<field name="address_id" colspan="2" on_change="onchange_address_id(address_id)" domain="[('partner_id', '=', partner_id)]"/>
<field name="work_phone"/>
<field name="mobile_phone"/>
<field name="work_email" widget="email" />
<field name="work_location"/>
</group>
@ -66,10 +67,10 @@
<field name="coach_id" />
</group>
</page>
<page string="Categories">
<page string="Categories" groups="base.group_hr_user">
<field name="category_ids" nolabel="1"/>
</page>
<page string="Notes">
<page string="Notes" groups="base.group_hr_user">
<field colspan="4" nolabel="1" name="notes"/>
</page>
</notebook>
@ -86,8 +87,8 @@
<tree string="Employees">
<field name="name"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="work_email" invisible="1"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>

View File

@ -129,8 +129,8 @@
<field name="arch" type="xml">
<field name="coach_id" position="after">
<group colspan="2">
<button name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}"/>
<button name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}"/>
<button name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
<button name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
</group>
<field name="state"/>
<newline/>

View File

@ -102,7 +102,7 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<page string="Personal Information" position="after">
<page string="Miscellaneous">
<page string="Miscellaneous" groups="base.group_hr_user">
<group colspan="2" col="2">
<separator string="Personal Info" colspan="2"/>
<field name="bank_account_id"/>

View File

@ -142,7 +142,7 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<page string="Notes" position="before">
<page string="Evaluation">
<page string="Evaluation" groups="base.group_hr_user">
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
<field name="evaluation_date"/>
</page>

View File

@ -91,7 +91,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page[@string='Personal Information']" position="after">
<page string="Miscellaneous">
<page string="Miscellaneous" groups="base.group_hr_user">
<group colspan="2" col="2">
<separator string="Personal Info" colspan="2"/>
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>

View File

@ -106,7 +106,7 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<page string="Categories" position="after">
<page string="Timesheets">
<page string="Timesheets" groups="base.group_hr_user">
<field name="product_id" domain="[('type','=','service')]"/>
<field name="journal_id" widget="selection"/>
</page>