[IMP] department_id added in expense,timesheet,applicant,holidays. Department view put in comment in resource and set in hr

bzr revid: vir@tinyerp.com-20100217084938-wb9ixv8ey4ah6j9i
This commit is contained in:
Vir (Open ERP) 2010-02-17 14:19:38 +05:30
parent 469c4be64a
commit ddfcd40423
8 changed files with 52 additions and 24 deletions

View File

@ -50,6 +50,7 @@ class crm_job(osv.osv):
"the partner mentality in relation to our services.The scale has" \
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'),
'department_id':fields.many2one('hr.department','Department'),
}
crm_job()

View File

@ -38,6 +38,7 @@
<tree string="Jobs - Recruitment Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Description"/>
<field name="department_id"/>
<field name="partner_name" string="Name"/>
<field name="email_from" string="Candidate Email"/>
<field name="partner_phone" string="Candidate Phone"/>
@ -77,7 +78,7 @@
<field name="phonecall_id" select="1"/>
<button string="Schedule a Phone Call"
name="%(wizard_crm_job_reschedule_phone_call)d" icon="gtk-redo" type="action" attrs="{'invisible':[('phonecall_id','!=',False)]}"/>
<field name="department_id" />
</group>
<notebook colspan="4">
<page string="Job Info">

View File

@ -75,6 +75,22 @@
<menuitem action="open_module_tree_department" id="menu_department_def" parent="hr.menu_department_tree"/>
<menuitem action="open_module_tree_department" id="menu_hr_department_tree" parent="menu_hr_human_resources"/>
<record model="ir.ui.view" id="view_users_form_inherit">
<field name="name">res.users.form</field>
<field name="type">form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Departements Informations">
<separator string="Managers" colspan="4"/>
<field name="parent_id" nolabel="1" colspan="4"/>
<separator string="Subordinates" colspan="4"/>
<field name="child_ids" nolabel="1" colspan="4"/>
</page>
</notebook>
</field>
</record>
<!--<record model="ir.ui.view" id="view_department_form_simple_modif_inherited1">
<field name="name">view.department.form.hr.inherited1</field>
<field name="model">res.users</field>

View File

@ -153,6 +153,8 @@ class hr_holidays(osv.osv):
'allocation_type': fields.selection([('employee','Employee Request'),('company','Company Allocation')], 'Allocation Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help='This field is only for informative purposes, to depict if the leave request/allocation comes from an employee or from the company'),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'holiday_user_id':fields.many2one('hr.holidays.per.user','Holiday per user'),
'department_id':fields.many2one('hr.department','Department'),
}
_defaults = {

View File

@ -49,6 +49,7 @@
<field name="employee_id" select="1" required="1"/>
<field name="number_of_days_temp"/>
<field name="manager_id"/>
<field name="department_id"/>
<field name="notes" colspan="4"/>
<newline/>
<field name="state" select="1" colspan="2"/>
@ -76,6 +77,7 @@
<field name="name" select="1"/>
<field name="holiday_status_id" select="1" />
<field name="employee_id" select="1" required="1"/>
<field name="department_id"/>
<field name="number_of_days_temp"/>
<notebook colspan="4">
<page string="General">
@ -107,6 +109,7 @@
<field name="name" select="1"/>
<field name="holiday_status_id" select="1"/>
<field name="employee_id" select="1" />
<field name="department_id"/>
<field name="type"/>
<field name="date_from" select="1" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
<field name="date_to" select="1" on_change="onchange_date_to(date_from, date_to)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
@ -138,6 +141,7 @@
<tree string="Leaves">
<field name="name"/>
<field name="employee_id"/>
<field name="department_id"/>
<field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
<field name="date_from"/>
<field name="date_to"/>

View File

@ -246,6 +246,7 @@ class hr_timesheet_sheet(osv.osv):
'period_ids': fields.one2many('hr_timesheet_sheet.sheet.day', 'sheet_id', 'Period', readonly=True),
'account_ids': fields.one2many('hr_timesheet_sheet.sheet.account', 'sheet_id', 'Analytic accounts', readonly=True),
'company_id': fields.many2one('res.company', 'Company'),
'department_id':fields.many2one('hr.department','Department'),
}
def _default_date_from(self,cr, uid, context={}):

View File

@ -8,6 +8,7 @@
<field name="arch" type="xml">
<tree string="Timesheets">
<field name="user_id"/>
<field name="department_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="name"/>
@ -27,6 +28,7 @@
<field name="arch" type="xml">
<tree string="Timesheets" editable="top">
<field name="user_id"/>
<field name="department_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="name"/>
@ -107,6 +109,7 @@
<field name="date_from"/>
<field name="date_to"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="department_id"/>
<notebook colspan="4">
<page string="Daily View">
<group col="6" colspan="4">

View File

@ -58,7 +58,7 @@
<menuitem action="open_module_tree_department" id="menu_department_def" parent="hr.menu_department_tree"/>
<!-- res.users inherit -->
<record model="ir.ui.view" id="view_users_form_inherit">
<!--<record model="ir.ui.view" id="view_users_form_inherit">
<field name="name">res.users.form</field>
<field name="type">form</field>
<field name="model">res.users</field>
@ -75,5 +75,5 @@
</field>
</record>
</data>
--></data>
</openerp>