Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add menuitem for mails with state equal to sending #173

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
lcbautista marked this conversation as resolved.
Show resolved Hide resolved
"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