odoo/addons/website_twitter/views/twitter_view.xml

57 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_website_config_settings" model="ir.ui.view">
<field name="name">Twitter settings</field>
<field name="model">website.config.settings</field>
<field name="inherit_id" ref="website.view_website_config_settings"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='social_twitter']" position="after">
<label for="id" string="Twitter API"/>
<div>
<p>Set your Twitter API access below to be able to use the Twitter Scroller Website snippet.<br/>
You can get your API credentials from <a href="https://apps.twitter.com/app/new" target="new">https://apps.twitter.com/app/new</a>
</p>
<div>
<field name="twitter_tutorial" class="oe_inline"/><label for="twitter_tutorial"/>
<blockquote class="small" attrs="{'invisible':[('twitter_tutorial','=',False)]}">
<h2>How to configure the Twitter API access</h2>
<ol>
<li>Create a new Twitter application on <a href="https://apps.twitter.com/app/new" target="new">https://apps.twitter.com/app/new</a>
with the following values:
<ul>
<li><strong>Name: </strong> Odoo Tweet Scroller</li>
<li><strong>Description: </strong> Odoo Tweet Scroller </li>
<li><strong>Website: </strong> <tt>https://www.odoo.com</tt></li>
<li><strong>Callback URL: </strong> leave it blank</li>
<li>Accept terms of use and click on the Create button at the bottom</li>
</ul>
</li>
<li>Switch to the API Keys tab: <br/>
<img src='/website_twitter/static/src/img/api_key.png'/>
</li>
<li>Copy/Paste API Key and Secret below</li>
<li>Enter the screen name from which you want to load favorite Tweets (does not need to be the same as the API keys)</li>
</ol>
</blockquote>
</div>
<div>
<label for="twitter_api_key"/>
<field name="twitter_api_key" class="oe_inline"/>
</div>
<div>
<label for="twitter_api_secret"/>
<field name="twitter_api_secret" class="oe_inline"/>
</div>
<div>
<label for="twitter_screen_name"/>
<field name="twitter_screen_name" class="oe_inline"/>
</div>
</div>
</xpath>
</field>
</record>
</data>
</openerp>