[IMP] hr_recruitmentimprovemeeting
bzr revid: pna@tinyerp.com-20120608102420-gltq7a4qtaib2zmu
This commit is contained in:
parent
18765c5880
commit
98955baf73
|
@ -41,7 +41,7 @@ class crm_meeting(base_state, osv.Model):
|
|||
# base_state required fields
|
||||
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team', states={'done': [('readonly', True)]}, \
|
||||
select=True, help='Sales team to which Case belongs to.'),
|
||||
select=True, groups='base.group_sale_salesman_all_leads,base.group_sale_manager', help='Sales team to which Case belongs to.'),
|
||||
'email_from': fields.char('Email', size=128, states={'done': [('readonly', True)]}, help="These people will receive email."),
|
||||
'create_date': fields.datetime('Creation Date' , readonly=True),
|
||||
'write_date': fields.datetime('Write Date' , readonly=True),
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.categ" id="categ_meet4">
|
||||
<field name="name">Interview</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_meeting">
|
||||
<field name="name">Meeting</field>
|
||||
<field name="object">crm.meeting</field>
|
||||
|
|
|
@ -312,7 +312,7 @@ class hr_applicant(base_stage, osv.Model):
|
|||
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
|
||||
res = data_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
|
||||
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
|
||||
id2 = data_obj._get_id(cr, uid, 'hr_recruitment', 'crm_case_form_view_meet1')
|
||||
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
|
||||
if id1:
|
||||
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
|
||||
|
@ -320,12 +320,15 @@ class hr_applicant(base_stage, osv.Model):
|
|||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if id3:
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
cate_id = self.pool.get('crm.case.categ').search(cr,uid,[('name','=','Interview')])
|
||||
|
||||
context.update({
|
||||
'default_applicant_id': opp.id,
|
||||
'default_department_id': opp.department_id.id,
|
||||
'default_partner_id': opp.partner_id and opp.partner_id.id or False,
|
||||
'default_email_from': opp.email_from,
|
||||
'default_state': 'open',
|
||||
'default_categ_id':cate_id and cate_id[0],
|
||||
'default_name': opp.name
|
||||
})
|
||||
value = {
|
||||
|
@ -582,6 +585,7 @@ class crm_meeting(osv.osv):
|
|||
_inherit = 'crm.meeting'
|
||||
_columns = {
|
||||
'applicant_id': fields.many2one('hr.applicant','Applicant Meeting'),
|
||||
'department_id': fields.many2one('hr.department', 'Department',groups="base.group_hr_user,base.group_hr_manager"),
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -469,7 +469,201 @@
|
|||
parent="menu_hr_recruitment_recruitment"
|
||||
action="hr_recruitment_source_action"
|
||||
sequence="10" groups="base.group_no_one"/>
|
||||
<record model="ir.ui.view" id="crm_case_form_view_meet1">
|
||||
<field name="name">CRM - Meetings Form</field>
|
||||
<field name="model">crm.meeting</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Meetings" layout="manual">
|
||||
<header>
|
||||
<button name="case_open" string="Confirm" type="object"
|
||||
states="draft"/>
|
||||
<button name="case_close" string="Done" type="object"
|
||||
states="open"/>
|
||||
<button name="case_reset" string="Reset to Unconfirmed" type="object"
|
||||
states="cancel,done"/>
|
||||
<button name="case_cancel" string="Cancel" type="object"
|
||||
states="draft,open"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
|
||||
</header>
|
||||
<sheet layout="auto">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Title"
|
||||
required="1" />
|
||||
<field name="categ_id" widget="selection"
|
||||
string="Meeting Type"
|
||||
domain="[('object_id.model', '=', 'crm.meeting')]" />
|
||||
<field name="allday" on_change="onchange_dates(date,False,False,allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="date_deadline" string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)" />
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder"
|
||||
widget="selection" />
|
||||
<group colspan="2" col="4" attrs="{'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
|
||||
<field name="recurrency" string="Recurrence"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Meeting">
|
||||
<group col="6" colspan="4">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Assignment"/>
|
||||
<field name="user_id" />
|
||||
<field name="organizer"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
</group><group col="2" colspan="2">
|
||||
<separator colspan="2" string="Contacts"/>
|
||||
<field name="partner_id" string="Applciant"
|
||||
on_change="onchange_partner_id(partner_id)" />
|
||||
<field name="email_from"/>
|
||||
</group><group col="2" colspan="2">
|
||||
<separator colspan="2" string="Visibility"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="show_as" string="Show Time as"/>
|
||||
<field name="rrule" invisible="1" readonly="1"/>
|
||||
<field name="recurrent_id" invisible="1"/>
|
||||
<field name="recurrent_uid" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
attrs="{'readonly': [('state', '=', 'done')]}"
|
||||
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
<field name="email" string="Mail To"/>
|
||||
<field name="role" select="1" />
|
||||
<field name="state" />
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain" type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept" string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object" icon="gtk-apply" />
|
||||
<button name="do_decline" string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object" icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate" type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" />
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain"
|
||||
type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept"
|
||||
string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object"
|
||||
icon="gtk-apply" />
|
||||
<button name="do_decline"
|
||||
string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate"
|
||||
type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other">
|
||||
<field name="user_id"/>
|
||||
<newline />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Recurrence Options" attrs="{'invisible': [('recurrency','=',False)], 'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
|
||||
<group col="4" colspan="4" name="rrule">
|
||||
<group col="4" colspan="4">
|
||||
<field name="rrule_type" string=" Recurrence Pattern" />
|
||||
<field name="interval" />
|
||||
<separator string="End of Recurrence" colspan="4"/>
|
||||
<field name="end_type" />
|
||||
<label string=" " colspan="2" />
|
||||
<newline />
|
||||
<field name="count" attrs="{'invisible' : [('end_type', '!=', 'count')] }"/>
|
||||
<label string=" " colspan="2" />
|
||||
<newline />
|
||||
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}"/>
|
||||
<newline />
|
||||
|
||||
|
||||
</group>
|
||||
<group col="8" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
|
||||
<separator string="Choose day where repeat the meeting" colspan="8"/>
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<newline/>
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('rrule_type','!=','monthly')]}">
|
||||
<separator string="Choose day in the month where repeat the meeting" colspan="12"/>
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date'), ('rrule_type','=','monthly')],
|
||||
'invisible' : [('select1','=','day')]}" />
|
||||
</group>
|
||||
<group col="3" colspan="1">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')], 'invisible' : [('select1','=','date')]}" />
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')], 'invisible' : [('select1','=','date')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue