[MIG] mail_environment to 13.0
This commit is contained in:
parent
079634e925
commit
c5c70cbf77
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
{
|
||||
"name": "Mail configuration with server_environment",
|
||||
"version": "12.0.1.0.0",
|
||||
"version": "13.0.1.0.0",
|
||||
"category": "Tools",
|
||||
"summary": "Configure mail servers with server_environment_files",
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class FetchmailServer(models.Model):
|
|||
mail_fields = {
|
||||
"server": {},
|
||||
"port": {},
|
||||
"type": {},
|
||||
"server_type": {},
|
||||
"user": {},
|
||||
"password": {},
|
||||
"is_ssl": {},
|
||||
|
|
@ -26,7 +26,7 @@ class FetchmailServer(models.Model):
|
|||
mail_fields.update(base_fields)
|
||||
return mail_fields
|
||||
|
||||
type = fields.Selection(search='_search_type')
|
||||
server_type = fields.Selection(search='_search_server_type')
|
||||
|
||||
@api.model
|
||||
def _server_env_global_section_name(self):
|
||||
|
|
@ -47,6 +47,6 @@ class FetchmailServer(models.Model):
|
|||
if oper not in operators:
|
||||
return [('id', 'in', [])]
|
||||
servers = self.search([]).filtered(
|
||||
lambda s: operators[oper](value, s.type)
|
||||
lambda s: operators[oper](value, s.server_type)
|
||||
)
|
||||
return [('id', 'in', servers.ids)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue