430 lines
		
	
	
		
			28 KiB
		
	
	
	
		
			XML
		
	
	
			
		
		
	
	
			430 lines
		
	
	
		
			28 KiB
		
	
	
	
		
			XML
		
	
	
| <?xml version="1.0" encoding="utf-8"?>
 | ||
| <odoo>
 | ||
|     <data>
 | ||
|         <record id="view_mailchimp_lists_form" model="ir.ui.view">
 | ||
|             <field name="name">mailchimp.lists.form</field>
 | ||
|             <field name="model">mailchimp.lists</field>
 | ||
|             <field name="arch" type="xml">
 | ||
|                 <form string="MailChimp Lists/Audiences">
 | ||
|                     <header>
 | ||
|                         <button name="export_in_mailchimp" string="Export In MailChimp" type="object"
 | ||
|                                 class="btn-success" attrs="{'invisible' :[('list_id','!=', False)]}"/>
 | ||
|                         <button name="update_in_mailchimp" string="Update In MailChimp" type="object"
 | ||
|                                 class="btn-success" attrs="{'invisible' :[('list_id','=', False)]}"/>
 | ||
|                         <button name="refresh_list" string="Refresh" type="object" class="btn-primary"
 | ||
|                                 attrs="{'invisible' :[('list_id','=', False)]}"/>
 | ||
|                         <button name="fetch_merge_fields" string="Fetch Merge Fields" type="object" class="btn-primary"
 | ||
|                                 attrs="{'invisible' :[('list_id','=', False)]}"/>
 | ||
|                         <button name="fetch_segments" string="Fetch Segments" type="object" class="btn-primary"
 | ||
|                                 attrs="{'invisible' :[('list_id','=', False)]}"/>
 | ||
|                         <button name="fetch_members" string="Fetch Members" type="object" class="btn-primary"
 | ||
|                                 attrs="{'invisible' :[('list_id','=', False)]}"/>
 | ||
|                     </header>
 | ||
|                     <!--
 | ||
|                     <div class="alert alert-warning" role="alert"
 | ||
|                          style="margin-bottom:0px;"
 | ||
|                          attrs="{'invisible': [('is_update_required','=',False)]}">
 | ||
|                         <i class="fa fa-exclamation-triangle text-warning"></i>
 | ||
|                         Some of the data is changed since last sync. Update to <bold>MailChimp</bold> as well or refresh
 | ||
|                         list if you want to discard changes.
 | ||
|                     </div> -->
 | ||
|                     <sheet>
 | ||
|                         <div class="oe_button_box">
 | ||
|                             <button name="action_view_recipients" context="{'show_total': True}"
 | ||
|                                     type="object" icon="fa-user" class="oe_stat_button">
 | ||
|                                 <field name="contact_total_nbr" string="Total Contacts" widget="statinfo"/>
 | ||
|                             </button>
 | ||
|                             <button name="action_view_recipients" context="{'show_sub': True}"
 | ||
|                                     type="object" icon="fa-user text-success" class="oe_stat_button">
 | ||
|                                 <field name="contact_nbr" string="Subscribers" widget="statinfo"/>
 | ||
|                             </button>
 | ||
|                             <button name="action_view_recipients" context="{'show_unsub': True}"
 | ||
|                                     type="object" icon="fa-user text-info" class="oe_stat_button">
 | ||
|                                 <field name="contact_unsub_nbr" string="Unsubscribed Contacts" widget="statinfo"/>
 | ||
|                             </button>
 | ||
|                             <button name="action_view_recipients" context="{'show_cleaned': True}"
 | ||
|                                     type="object" icon="fa-user text-danger" class="oe_stat_button">
 | ||
|                                 <field name="contact_cleaned_nbr" string="Cleaned Contacts" widget="statinfo"/>
 | ||
|                             </button>
 | ||
|                         </div>
 | ||
|                         <div class="oe_title">
 | ||
|                             <label for="name" string="Audience Name"/>
 | ||
|                             <h1>
 | ||
|                                 <field name="name" placeholder="Audience Name"/>
 | ||
|                             </h1>
 | ||
|                             <div name="options">
 | ||
|                                 <div>
 | ||
|                                     <label for="account_id" string="Associated Account"/>
 | ||
|                                     <field name="account_id" required="1"/>
 | ||
|                                 </div>
 | ||
|                             </div>
 | ||
|                         </div>
 | ||
|                         <group>
 | ||
|                             <group>
 | ||
|                                 <field name="date_created"/>
 | ||
|                                 <field name="subscribe_url_short"/>
 | ||
|                                 <field name="subscribe_url_long"/>
 | ||
