From 42d6b54c2dff0fbdd8f86ba5da92ab8e8e1c41e4 Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Tue, 7 Dec 2010 11:41:50 +0530 Subject: [PATCH 1/3] [BUG-FIX] lp:680704 bzr revid: jam@tinyerp.com-20101207061150-swi023vg3fvb63y2 --- addons/fetchmail/fetchmail.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 84490de2b53..2308598a551 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -57,9 +57,8 @@ class email_server(osv.osv): 'user' : fields.char('User Name', size=256, required=True, readonly=True, states={'draft':[('readonly', False)]}), 'password' : fields.char('Password', size=1024, invisible=True, required=True, readonly=True, states={'draft':[('readonly', False)]}), 'note': fields.text('Description'), - 'action_id':fields.many2one('ir.actions.server', 'Reply Email', required=False, domain="[('state','=','email')]", - help="An Email Server Action. It will be run whenever an e-mail is fetched from server."), - 'object_id': fields.many2one('ir.model', "Model", required=True, help="OpenObject Model. Generates a record of this model."), + 'action_id':fields.many2one('ir.actions.server', 'Email Server Action', required=False, domain="[('state','=','email')]", help="An Email Server Action. It will be run whenever an e-mail is fetched from server."), + 'object_id': fields.many2one('ir.model', "Model", required=True, help="OpenObject Model. Generates a record of this model.\nSelect Object with message_new attrbutes."), 'priority': fields.integer('Server Priority', readonly=True, states={'draft':[('readonly', False)]}, help="Priority between 0 to 10, select define the order of Processing"), 'user_id':fields.many2one('res.users', 'User', required=False), 'message_ids': fields.one2many('mailgate.message', 'server_id', 'Messages', readonly=True), @@ -82,8 +81,19 @@ class email_server(osv.osv): return False return True + def check_model(self, cr, uid, ids, context = None): + if not context: + context = {} + current_rec = self.read(cr, uid, ids, context)[0] + if current_rec: + model = self.pool.get(current_rec.get('object_id')[1]) + if hasattr(model, 'message_new'): + return True + return False + _constraints = [ - (check_duplicate, 'Warning! Can\'t have duplicate server configuration!', ['user', 'password']) + (check_duplicate, 'Warning! Can\'t have duplicate server configuration!', ['user', 'password']), + (check_model, 'Warning! Record for slected Model can not be created\nPlease choose valid Model', ['object_id']) ] def onchange_server_type(self, cr, uid, ids, server_type=False, ssl=False): From e27c993dd00a2fa3e31c63ec3414cf1705e6acd3 Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Tue, 7 Dec 2010 12:09:45 +0530 Subject: [PATCH 2/3] [BUG-FIX] lp:685977 bzr revid: jam@tinyerp.com-20101207063945-bwm3s2b4jqbd24kp --- addons/thunderbird/__openerp__.py | 10 +++++----- addons/thunderbird/partner/partner.py | 4 ++-- addons/thunderbird/plugin/openerp_plugin.xpi | Bin 155946 -> 155946 bytes 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/thunderbird/__openerp__.py b/addons/thunderbird/__openerp__.py index ed16b4909a9..03c974013fa 100644 --- a/addons/thunderbird/__openerp__.py +++ b/addons/thunderbird/__openerp__.py @@ -29,11 +29,11 @@ "description": """ This module is required for the thuderbird plug-in to work properly. - - This allows you to select an object that you’d like to add - to your email and its attachments. You can select a partner, a task, - a project, an analytical account, or any other object and attach selected - mail as .eml file in attachment of selected record. + The Plugin allows you archive email and its attachments to the selected + OpenERP objects. You can select a partner, a task, a project, an analytical + account,or any other object and attach selected mail as .eml file in + attachment of selected record. You can create Documents for crm Lead, + HR Applicant and project issue from selected mails. """, "init_xml" : [], diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py index 5c77c622c79..1eb898e527e 100644 --- a/addons/thunderbird/partner/partner.py +++ b/addons/thunderbird/partner/partner.py @@ -131,11 +131,11 @@ email_server_tools() class thunderbird_partner(osv.osv_memory): _name = "thunderbird.partner" - _description="Thunderbid mails" + _description="Thunderbid Plugin Tools" def create_contact(self,cr,user,vals): dictcreate = dict(vals) - # Set False value if 'undefined'. Thunerbird set 'undefined' if user did not set any value. + # Set False value if 'undefined' for record. Id User does not spicify the values, Thunerbird set 'undefined' by default for new contact. for key in dictcreate: if dictcreate[key] == 'undefined': dictcreate[key] = False diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi index 40c39e10389acfc0f40c797441e1f77edc01ee55..a6b6a0dd0b8351ddfa9839088bed89c9ddb33d18 100644 GIT binary patch delta 550 zcmV+>0@?kl!U?Lv34pW#)G7_TTZcUo!hWap0ssK@m*FY_Cfv+0@>HBHCvng~lfnt&eGZ zvi3K1CUsX zS-K^wte}h1VjiC4%_CBITb~w5VG0eFXCT+Gb@_AceC}zhJ;M6-^ZqUem$x&23VFBY z%l+LU13AT6K`Rc-uMvC-h1xH*?L*Qv zBaEPibZ6;TZSi}8e8$+#)o?Z~+3DxmF#?>{~K`Vac)Yk&CFp`e?f zU+g)Z&}3AMP4bog8P>PW|;Zz4}dzS_NaUHk=5O9KR#eqI6?hcGSyw=gaO@-Gd$ oTZcUo!hWap0ssK@moHudHUnAB{g=^60v4CRT>=WXh+YDs0zCN<5&!@I delta 550 zcmV+>0@?kl!U?Lv34pW#)G7_dd~iL%9ut=I0ssK?m*FY_C!`7v8%l045lh>8l|=9Vq3u8^jPHb_P$H?m&PymK$~)owB~YLQ04cKhAn z<38>#FeI>>`V4MI^=V6qYT=hXdpLf7B#OK}UL{C}(L=4MmU%NuyZMTeBQY1sd5~d5 zZDWnn4)gZ<3M2ZkJbfBXRp^bVLf>V$+5MD4?rQIHufZ`PNVwA-eBNp_`K+x7gYG;_ zo25&#$_lzCE#~1#-aI0exAkd}6sFK%c?NO~TbDoA&gY)C+9RxQKkx5yaCtj_qL6oM zzTDp(GLTc86$GR4DFH`XlLACgIn~40t^lgx;AT8N$+wqAR>3CU_Zq>cP^kS<+dd@S zGQtRINOzWg)fT@e$Y+e*Tn%T_k`1q?my_Xqd^H`iODyNpIfrXD`9nK%%nIX46T0Sb z!j8VpI|aV_CrlcH_TSOTieID}bMHOw9V>Re9paR-%`2N$wum7N*zV?S-9SXV# z`o*5p3C-4El~9YzNQb|rua0yq`X=&Z=WXh+YDs0(=k#nE(I) From 9e49acd59c8021bd1c5eb7e49c8dce74b0fb940c Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Tue, 7 Dec 2010 12:54:41 +0530 Subject: [PATCH 3/3] [BUG-FIX] lp:674241 bzr revid: jam@tinyerp.com-20101207072441-7vi87ppbr0s2zk6p --- addons/project_long_term/security/ir.model.access.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project_long_term/security/ir.model.access.csv b/addons/project_long_term/security/ir.model.access.csv index 3aaebb64294..6d4961f2cfe 100644 --- a/addons/project_long_term/security/ir.model.access.csv +++ b/addons/project_long_term/security/ir.model.access.csv @@ -1,8 +1,8 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_project_phase","project.phase","model_project_phase","project.group_project_user",1,1,1,0 "access_project_resource_allocation","project.resource.allocation","model_project_resource_allocation","project.group_project_user",1,0,0,0 -"access_project_phase_manager","project.phase manager","model_project_phase","project.group_project_manager",1,0,0,0 -"access_project_resource_allocation_manager","project.resource.allocation manager","model_project_resource_allocation","project.group_project_manager",1,0,0,0 +"access_project_phase_manager","project.phase manager","model_project_phase","project.group_project_manager",1,1,1,1 +"access_project_resource_allocation_manager","project.resource.allocation manager","model_project_resource_allocation","project.group_project_manager",1,1,1,1 "access_resource_resource_user","resource.resource user","resource.model_resource_resource","project.group_project_user",1,0,0,0 "access_resource_calendar_leaves_user","resource.calendar.leaves user","resource.model_resource_calendar_leaves","project.group_project_user",1,1,1,1 "access_resource_resource_manager","resource.resource manager","resource.model_resource_resource","project.group_project_manager",1,1,1,1