Files
enterprise-addons/social_twitter/views/social_post_template_views.xml
T

55 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="social_post_template_view_form" model="ir.ui.view">
<field name="name">social.post.template.view.form.inherit.social.twitter</field>
<field name="model">social.post.template</field>
<field name="priority">10</field>
<field name="inherit_id" ref="social.social_post_template_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('o_social_post_preview_container')]" position="inside">
<field name="has_twitter_account" invisible="1" />
<field name="twitter_preview" nolabel="1" colspan="2" widget="social_post_preview" media_type="twitter"
readonly="1"
invisible="not has_twitter_account or (message in [False, ''] and not image_ids)"
class="o_social_preview_wrapper m-0 px-4 py-4 bg-200"/>
</xpath>
<field name="message" position="after">
<field name="is_twitter_post_limit_exceed" invisible="True"/>
<field name="twitter_post_limit_message" class="text-muted" invisible="not twitter_post_limit_message or is_twitter_post_limit_exceed or is_split_per_media" string=""/>
<field name="twitter_post_limit_message" class="text-danger" invisible="not has_twitter_account or not is_twitter_post_limit_exceed or is_split_per_media" string=""/>
</field>
<xpath expr="//notebook[@name='media_customization']" position="inside">
<page string="Twitter" name="twitter_content"
invisible="not has_twitter_account">
<group>
<group>
<field name="twitter_message"
required="is_split_per_media and has_twitter_account and not twitter_image_ids"
string="Message"/>
<field name="twitter_post_limit_message" class="text-muted"
invisible="not twitter_post_limit_message or is_twitter_post_limit_exceed"
string=""/>
<field name="twitter_post_limit_message" class="text-danger"
invisible="not has_twitter_account or not is_twitter_post_limit_exceed"
string=""/>
<field name="twitter_image_ids"
widget="many2many_binary"
required="is_split_per_media and has_twitter_account and not twitter_message"
string="Images"/>
</group>
<group invisible="not display_twitter_preview">
<field name="twitter_preview" nolabel="1"
widget="social_post_preview"
media_type="twitter_preview"
readonly="1"
class="o_social_preview_wrapper m-0 px-4 py-4 bg-200"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
</data>
</odoo>