Skip to content
Browse files

Used account_id instead of active_id

  • Loading branch information...
1 parent b72c719 commit 790a2bf4fdcf72e21b6e3a16f8ab1f903287b891 @kavitanjalisingh kavitanjalisingh committed Nov 20, 2011
Showing with 5 additions and 5 deletions.
  1. +4 −4 core.py
  2. +1 −1 core_view.xml
View
8 core.py
@@ -1134,10 +1134,10 @@ def makereadable(self, imap_folder):
return False
def _get_folders(self, cr, uid, context=None):
- if 'active_ids' in context.keys():
+ if 'account_id' in context.keys():
record = self.pool.get(
'poweremail.core_accounts'
- ).browse(cr, uid, context['active_ids'][0], context)
+ ).browse(cr, uid, context['account_id'], context)
if record:
folderlist = []
try:
@@ -1197,7 +1197,7 @@ def _get_folders(self, cr, uid, context=None):
}
_defaults = {
- 'name':lambda self, cr, uid, ctx: ctx['active_ids'][0],
+ 'name':lambda self, cr, uid, ctx: ctx['account_id'],
'folder': lambda self, cr, uid, ctx:self.inboxvalue
}
@@ -1210,7 +1210,7 @@ def sel_folder(self, cr, uid, ids, context=None):
['folder'], context)[0]['folder'] == 'invalid':
self.pool.get(
'poweremail.core_accounts'
- ).write(cr, uid, context['active_ids'][0],
+ ).write(cr, uid, context['account_id'],
{
'isfolder':self.read(cr, uid, ids,
['folder'],
View
2 core_view.xml
@@ -80,7 +80,7 @@
<field name="iserver_type" select="2" colspan="2" attrs="{'required':[('iserver','!=',False)]}" />
<group col="4" colspan="2">
<field name="isfolder" colspan="2" attrs="{'invisible':[('iserver_type','=','pop3')]}" />
- <button name="%(act_selfolder_form)d" type="action" string="Select Folder" attrs="{'invisible':[('iserver_type','=','pop3')]}" colspan="2" target="new"/>
+ <button name="%(act_selfolder_form)d" type="action" string="Select Folder" attrs="{'invisible':[('iserver_type','=','pop3')]}" colspan="2" target="new" context="{'account_id': active_id}"/>
</group>
</group>

0 comments on commit 790a2bf

Please sign in to comment.
Something went wrong with that request. Please try again.