Skip to content

Commit

Permalink
Merge pull request #149 from gisce/add-html-preview-widget
Browse files Browse the repository at this point in the history
Use html_preview widget
  • Loading branch information
ecarreras authored Jul 18, 2024
2 parents aed72ec + 4d2f54a commit 15958bf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
19 changes: 19 additions & 0 deletions migrations/5.0.24.5.0/post-0001_update_poweremail_mailbox_view.py
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions poweremail_mailbox_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@
</field>
</record>

<record model="ir.ui.view" id="view_poweremail_mailbox_2_form">
<field name="name">poweremail_mailbox.form_2</field>
<field name="model">poweremail.mailbox</field>
<field name="type">form</field>
<field name="version">2</field>
<field name="inherit_id" ref="poweremail_mailbox_form" />
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='pem_body_text']" position="attributes">
<attribute name="widget">html_preview</attribute>
</xpath>
<xpath expr="//field[@name='pem_body_html']" position="attributes">
<attribute name="widget">html_preview</attribute>
</xpath>
</data>
</field>
</record>

<!--8888888888888888888888888888888888 TREE VIEWS 8888888888888888888888888888888888888888-->
<!--ALL EMAILS-->
<record model="ir.ui.view" id="poweremail_all_emails_tree">
Expand Down

0 comments on commit 15958bf

Please sign in to comment.