|                             </group>
 | ||
|                             <group>
 | ||
|                                 <field name="list_rating" widget="priority" readonly="1"/>
 | ||
|                                 <field name="member_since_last_changed"/>
 | ||
|                                 <field name="list_id" invisible="1"/>
 | ||
|                                 <field name="is_update_required" invisible="1"/>
 | ||
|                             </group>
 | ||
|                         </group>
 | ||
|                         <notebook>
 | ||
|                             <page string="Settings" name="settings">
 | ||
|                                 <h2>Publicity settings</h2>
 | ||
|                                 <div class="row mt16 o_settings_container" id="new_sub">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="visibility" string="Promote my campaigns"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Mailchimp builds tools and services that help people discover
 | ||
|                                                 newsletters and campaigns.
 | ||
|                                                 When we build these tools, would you like to be discovered?
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="visibility" widget="radio" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_left_pane">
 | ||
|                                             <field name="use_archive_bar"/>
 | ||
|                                         </div>
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="use_archive_bar" string="Archive bar"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 When subscribers click the “view in browser” archive link in your email,
 | ||
|                                                 we'll display the archived version of your campaign in their browser,
 | ||
|                                                 along with a toolbar that lets them view past campaigns and share your
 | ||
|                                                 emails on social networks..
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                                 <br/>
 | ||
|                                 <h2>Form settings</h2>
 | ||
|                                 <div class="row mt16 o_settings_container" id="form_settings">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_left_pane">
 | ||
|                                             <field name="double_optin"/>
 | ||
|                                         </div>
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="double_optin"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Send contacts an opt-in confirmation email when they subscribe to your
 | ||
|                                                 audience.
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_left_pane">
 | ||
|                                             <field name="marketing_permissions"/>
 | ||
|                                         </div>
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="marketing_permissions"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Customize your forms to include GDPR fields.
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                                 <br/>
 | ||
|                                 <h2>Campaign defaults</h2>
 | ||
|                                 <div class="row mt16 o_settings_container" id="form_settings">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="from_name"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 This is the name your emails will come from. Use something your
 | ||
|                                                 subscribers will instantly recognize, like your company name.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="from_name" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_left_pane">
 | ||
|                                             <field name="email_type_option"/>
 | ||
|                                         </div>
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="email_type_option"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 When people sign up for your audience, you can let them specify which
 | ||
|                                                 email format they prefer to receive. If they choose “Plain-text”, then
 | ||
|                                                 they won't receive your fancy HTML version.
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <!-- commented because we aren't getting this field value from API
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_left_pane">
 | ||
|                                             <field name="has_welcome"/>
 | ||
|                                         </div>
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="has_welcome"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 When people opt-in to your audience, send them an email welcoming them
 | ||
|                                                 to your audience. The final welcome email can be edited in the audience
 | ||
|                                                 forms designer.
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div> -->
 | ||
|                                 </div>
 | ||
|                                 <div class="row mt16 o_settings_container" id="form_settings">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="from_email"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 The entered address receives reply emails. Check it regularly to stay in
 | ||
|                                                 touch with your audience.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="from_email" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="lang_id"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Default Language for Campaign
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="lang_id" required="1" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                                 <div class="row mt16 o_settings_container" id="form_settings">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="subject"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Keep it relevant and non-spammy.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="subject" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                                 <br/>
 | ||
|                                 <h2>New subscriber notifications</h2>
 | ||
|                                 <h3>One by one</h3>
 | ||
|                                 <div class="text-muted">
 | ||
|                                     Get quick email alerts when subscribers join or leave this audience.
 | ||
|                                 </div>
 | ||
|                                 <div class="row mt16 o_settings_container" id="new_sub">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="notify_on_subscribe"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Additional email addresses must be separated by a comma.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="notify_on_subscribe" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="notify_on_unsubscribe"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Additional email addresses must be separated by a comma.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="notify_on_unsubscribe" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                                 <br/>
 | ||
|                                 <h2>Required Email Footer Content</h2>
 | ||
|                                 <div class="row mt16 o_settings_container" id="new_sub">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="permission_reminder" string="Permission reminder"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Sometimes people forget they signed up for an email newsletter. To
 | ||
|                                                 prevent false spam reports, it’s best to briefly remind your recipients
 | ||
|                                                 how they got on your list.
 | ||
|                                                 MailChimp’ll automatically place this in your Mailchimp templates
 | ||
|                                                 wherever you see *|LIST:DESCRIPTION|*. About permission reminders.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="permission_reminder" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="notify_on_unsubscribe"
 | ||
