[MIG] mail_environment to 13.0

This commit is contained in:
Alexandre Fayolle 2019-10-10 19:22:29 +02:00 committed by Adrien Peiffer
parent 079634e925
commit c5c70cbf77
No known key found for this signature in database
GPG Key ID: D9266D898B218452
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
{ {
"name": "Mail configuration with server_environment", "name": "Mail configuration with server_environment",
"version": "12.0.1.0.0", "version": "13.0.1.0.0",
"category": "Tools", "category": "Tools",
"summary": "Configure mail servers with server_environment_files", "summary": "Configure mail servers with server_environment_files",
"author": "Camptocamp, Odoo Community Association (OCA)", "author": "Camptocamp, Odoo Community Association (OCA)",

View File

@ -16,7 +16,7 @@ class FetchmailServer(models.Model):
mail_fields = { mail_fields = {
"server": {}, "server": {},
"port": {}, "port": {},
"type": {}, "server_type": {},
"user": {}, "user": {},
"password": {}, "password": {},
"is_ssl": {}, "is_ssl": {},
@ -26,7 +26,7 @@ class FetchmailServer(models.Model):
mail_fields.update(base_fields) mail_fields.update(base_fields)
return mail_fields return mail_fields
type = fields.Selection(search='_search_type') server_type = fields.Selection(search='_search_server_type')
@api.model @api.model
def _server_env_global_section_name(self): def _server_env_global_section_name(self):
@ -47,6 +47,6 @@ class FetchmailServer(models.Model):
if oper not in operators: if oper not in operators:
return [('id', 'in', [])] return [('id', 'in', [])]
servers = self.search([]).filtered( servers = self.search([]).filtered(
lambda s: operators[oper](value, s.type) lambda s: operators[oper](value, s.server_type)
) )
return [('id', 'in', servers.ids)] return [('id', 'in', servers.ids)]