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

Improved UI on poweremail campaign form #33

Merged
merged 3 commits into from
Feb 21, 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,24 @@
# -*- coding: utf-8 -*-
import logging
from oopgrade.oopgrade import load_data_records


def up(cursor, installed_version):
if not installed_version:
return

logger = logging.getLogger('openerp.migration')
logger.info('** STARTING THE UPDATE OF XML VIEW **')
logger.info('* Module poweremail_campaign')
logger.info('* View poweremail_campaign_view.xml with id poweremail_campaign_form')

load_data_records(cursor, 'poweremail_campaign', 'poweremail_campaign_view.xml',
['poweremail_campaign_form'], )
logger.info('** XML VIEW UPDATED SUCCESSFULLY **')


def down(cursor, installed_version):
pass


migrate = up
69 changes: 38 additions & 31 deletions poweremail_campaign/poweremail_campaign_view.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<menuitem name="Power Email Campaigns" id="menu_poweremail_campaign" parent="poweremail.menu_poweremail_administration_server" sequence="1"/>
<menuitem name="Power Email Campaigns" id="menu_poweremail_campaign"
parent="poweremail.menu_poweremail_administration_server" sequence="1"/>

<record model="ir.ui.view" id="poweremail_campaign_form">
<field name="name">poweremail.campaign.form</field>
Expand All @@ -14,36 +15,42 @@
<field name="template_id" colspan="2"/>
<field name="template_obj" colspan="2"/>
</group>
<group colspan="20" col="20">
<group colspan="20" string="Filter Objects" col="1">
<field name="domain" colspan="19" nolabel="1"/>
</group>
<group colspan="20" string="Help" col="1" expand="1">
<label align="0.0" string="The domain has to be a list of tuples"/>
<label align="0.0" string="with conditions, refeering the atributtes."/>
<label align="0.0" string="For example, if we want to search a"/>
<label align="0.0" string="company named 'Adrià' created after '01-01-2020': "/>
<label align="0.0" string=" "/>
<label align="0.3" string="[('name', '=', 'Adrià'), ('create_date', '>', '2020-01-01')] "/>
<label align="0.0" string=" "/>
<label align="0.0" string="[Empty list '[]' indicates no filters are used]"/>
</group>
</group>
<group colspan="8" col="8">
<field name="progress_created" colspan="2" widget="progressbar"/>
</group>
<group colspan="8" col="8">
<field name="progress_sent" colspan="2" widget="progressbar"/>
</group>
<group colspan="8" col="8">
<button icon="gtk-open" name="%(poweremail_campaign.action_poweremail_campaign_list_lines)d" string="List Related Objects" type="action"/>
<button icon="gtk-execute" name="update_linies_campanya" string="Update Lines" type="object" confirm="Are you sure? The current existent lines will be erased and new ones will be created."/>
<button icon="gtk-execute" name="send_emails" string="Send Emails" type="object" confirm="Do you really want to send the emails?"/>
</group>
<group colspan="8" col="8">
<field name="batch"/>
<field name="distinct_mails"/>
</group>
<notebook colspan="4">
<page string="General">
<group colspan="20" col="20" string="">
<group colspan="20" string="Filter Objects" col="1">
<field name="domain" colspan="19" nolabel="1" widget="codeeditor"
widget_props="{'lang': 'python'}"/>
</group>
<group colspan="8" col="8">
<label align="0.0"
string="Readme: https://rfc.gisce.net/t/creacio-duna-nova-campanya-de-power-email/1864"/>
</group>
</group>
<group colspan="8" col="8">
<field name="progress_created" colspan="2" widget="progressbar"/>
</group>
<group colspan="8" col="8">
<field name="progress_sent" colspan="2" widget="progressbar"/>
</group>
<group colspan="8" col="8">
<button icon="reload" name="update_linies_campanya" string="Create Lines" type="object"
confirm="Are you sure? The current existent lines will be erased and new ones will be created."/>
<button icon="folder-open"
name="%(poweremail_campaign.action_poweremail_campaign_list_lines)d"
string="List Related Objects" type="action"/>
<button icon="send" name="send_emails" string="Send Emails" type="object"
confirm="Do you really want to send the emails?" primary="1"/>
</group>
</page>
<page string="Advanced configuration">
<group colspan="8" col="8">
<field name="batch"/>
<newline/>
<field name="distinct_mails"/>
</group>
</page>
</notebook>
</form>
</field>
</record>
Expand Down
Loading