-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] connector_dns: black, isort, prettier
- Loading branch information
Showing
45 changed files
with
1,130 additions
and
1,124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2015 Elico Corp | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import backend | ||
from . import connector | ||
from . import models | ||
from . import unit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2015 Elico Corp | ||
# Copyright 2016 LasLabs Inc. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'DNS connector', | ||
'version': '8.0.1.0.0', | ||
'category': 'Connector', | ||
'depends': ['connector'], | ||
'author': 'Elico Corp, ' | ||
'LasLabs, ' | ||
'Odoo Community Association (OCA)', | ||
'license': 'AGPL-3', | ||
'website': 'https://www.elico-corp.com', | ||
'data': [ | ||
'views/dns_backend.xml', | ||
'views/dns_record.xml', | ||
'views/dns_zone.xml', | ||
'views/dns_menu.xml', | ||
'views/connector_config_settings.xml', | ||
'data/dns_record_type.xml', | ||
'security/dns.xml', | ||
'security/ir.model.access.csv', | ||
"name": "DNS connector", | ||
"version": "8.0.1.0.0", | ||
"category": "Connector", | ||
"depends": ["connector"], | ||
"author": "Elico Corp, " "LasLabs, " "Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"website": "https://github.com/OCA/infrastructure", | ||
"data": [ | ||
"views/dns_backend.xml", | ||
"views/dns_record.xml", | ||
"views/dns_zone.xml", | ||
"views/dns_menu.xml", | ||
"views/connector_config_settings.xml", | ||
"data/dns_record_type.xml", | ||
"security/dns.xml", | ||
"security/ir.model.access.csv", | ||
], | ||
'installable': True, | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2015 Elico Corp | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
import openerp.addons.connector.backend as backend | ||
|
||
dns = backend.Backend('dns') | ||
dns = backend.Backend("dns") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 LasLabs Inc. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from .unit.export_synchronizer import export_record | ||
import logging | ||
|
||
from .unit.export_synchronizer import export_record | ||
|
||
import logging | ||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
def delay_export(session, model_name, record_id, vals): | ||
""" Delay a job which export a binding record. | ||
"""Delay a job which export a binding record. | ||
(A binding record being a ``dns.record.bind``, | ||
``dns.zone.bind``, ...) | ||
""" | ||
if session.context.get('connector_no_export'): | ||
if session.context.get("connector_no_export"): | ||
return | ||
fields = vals.keys() | ||
export_record.delay(session, model_name, record_id, fields=fields) | ||
|
||
|
||
def delay_export_all_bindings(session, model_name, record_id, vals): | ||
""" Delay a job which export all the bindings of a record. | ||
"""Delay a job which export all the bindings of a record. | ||
In this case, it is called on records of normal models and will delay | ||
the export for all the bindings. | ||
""" | ||
if session.context.get('connector_no_export'): | ||
if session.context.get("connector_no_export"): | ||
return | ||
record = session.env[model_name].browse(record_id) | ||
fields = vals.keys() | ||
for binding in record.dns_bind_ids: | ||
export_record.delay(session, binding._model._name, binding.id, | ||
fields=fields) | ||
export_record.delay(session, binding._model._name, binding.id, fields=fields) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.