~openerp-community-leaders/poweremail/poweremail-github-mirror

« back to all changes in this revision

Viewing changes to core.py

  • Committer: Sharoon Thomas
  • Date: 2011-11-20 13:39:26 UTC
  • mfrom: (233.1.2)
  • Revision ID: git-v1:450691053d18cce73b7d9917530e3db82bbf22b1
Merge pull request #8 from kavitanjalisingh/dev

LGTM

Show diffs side-by-side

added added

removed removed

Lines of Context:
1134
1134
        return False
1135
1135
 
1136
1136
    def _get_folders(self, cr, uid, context=None):
1137
 
        if 'active_ids' in context.keys():
 
1137
        if 'account_id' in context.keys():
1138
1138
            record = self.pool.get(
1139
1139
                        'poweremail.core_accounts'
1140
 
                        ).browse(cr, uid, context['active_ids'][0], context)
 
1140
                        ).browse(cr, uid, context['account_id'], context)
1141
1141
            if record:
1142
1142
                folderlist = []
1143
1143
                try:
1167
1167
                        else:
1168
1168
                            data = folders
1169
1169
                        if data.find('Noselect') == -1: #If it is a selectable folder
1170
 
                            if folder_readable_name:
 
1170
                            if folder_readable_name:
1171
1171
                                folderlist.append(
1172
1172
                                                  (folder_readable_name,
1173
1173
                                                   folder_readable_name)
1197
1197
    }
1198
1198
 
1199
1199
    _defaults = {
1200
 
        'name':lambda self, cr, uid, ctx: ctx['active_ids'][0],
 
1200
        'name':lambda self, cr, uid, ctx: ctx['account_id'],
1201
1201
        'folder': lambda self, cr, uid, ctx:self.inboxvalue
1202
1202
    }
1203
1203
 
1210
1210
                             ['folder'], context)[0]['folder'] == 'invalid':
1211
1211
                self.pool.get(
1212
1212
                        'poweremail.core_accounts'
1213
 
                            ).write(cr, uid, context['active_ids'][0],
 
1213
                            ).write(cr, uid, context['account_id'],
1214
1214
                                    {
1215
1215
                                     'isfolder':self.read(cr, uid, ids,
1216
1216
                                                  ['folder'],