|                                                    string="How can recipients contact you?"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Enter the contact information and physical mailing address for the owner
 | ||
|                                                 of this list. This is required by law. If you’re an agency sending on
 | ||
|                                                 behalf of a client, enter your client’s information.
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="partner_id" required="1" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                                 <br/>
 | ||
|                                 <h2>Email Beamer</h2>
 | ||
|                                 <div class="row mt16 o_settings_container" id="new_sub">
 | ||
|                                     <div class="col-lg-6 o_setting_box">
 | ||
|                                         <div class="o_setting_right_pane">
 | ||
|                                             <label for="beamer_address" string="Permission reminder"/>
 | ||
|                                             <div class="text-muted">
 | ||
|                                                 Every list you create in Mailchimp gets its own special email address.
 | ||
|                                                 Send to this private email address from your favorite email client, and
 | ||
|                                                 we’ll save those emails as draft campaigns in your account. From there,
 | ||
|                                                 you can send the campaign to your Mailchimp list.
 | ||
|                                                 Send an email to this private address, and MailChimp’ll reply with a
 | ||
|                                                 confirmation link:
 | ||
|                                             </div>
 | ||
|                                             <div>
 | ||
|                                                 <field name="beamer_address" class="mt16"/>
 | ||
|                                             </div>
 | ||
|                                         </div>
 | ||
|                                     </div>
 | ||
|                                 </div>
 | ||
|                             </page>
 | ||
|                             <page string="Segments" name="segments">
 | ||
|                                 <field name="segment_ids" nolabel='1'>
 | ||
|                                     <tree editable="top" delete="false" create="false">
 | ||
|                                         <field name="name"/>
 | ||
|                                     </tree>
 | ||
|                                 </field>
 | ||
|                             </page>
 | ||
|                             <page string="Merge Fields" name="merge_fields">
 | ||
|                                 <div class="alert alert-info info_icon" role="alert">
 | ||
|                                     <span class="fa fa-lightbulb-o fa-lg"><strong> Notes</strong></span>
 | ||
|                                     <p>
 | ||
|                                         <br/> 1. Make sure you have "FNAME" for First Name and "LNAME" for Last Name in merge field tag.
 | ||
|                                         <br/> 2. You don't need to select Odoo Field for Address Type of field and for FNAME and LNAME tag because it will get selected automatically at the time of exporting contact or updating contact.
 | ||
|                                     </p>
 | ||
|                                 </div>
 | ||
|                                 <field name="merge_field_ids" nolabel='1'>
 | ||
|                                     <tree editable="top" delete="false" create="false">
 | ||
|                                         <field name="name" readonly="1"/>
 | ||
|                                         <field name="type" readonly="1"/>
 | ||
|                                         <field name="required" readonly="1"/>
 | ||
|                                         <field name="public" readonly="1"/>
 | ||
|                                         <field name="tag" readonly="1"/>
 | ||
|                                         <field name="default_value" readonly="1"/>
 | ||
|                                         <field name="field_id" attrs="{'readonly': ['|', ('type','=', 'address'), ('tag','in', ['FNAME','LNAME'])]}"/>
 | ||
|                                         <field name="list_id" invisible="1"/>
 | ||
|                                         <field name="merge_id" invisible="1"/>
 | ||
|                                     </tree>
 | ||
|                                 </field>
 | ||
|                             </page>
 | ||
|                             <page string="Statistics" name="settings">
 | ||
|                                 <group string="Overview">
 | ||
|                                     <field name="stats_overview_ids" readonly="1" nolabel='1'>
 | ||
|                                         <tree editable="bottom" delete="false" create="false" edit="false">
 | ||
|                                             <field name="member_count"/>
 | ||
|                                             <field name="unsubscribe_count"/>
 | ||
|                                             <field name="cleaned_count"/>
 | ||
|                                             <field name="last_sub_date"/>
 | ||
|                                             <field name="last_unsub_date"/>
 | ||
|                                             <field name="campaign_count"/>
 | ||
|                                             <field name="campaign_last_sent"/>
 | ||
|                                         </tree>
 | ||
|                                     </field>
 | ||
|                                 </group>
 | ||
|                                 <group col="3">
 | ||
|                                     <group string="Audience performance">
 | ||
|                                         <field name="stats_audience_perf_ids" readonly="1" nolabel='1'>
 | ||
|                                             <tree editable="bottom" delete="false" create="false" edit="false">
 | ||
|                                                 <field name="avg_sub_rate" string="Avg Sub %"/>
 | ||
|                                                 <field name="avg_unsub_rate" string="Avg Unsub %"/>
 | ||
