diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 84490de2b53..d72467aafd5 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 context is None: + 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 selected Model can not be created\nPlease choose valid Model', ['object_id']) ] def onchange_server_type(self, cr, uid, ids, server_type=False, ssl=False): 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 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 40c39e10389..a6b6a0dd0b8 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