Skip to content

Commit

Permalink
Merge pull request #173 from gisce/63380_add_view_sending_mails_menuitem
Browse files Browse the repository at this point in the history
Add menuitem for mails with state equal to sending
  • Loading branch information
lcbautista authored Oct 30, 2024
2 parents 4766a3d + dc4aef9 commit abe5cf8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from tools import config
from oopgrade.oopgrade import load_data_records


def up(cursor, installed_version):
if not installed_version or config.updating_all:
return
load_data_records(
cursor, 'poweremail', "poweremail_mailbox_view.xml", [
"action_poweremail_sending_tree",
"action_poweremail_sending_tree_company",
"menu_action_poweremail_sending_tree_company",
"menu_action_poweremail_sending_tree"
], mode='init')


def down(cursor, installed_version):
pass


migrate = up
21 changes: 21 additions & 0 deletions poweremail_mailbox_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,15 @@
<field name="view_id" ref="poweremail_sentbox_tree" />
<field name="domain">[('folder','=','sent'),('pem_user','=',uid)]</field>
</record>
<!--SENDING-->
<record model="ir.actions.act_window" id="action_poweremail_sending_tree">
<field name="name">Mailbox: Sending</field>
<field name="res_model">poweremail.mailbox</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="poweremail_inbox_tree"/>
<field name="domain">[('state','=','sending')]</field>
</record>
<!--TRASH-->
<record model="ir.actions.act_window" id="action_poweremail_trash_tree">
<field name="name">Mailbox: Trash</field>
Expand Down Expand Up @@ -393,6 +402,16 @@
<field name="domain">[('folder','=','sent')]</field>
<field name="context">{'company':True}</field>
</record>
<!--SENDING-->
<record model="ir.actions.act_window" id="action_poweremail_sending_tree_company">
<field name="name">Mailbox: Sending</field>
<field name="res_model">poweremail.mailbox</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="poweremail_inbox_tree"/>
<field name="domain">[('state','=','sending')]</field>
<field name="context">{'company':True}</field>
</record>
<!--TRASH-->
<record model="ir.actions.act_window" id="action_poweremail_trash_tree_company">
<field name="name">Mailbox: Trash</field>
Expand Down Expand Up @@ -423,6 +442,7 @@
<menuitem name="Outbox" id="menu_poweremail_outbox" parent="menu_poweremail_personal" action="action_poweremail_outbox_tree" />
<menuitem name="Follow-up" id="menu_poweremail_follow" parent="menu_poweremail_personal" action="action_poweremail_follow_tree" />
<menuitem name="Sent" id="menu_poweremail_sent" parent="menu_poweremail_personal" action="action_poweremail_sent_tree" />
<menuitem name="Sending" id="menu_action_poweremail_sending_tree" parent="poweremail.menu_poweremail_personal" action="action_poweremail_sending_tree" />
<menuitem name="Trash" id="menu_poweremail_trash" parent="menu_poweremail_personal" action="action_poweremail_trash_tree" />

<menuitem name="Company" id="menu_poweremail_company" parent="menu_poweremail_mailbox_all_main2" />
Expand All @@ -432,6 +452,7 @@
<menuitem name="Outbox" id="menu_poweremail_outbox_company" parent="menu_poweremail_company" action="action_poweremail_outbox_tree_company" />
<menuitem name="Follow-up" id="menu_poweremail_follow_company" parent="menu_poweremail_company" action="action_poweremail_follow_tree_company" />
<menuitem name="Sent" id="menu_poweremail_sent_company" parent="menu_poweremail_company" action="action_poweremail_sent_tree_company" />
<menuitem name="Sending" id="menu_action_poweremail_sending_tree_company" parent="poweremail.menu_poweremail_company" action="action_poweremail_sending_tree_company" />
<menuitem name="Trash" id="menu_poweremail_trash_company" parent="menu_poweremail_company" action="action_poweremail_trash_tree_company" />
<menuitem name="Error" id="menu_poweremail_error_company" parent="menu_poweremail_company" action="action_poweremail_error_tree_company" />

Expand Down

0 comments on commit abe5cf8

Please sign in to comment.