From 5d6c86cc38acf29b328f40d977be1b1e545771e3 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 6 Oct 2015 11:04:20 +0200 Subject: [PATCH] Restructure module following guidelines. --- mail_forward/__init__.py | 2 +- mail_forward/__openerp__.py | 2 +- mail_forward/{wizard => models}/__init__.py | 2 +- .../{wizard/mail_forward.py => models/compose_message.py} | 2 +- mail_forward/{models.py => models/res_request_link.py} | 2 +- .../{wizard/mail_forward.xml => views/compose_message.xml} | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) rename mail_forward/{wizard => models}/__init__.py (74%) rename mail_forward/{wizard/mail_forward.py => models/compose_message.py} (98%) rename mail_forward/{models.py => models/res_request_link.py} (90%) rename mail_forward/{wizard/mail_forward.xml => views/compose_message.xml} (94%) diff --git a/mail_forward/__init__.py b/mail_forward/__init__.py index 04742c5f..65738b52 100644 --- a/mail_forward/__init__.py +++ b/mail_forward/__init__.py @@ -2,4 +2,4 @@ # © 2014-2015 Grupo ESOC # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from . import models, wizard +from . import models diff --git a/mail_forward/__openerp__.py b/mail_forward/__openerp__.py index f1a580c5..c5ac0df7 100644 --- a/mail_forward/__openerp__.py +++ b/mail_forward/__openerp__.py @@ -18,8 +18,8 @@ ], "data": [ "views/assets.xml", + "views/compose_message.xml", "views/res_request_link.xml", - "wizard/mail_forward.xml", ], "qweb": [ "static/src/xml/mail_forward.xml", diff --git a/mail_forward/wizard/__init__.py b/mail_forward/models/__init__.py similarity index 74% rename from mail_forward/wizard/__init__.py rename to mail_forward/models/__init__.py index ec73f325..3faf4bfa 100644 --- a/mail_forward/wizard/__init__.py +++ b/mail_forward/models/__init__.py @@ -2,4 +2,4 @@ # © 2014-2015 Grupo ESOC # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from . import mail_forward +from . import compose_message, res_request_link diff --git a/mail_forward/wizard/mail_forward.py b/mail_forward/models/compose_message.py similarity index 98% rename from mail_forward/wizard/mail_forward.py rename to mail_forward/models/compose_message.py index 2f16dae5..64b08da4 100644 --- a/mail_forward/wizard/mail_forward.py +++ b/mail_forward/models/compose_message.py @@ -11,7 +11,7 @@ class MailForwardComposeMessage(models.TransientModel): It duplicates the message and optionally attaches it to another object of the database and sends it to another recipients than the original one. """ - _name = "mail_forward.compose.message" + _name = "mail_forward.compose_message" _inherits = {"mail.compose.message": "original_wizard_id"} @api.model diff --git a/mail_forward/models.py b/mail_forward/models/res_request_link.py similarity index 90% rename from mail_forward/models.py rename to mail_forward/models/res_request_link.py index 8cc4fd6f..e5d4dc7a 100644 --- a/mail_forward/models.py +++ b/mail_forward/models/res_request_link.py @@ -5,7 +5,7 @@ from openerp import fields, models -class IrModel(models.Model): +class ResRequestLink(models.Model): _inherit = "res.request.link" mail_forward_target = fields.Boolean( diff --git a/mail_forward/wizard/mail_forward.xml b/mail_forward/views/compose_message.xml similarity index 94% rename from mail_forward/wizard/mail_forward.xml rename to mail_forward/views/compose_message.xml index ef84e120..5b8dc8e8 100644 --- a/mail_forward/wizard/mail_forward.xml +++ b/mail_forward/views/compose_message.xml @@ -8,7 +8,7 @@ Forward Email Form - mail_forward.compose.message + mail_forward.compose_message @@ -51,7 +51,7 @@ Forward Email - mail_forward.compose.message + mail_forward.compose_message mail.message ir.actions.act_window