[IMP] better view
bzr revid: fp@tinyerp.com-20100625172851-k4lsqh2qygxvt4aw
This commit is contained in:
@@ -37,7 +37,6 @@ class crm_lead(osv.osv, crm_case):
|
||||
_description = "Lead"
|
||||
_order = "priority, id desc"
|
||||
_inherit = ['mailgate.thread','res.partner.address']
|
||||
|
||||
def _compute_day(self, cr, uid, ids, fields, args, context={}):
|
||||
"""
|
||||
@param cr: the current row, from the database cursor,
|
||||
|
||||
@@ -165,9 +165,10 @@
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
<field name="email_to"/>
|
||||
<field name="date"/>
|
||||
<field name="name" colspan="6"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
|
||||
@@ -83,6 +83,9 @@ class crm_lead2opportunity(osv.osv_memory):
|
||||
}
|
||||
lead_obj.write(cr, uid, lead.id, vals, context=context)
|
||||
lead_obj._history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)
|
||||
if lead.partner_id:
|
||||
msg_ids = [ x.id for x in lead.message_ids]
|
||||
self.pool.get('mailgate.message').write(cr, uid, msg_ids, {'partner_id': lead.partner_id.id}, context=context)
|
||||
|
||||
value = {
|
||||
'name': _('Opportunity'),
|
||||
|
||||
@@ -127,7 +127,7 @@ class mailgate_message(osv.osv):
|
||||
_description = 'Mailgateway Message'
|
||||
_order = 'id desc'
|
||||
_columns = {
|
||||
'name':fields.char('Message', size=64),
|
||||
'name':fields.char('Subject', size=128),
|
||||
'model': fields.char('Object Name', size=128),
|
||||
'res_id': fields.integer('Resource ID'),
|
||||
'ref_id': fields.char('Reference Id', size=256, readonly=True, help="Message Id in Email Server.", select=True),
|
||||
|
||||
@@ -23,7 +23,6 @@ from osv import fields, osv
|
||||
|
||||
class wiki_create_menu(osv.osv_memory):
|
||||
""" Create Menu """
|
||||
|
||||
_name = "wiki.create.menu"
|
||||
_description = "Wizard Create Menu"
|
||||
|
||||
@@ -43,6 +42,12 @@ class wiki_create_menu(osv.osv_memory):
|
||||
"""
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
action_id = mod_obj._get_id(cr, uid, 'wiki', 'action_view_wiki_wiki_page_open')
|
||||
print context
|
||||
action_id = mod_obj.copy(cr, uid, action_id, context=context, default={
|
||||
'domain':"[('group_id','=',"+str(context.get('active_id',False))+"]"
|
||||
|
||||
|
||||
})
|
||||
|
||||
for menu in self.browse(cr, uid, ids):
|
||||
menu_id = self.pool.get('ir.ui.menu').create(cr, uid, {
|
||||
@@ -51,6 +56,7 @@ class wiki_create_menu(osv.osv_memory):
|
||||
'icon': 'STOCK_DIALOG_QUESTION',
|
||||
'action': 'ir.actions.act_window,'+ str(action_id)
|
||||
}, context)
|
||||
print 'Created menu', menu_id, action_id
|
||||
home = menu.page.id
|
||||
group_id = menu.id
|
||||
res = {
|
||||
|
||||
Reference in New Issue
Block a user