From e315413720530e24aae51754538c2bbf0c9fc059 Mon Sep 17 00:00:00 2001 From: Eduard Carrerars Date: Tue, 26 Mar 2024 14:20:28 +0100 Subject: [PATCH 1/2] Use html_preview widget --- ...ost-0001_update_poweremail_mailbox_view.py | 19 +++++++++++++++++++ poweremail_mailbox_view.xml | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 migrations/5.0.24.5.0/post-0001_update_poweremail_mailbox_view.py diff --git a/migrations/5.0.24.5.0/post-0001_update_poweremail_mailbox_view.py b/migrations/5.0.24.5.0/post-0001_update_poweremail_mailbox_view.py new file mode 100644 index 0000000..9cf6ab7 --- /dev/null +++ b/migrations/5.0.24.5.0/post-0001_update_poweremail_mailbox_view.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from oopgrade.oopgrade import load_data_records + + +def up(cursor, installed_version): + if not installed_version: + return + + load_data_records( + cursor, 'poweremail', 'poweremail_mailbox_view.xml', + ['view_poweremail_mailbox_2_form'] + ) + + +def down(cursor, installed_version): + pass + + +migrate = up diff --git a/poweremail_mailbox_view.xml b/poweremail_mailbox_view.xml index a72373b..193fed2 100644 --- a/poweremail_mailbox_view.xml +++ b/poweremail_mailbox_view.xml @@ -97,6 +97,24 @@ + + poweremail_mailbox.form_2 + poweremail.mailbox + form + 2 + + + + + html_preview + + + html_preview + + + + + From b836615dfcf916e981c29159942b78e40f03426b Mon Sep 17 00:00:00 2001 From: Luis Carlos Bautista Date: Mon, 15 Apr 2024 11:21:31 +0200 Subject: [PATCH 2/2] test: fix #123 --- tests/test_poweremail_mailbox.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_poweremail_mailbox.py b/tests/test_poweremail_mailbox.py index 78b32b9..27275bf 100644 --- a/tests/test_poweremail_mailbox.py +++ b/tests/test_poweremail_mailbox.py @@ -400,8 +400,7 @@ def generate_mail_with_attachments_and_report_multi_users(self, mock_function): @mock.patch('poweremail.poweremail_send_wizard.poweremail_send_wizard.process_extra_attachment_in_template') @mock.patch('poweremail.poweremail_send_wizard.poweremail_send_wizard.create_report_attachment') @mock.patch('poweremail.poweremail_send_wizard.poweremail_send_wizard.create_mail') - @mock.patch('poweremail.poweremail_send_wizard.poweremail_send_wizard.check_lang') - def test_save_to_mailbox(self, mock_function, mock_function_2, mock_function_3, mock_function_4, mock_function_5, mock_function_6): + def test_save_to_mailbox(self, mock_function_2, mock_function_3, mock_function_4, mock_function_5, mock_function_6): self.openerp.install_module('giscedata_facturacio') with Transaction().start(self.database) as txn: uid = txn.user @@ -521,7 +520,6 @@ def test_save_to_mailbox(self, mock_function, mock_function_2, mock_function_3, } attachment_report_id = ir_attachment_obj.create(cursor, uid, attach_vals) - mock_function.return_value = "es_ES" mock_function_2.return_value = mail_id mock_function_3.return_value = attachment_report_id mock_function_4.return_value = []