From d314712db04ac2096df336837c91f337e77b24bb Mon Sep 17 00:00:00 2001 From: Luis Carlos Bautista Date: Mon, 2 Sep 2024 12:29:30 +0200 Subject: [PATCH] fix: poweremail_templates depended on poweremail_mailbox --- poweremail_mailbox.py | 3 +++ poweremail_template.py | 15 +-------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/poweremail_mailbox.py b/poweremail_mailbox.py index cde4018..d0d7e06 100644 --- a/poweremail_mailbox.py +++ b/poweremail_mailbox.py @@ -410,6 +410,9 @@ def create(self, cursor, user, vals, context=None): return res_id _columns = { + 'template_id': fields.many2one( + 'poweremail.templates', 'Template', readonly=True, + ), 'create_date': fields.datetime('Created date', readonly=True), 'write_date': fields.datetime('Date modified', readonly=True), 'pem_from':fields.char( diff --git a/poweremail_template.py b/poweremail_template.py index 4ae49ac..09a73c0 100644 --- a/poweremail_template.py +++ b/poweremail_template.py @@ -71,8 +71,7 @@ import tools import report import pooler -from .poweremail_mailbox import _priority_selection -from .poweremail_core import get_email_default_lang +from .poweremail_core import get_email_default_lang, _priority_selection from .utils import Localizer @@ -1217,18 +1216,6 @@ def remove_action_reference(self, cursor, uid, ids, context): poweremail_templates() -class PoweremailMailbox(osv.osv): - _inherit = 'poweremail.mailbox' - _columns = { - 'template_id': fields.many2one( - 'poweremail.templates', 'Template', readonly=True, - ), - } - - -PoweremailMailbox() - - class poweremail_template_attachment(osv.osv): _name = 'poweremail.template.attachment'