Skip to content

Commit

Permalink
Merge pull request openlabs#8 from kavitanjalisingh/dev
Browse files Browse the repository at this point in the history
LGTM
  • Loading branch information
Sharoon Thomas committed Nov 20, 2011
2 parents b72c719 + e4b84ae commit 4506910
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -1167,7 +1167,7 @@ def _get_folders(self, cr, uid, context=None):
else:
data = folders
if data.find('Noselect') == -1: #If it is a selectable folder
if folder_readable_name:
if folder_readable_name:
folderlist.append(
(folder_readable_name,
folder_readable_name)
Expand Down Expand Up @@ -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
}

Expand All @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion core_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 4506910

Please sign in to comment.