|                                                 <field name="target_sub_rate" string="Target Sub %"/>
 | ||
|                                             </tree>
 | ||
|                                         </field>
 | ||
|                                     </group>
 | ||
|                                     <group string="Since Last Campaign">
 | ||
|                                         <field name="stats_since_last_campaign_ids" readonly="1" nolabel='1'>
 | ||
|                                             <tree editable="bottom" delete="false" create="false" edit="false">
 | ||
|                                                 <field name="member_count_since_send"/>
 | ||
|                                                 <field name="unsubscribe_count_since_send"/>
 | ||
|                                                 <field name="cleaned_count_since_send"/>
 | ||
|                                             </tree>
 | ||
|                                         </field>
 | ||
|                                     </group>
 | ||
|                                     <group string="Campaign Performance">
 | ||
|                                         <field name="stats_campaign_perf_ids" readonly="1" nolabel='1'>
 | ||
|                                             <tree editable="bottom" delete="false" create="false" edit="false">
 | ||
|                                                 <field name="open_rate" string="Open %"/>
 | ||
|                                                 <field name="click_rate" string="Click %"/>
 | ||
|                                             </tree>
 | ||
|                                         </field>
 | ||
|                                     </group>
 | ||
|                                 </group>
 | ||
|                             </page>
 | ||
|                         </notebook>
 | ||
|                     </sheet>
 | ||
|                 </form>
 | ||
|             </field>
 | ||
|         </record>
 | ||
| 
 | ||
|         <record id="view_mailchimp_lists_tree" model="ir.ui.view">
 | ||
|             <field name="name">mailchimp.lists.tree</field>
 | ||
|             <field name="model">mailchimp.lists</field>
 | ||
|             <field name="arch" type="xml">
 | ||
|                 <tree string="MailChimp Lists/Audiences">
 | ||
|                     <field name="name"/>
 | ||
|                     <field name="date_created"/>
 | ||
|                     <field name="list_id"/>
 | ||
|                     <field name="partner_id"/>
 | ||
|                     <field name="list_rating"/>
 | ||
|                     <!--<button name="export_in_mailchimp" attrs="{'invisible': [('list_id','!=', False)]}" string="Export In MailChimp" type="object" icon="fa-external-link"/>-->
 | ||
|                     <!--<button name="update_in_mailchimp" attrs="{'invisible': [('list_id','=', False)]}" string="Update In MailChimp" type="object" icon="fa-share-square-o"/>-->
 | ||
|                     <button name="refresh_list" attrs="{'invisible': [('list_id','=', False)]}" string="Refresh"
 | ||
|                             type="object" icon="fa-refresh"/>
 | ||
|                 </tree>
 | ||
|             </field>
 | ||
|         </record>
 | ||
| 
 | ||
|         <record id="view_mailchimp_lists_search" model="ir.ui.view">
 | ||
|             <field name="name">mailchimp.lists.search</field>
 | ||
|             <field name="model">mailchimp.lists</field>
 | ||
|             <field name="arch" type="xml">
 | ||
|                 <search string="MailChimp Lists/Audiences">
 | ||
|                     <field name="name"/>
 | ||
|                     <field name="list_id"/>
 | ||
|                     <field name="account_id"/>
 | ||
|                     <group expand="0" string="Group By...">
 | ||
|                         <filter string="Account" name="account" domain="[]" context="{'group_by':'account_id'}"/>
 | ||
|                     </group>
 | ||
|                 </search>
 | ||
|             </field>
 | ||
|         </record>
 | ||
| 
 | ||
|         <record id="action_mailchimp_lists" model="ir.actions.act_window">
 | ||
|             <field name="name">MailChimp Lists/Audiences</field>
 | ||
|             <field name="type">ir.actions.act_window</field>
 | ||
|             <field name="res_model">mailchimp.lists</field>
 | ||
|             <field name="view_type">form</field>
 | ||
|             <field name="view_mode">tree,form</field>
 | ||
|             <field name="context">{}</field>
 | ||
|             <field name="help" type="html">
 | ||
|                 <p>
 | ||
|                     Retrieve the Lists/Audiences of configured lists on the account using Import
 | ||
|                     opeations.
 | ||
|                 </p>
 | ||
|             </field>
 | ||
|         </record>
 | ||
| 
 | ||
|         <menuitem name="Lists/Audiences" parent="menu_mailchimp_root"
 | ||
|                   action="action_mailchimp_lists" id="menu_action_mailchimp_listss"
 | ||
|                   sequence="20"/>
 | ||
|     </data>
 | ||
| </odoo>
 |