[MERGE] crm improvements
bzr revid: fp@tinyerp.com-20121102091325-cesxnckhwg77tx6w
This commit is contained in:
commit
67fc9a997c
|
@ -336,7 +336,7 @@ class calendar_attendee(osv.osv):
|
||||||
('non-participant', 'For information Purpose')], 'Role', \
|
('non-participant', 'For information Purpose')], 'Role', \
|
||||||
help='Participation role for the calendar user'),
|
help='Participation role for the calendar user'),
|
||||||
'state': fields.selection([('needs-action', 'Needs Action'),
|
'state': fields.selection([('needs-action', 'Needs Action'),
|
||||||
('tentative', 'Tentative'),
|
('tentative', 'Uncertain'),
|
||||||
('declined', 'Declined'),
|
('declined', 'Declined'),
|
||||||
('accepted', 'Accepted'),
|
('accepted', 'Accepted'),
|
||||||
('delegated', 'Delegated')], 'Status', readonly=True, \
|
('delegated', 'Delegated')], 'Status', readonly=True, \
|
||||||
|
@ -559,7 +559,8 @@ property or property parameter."),
|
||||||
for vals in self.browse(cr, uid, ids, context=context):
|
for vals in self.browse(cr, uid, ids, context=context):
|
||||||
if vals.ref and vals.ref.user_id:
|
if vals.ref and vals.ref.user_id:
|
||||||
mod_obj = self.pool.get(vals.ref._name)
|
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)
|
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
|
||||||
self.write(cr, uid, vals.id, {'state': 'accepted'}, 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)]}),
|
'Show Time as', states={'done': [('readonly', True)]}),
|
||||||
'base_calendar_url': fields.char('Caldav URL', size=264),
|
'base_calendar_url': fields.char('Caldav URL', size=264),
|
||||||
'state': fields.selection([
|
'state': fields.selection([
|
||||||
('tentative', 'Tentative'),
|
('tentative', 'Uncertain'),
|
||||||
('cancelled', 'Cancelled'),
|
('cancelled', 'Cancelled'),
|
||||||
('confirmed', 'Confirmed'),
|
('confirmed', 'Confirmed'),
|
||||||
], 'Status', readonly=True),
|
], 'Status', readonly=True),
|
||||||
|
|
|
@ -1146,7 +1146,7 @@ msgstr ""
|
||||||
#: selection:calendar.attendee,state:0
|
#: selection:calendar.attendee,state:0
|
||||||
#: selection:calendar.event,state:0
|
#: selection:calendar.event,state:0
|
||||||
#: selection:calendar.todo,state:0
|
#: selection:calendar.todo,state:0
|
||||||
msgid "Tentative"
|
msgid "Uncertain"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: base_calendar
|
#. module: base_calendar
|
||||||
|
|
|
@ -251,7 +251,7 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||||
'street2': fields.char('Street2', size=128),
|
'street2': fields.char('Street2', size=128),
|
||||||
'zip': fields.char('Zip', change_default=True, size=24),
|
'zip': fields.char('Zip', change_default=True, size=24),
|
||||||
'city': fields.char('City', size=128),
|
'city': fields.char('City', size=128),
|
||||||
'state_id': fields.many2one("res.country.state", 'State', domain="[('country_id','=',country_id)]"),
|
'state_id': fields.many2one("res.country.state", 'State'),
|
||||||
'country_id': fields.many2one('res.country', 'Country'),
|
'country_id': fields.many2one('res.country', 'Country'),
|
||||||
'phone': fields.char('Phone', size=64),
|
'phone': fields.char('Phone', size=64),
|
||||||
'fax': fields.char('Fax', size=64),
|
'fax': fields.char('Fax', size=64),
|
||||||
|
@ -896,6 +896,10 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||||
lead.message_post(body=message)
|
lead.message_post(body=message)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
crm_lead()
|
def onchange_state(self, cr, uid, ids, state_id, context=None):
|
||||||
|
if state_id:
|
||||||
|
country_id=self.pool.get('res.country.state').browse(cr, uid, state_id, context).country_id.id
|
||||||
|
return {'value':{'country_id':country_id}}
|
||||||
|
return {}
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
<field name="street2"/>
|
<field name="street2"/>
|
||||||
<div class="address_format">
|
<div class="address_format">
|
||||||
<field name="city" placeholder="City" style="width: 40%%"/>
|
<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%%"/>
|
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
|
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
|
||||||
|
@ -477,7 +477,7 @@
|
||||||
<field name="street2"/>
|
<field name="street2"/>
|
||||||
<div class="address_format">
|
<div class="address_format">
|
||||||
<field name="city" placeholder="City" style="width: 40%%"/>
|
<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" options='{"no_open": True}' on_change="onchange_state(state_id)" placeholder="State" style="width: 24%%"/>
|
||||||
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
|
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
|
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
|
||||||
|
|
Loading…
Reference in New Issue