[IMp]:Improve code in crm
bzr revid: aja@tinyerp.com-20121025094231-ggp3s17n7r5ndkt5
This commit is contained in:
parent
1ae6bd0bd5
commit
9954cd3d08
|
@ -336,7 +336,7 @@ class calendar_attendee(osv.osv):
|
|||
('non-participant', 'For information Purpose')], 'Role', \
|
||||
help='Participation role for the calendar user'),
|
||||
'state': fields.selection([('needs-action', 'Needs Action'),
|
||||
('tentative', 'Tentative'),
|
||||
('tentative', 'Uncertain'),
|
||||
('declined', 'Declined'),
|
||||
('accepted', 'Accepted'),
|
||||
('delegated', 'Delegated')], 'Status', readonly=True, \
|
||||
|
@ -559,7 +559,8 @@ property or property parameter."),
|
|||
for vals in self.browse(cr, uid, ids, context=context):
|
||||
if vals.ref and vals.ref.user_id:
|
||||
mod_obj = self.pool.get(vals.ref._name)
|
||||
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
|
||||
res=mod_obj.read(cr,uid,[vals.ref.id],['duration','class'],context)
|
||||
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id,'duration':res[0]['duration'],'class':res[0]['class']}
|
||||
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
|
||||
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
|
||||
|
||||
|
@ -1012,7 +1013,7 @@ class calendar_event(osv.osv):
|
|||
'Show Time as', states={'done': [('readonly', True)]}),
|
||||
'base_calendar_url': fields.char('Caldav URL', size=264),
|
||||
'state': fields.selection([
|
||||
('tentative', 'Tentative'),
|
||||
('tentative', 'Uncertain'),
|
||||
('cancelled', 'Cancelled'),
|
||||
('confirmed', 'Confirmed'),
|
||||
], 'Status', readonly=True),
|
||||
|
|
|
@ -1146,7 +1146,7 @@ msgstr ""
|
|||
#: selection:calendar.attendee,state:0
|
||||
#: selection:calendar.event,state:0
|
||||
#: selection:calendar.todo,state:0
|
||||
msgid "Tentative"
|
||||
msgid "Uncertain"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_calendar
|
||||
|
|
|
@ -896,6 +896,9 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
lead.message_post(body=message)
|
||||
return True
|
||||
|
||||
def onchange_state(self, cr, uid, ids, state_id, context=None):
|
||||
state=self.pool.get('res.country.state').browse(cr, uid, state_id, context)
|
||||
return {'value':{'country_id':state.country_id.id,'zip':''}}
|
||||
crm_lead()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<field name="street2"/>
|
||||
<div class="address_format">
|
||||
<field name="city" placeholder="City" style="width: 40%%"/>
|
||||
<field name="state_id" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
|
||||
<field name="state_id" on_change="onchange_state(state_id)" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
|
||||
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
|
||||
</div>
|
||||
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<act_window
|
||||
id="crm_case_categ_phone_create_partner"
|
||||
name="Schedule a Call"
|
||||
res_model="crm.phonecall"
|
||||
view_mode="tree,form,calendar"
|
||||
context="{'search_default_partner_id': active_id, 'default_duration': 1.0, 'default_partner_id': active_id}"
|
||||
groups="base.group_sale_salesman"
|
||||
/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_create_partner">
|
||||
<field name="name">Schedule a Call</field>
|
||||
<field name="res_model">crm.phonecall</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="context">{'search_default_partner_id': active_id, 'default_duration': 1.0, 'default_partner_id': active_id}</field>
|
||||
<field name="groups">base.group_sale_salesman</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
No call for this contact found.
|
||||
OpenERP allows you to easily define all the calls to be done by your sales team and follow up based on their summary.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<!-- TO CONFIRM: This is fine -->
|
||||
<!-- act_window
|
||||
id="act_crm_phonecall_crm_meeting_new"
|
||||
|
|
Loading…
Reference in New Issue