diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-16 11:23:48 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-16 11:23:48 +0530 |
| commit | 7d5e28fbb8d49b8a2825bfdd525938d99574e234 (patch) | |
| tree | c1e90a7757ef2b3fee2190a44a4f7d448707d23b /addons/fetchmail | |
| parent | 953a15d2a7391370414462402198780b06d45243 (diff) | |
| parent | 4e307d022c8fbdba848b8a4f57d668a4b6bd036f (diff) | |
[MERGE]: Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: rpa@tinyerp.com-20101216055348-7yrvv48hjq15grv9
Diffstat (limited to 'addons/fetchmail')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 26 | ||||
| -rw-r--r-- | addons/fetchmail/i18n/fetchmail.pot | 39 | ||||
| -rw-r--r-- | addons/fetchmail/i18n/pt.po | 6 |
3 files changed, 41 insertions, 30 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 7592061ec36..772771db915 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -71,9 +71,9 @@ class email_server(osv.osv): 'user_id': lambda self, cr, uid, ctx: uid, } - def check_duplicate(self, cr, uid, ids): + def check_duplicate(self, cr, uid, ids, context=None): # RFC *-* Why this limitation? why not in SQL constraint? - vals = self.read(cr, uid, ids, ['user', 'password'])[0] + vals = self.read(cr, uid, ids, ['user', 'password'], context=context)[0] cr.execute("select count(id) from email_server where user=%s and password=%s", (vals['user'], vals['password'])) res = cr.fetchone() if res: @@ -105,12 +105,14 @@ class email_server(osv.osv): return {'value':{'port':port}} - def set_draft(self, cr, uid, ids, context={}): + def set_draft(self, cr, uid, ids, context=None): self.write(cr, uid, ids , {'state':'draft'}) return True - def button_confirm_login(self, cr, uid, ids, context={}): - for server in self.browse(cr, uid, ids, context): + def button_confirm_login(self, cr, uid, ids, context=None): + if context is None: + context = {} + for server in self.browse(cr, uid, ids, context=context): logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name)) context.update({'server_id': server.id, 'server_type': server.type}) try: @@ -144,20 +146,22 @@ class email_server(osv.osv): logger.notifyChannel(server.type, netsvc.LOG_WARNING, '%s' % (e)) return True - def button_fetch_mail(self, cr, uid, ids, context={}): + def button_fetch_mail(self, cr, uid, ids, context=None): self.fetch_mail(cr, uid, ids, context=context) return True - def _fetch_mails(self, cr, uid, ids=False, context={}): + def _fetch_mails(self, cr, uid, ids=False, context=None): if not ids: ids = self.search(cr, uid, []) return self.fetch_mail(cr, uid, ids, context=context) - def fetch_mail(self, cr, uid, ids, context={}): + def fetch_mail(self, cr, uid, ids, context=None): + if context is None: + context = {} email_tool = self.pool.get('email.server.tools') action_pool = self.pool.get('ir.actions.server') context.update({'get_server': True}) - for server in self.browse(cr, uid, ids, context): + for server in self.browse(cr, uid, ids, context=context): count = 0 user = server.user_id.id or uid try: @@ -215,7 +219,7 @@ class mailgate_message(osv.osv): _order = 'id desc' def create(self, cr, uid, values, context=None): - if not context: + if context is None: context={} server_id = context.get('server_id',False) server_type = context.get('server_type',False) @@ -227,7 +231,7 @@ class mailgate_message(osv.osv): return res def write(self, cr, uid, ids, values, context=None): - if not context: + if context is None: context={} server_id = context.get('server_id',False) server_type = context.get('server_type',False) diff --git a/addons/fetchmail/i18n/fetchmail.pot b/addons/fetchmail/i18n/fetchmail.pot index 5c6a033854e..815cb9a15fe 100644 --- a/addons/fetchmail/i18n/fetchmail.pot +++ b/addons/fetchmail/i18n/fetchmail.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-03 15:43:33+0000\n" -"PO-Revision-Date: 2010-12-03 15:43:33+0000\n" +"POT-Creation-Date: 2010-12-15 15:05:19+0000\n" +"PO-Revision-Date: 2010-12-15 15:05:19+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,6 +16,12 @@ msgstr "" "Plural-Forms: \n" #. module: fetchmail +#: constraint:email.server:0 +msgid "Warning! Record for selected Model can not be created\n" +"Please choose valid Model" +msgstr "" + +#. module: fetchmail #: selection:email.server,state:0 msgid "Confirmed" msgstr "" @@ -26,11 +32,6 @@ msgid "Confirm" msgstr "" #. module: fetchmail -#: field:email.server,action_id:0 -msgid "Reply Email" -msgstr "" - -#. module: fetchmail #: view:email.server:0 msgid "Group By..." msgstr "" @@ -73,8 +74,9 @@ msgid "Description" msgstr "" #. module: fetchmail -#: field:email.server,priority:0 -msgid "Server Priority" +#: help:email.server,object_id:0 +msgid "OpenObject Model. Generates a record of this model.\n" +"Select Object with message_new attrbutes." msgstr "" #. module: fetchmail @@ -108,8 +110,8 @@ msgid "Waiting for Verification" msgstr "" #. module: fetchmail -#: help:email.server,object_id:0 -msgid "OpenObject Model. Generates a record of this model." +#: field:email.server,password:0 +msgid "Password" msgstr "" #. module: fetchmail @@ -198,11 +200,6 @@ msgid "POP/IMAP Server" msgstr "" #. module: fetchmail -#: field:email.server,password:0 -msgid "Password" -msgstr "" - -#. module: fetchmail #: constraint:email.server:0 msgid "Warning! Can't have duplicate server configuration!" msgstr "" @@ -266,6 +263,16 @@ msgid "Priority between 0 to 10, select define the order of Processing" msgstr "" #. module: fetchmail +#: field:email.server,action_id:0 +msgid "Email Server Action" +msgstr "" + +#. module: fetchmail +#: field:email.server,priority:0 +msgid "Server Priority" +msgstr "" + +#. module: fetchmail #: view:mailgate.message:0 #: field:mailgate.message,server_id:0 msgid "Mail Server" diff --git a/addons/fetchmail/i18n/pt.po b/addons/fetchmail/i18n/pt.po index 5bd2230584d..49b9827e835 100644 --- a/addons/fetchmail/i18n/pt.po +++ b/addons/fetchmail/i18n/pt.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2010-12-03 15:43+0000\n" -"PO-Revision-Date: 2010-12-12 15:16+0000\n" -"Last-Translator: Rui Franco (multibase.pt) <Unknown>\n" +"PO-Revision-Date: 2010-12-14 23:19+0000\n" +"Last-Translator: OpenERP Administrators <Unknown>\n" "Language-Team: Portuguese <pt@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-12-14 05:34+0000\n" +"X-Launchpad-Export-Date: 2010-12-15 05:18+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: fetchmail |
