diff --git a/website_portal_address/__openerp__.py b/website_portal_address/__openerp__.py index 3ae91a229a..f5ea8ad2bc 100644 --- a/website_portal_address/__openerp__.py +++ b/website_portal_address/__openerp__.py @@ -11,9 +11,7 @@ Odoo Community Association (OCA)""", "website": "http://www.serpentcs.com", "license": "AGPL-3", - "depends": [ - "website_portal_contact", - ], + "depends": ["website_portal_contact",], "data": [ "security/ir.rule.csv", "views/assets.xml", diff --git a/website_portal_address/controllers/main.py b/website_portal_address/controllers/main.py index d0f2ccf41e..e16bda06b6 100644 --- a/website_portal_address/controllers/main.py +++ b/website_portal_address/controllers/main.py @@ -3,28 +3,40 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from openerp.http import request, route -from openerp.addons.website_portal_contact.controllers.main \ - import WebsiteAccount as PortalController +from openerp.addons.website_portal_contact.controllers.main import ( + WebsiteAccount as PortalController, +) class WebsiteAccount(PortalController): - - @route("/my/contacts/", auth="user", - website=True) + @route( + "/my/contacts/", + auth="user", + website=True, + ) def portal_my_contacts_read(self, contact): values = self._prepare_portal_layout_values() - values.update({ - "state_id": request.env['res.country.state'].sudo().search([]), - "country_id": request.env['res.country'].sudo().search([]), - "contact": contact, - "fields": self._contacts_fields(), - }) + values.update( + { + "state_id": request.env["res.country.state"].sudo().search([]), + "country_id": request.env["res.country"].sudo().search([]), + "contact": contact, + "fields": self._contacts_fields(), + } + ) return request.website.render( - "website_portal_contact.contacts_followup", values) + "website_portal_contact.contacts_followup", values + ) def _contacts_fields(self): res = super(WebsiteAccount, self)._contacts_fields() - res += ['type', 'street', 'street2', - 'city', 'zip', - 'country_id', 'state_id'] + res += [ + "type", + "street", + "street2", + "city", + "zip", + "country_id", + "state_id", + ] return res