odoo/addons/website_blog/data/website_blog_data.xml

60 lines
2.4 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="1">
<record id="blog_blog_1" model="blog.blog">
<field name="name">Our Blog</field>
<field name="subtitle">Get in touch with us</field>
</record>
<record id="menu_news" model="website.menu">
<field name="name">Blog</field>
<field name="url" eval="'/blog/'+str(ref('website_blog.blog_blog_1'))"/>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">40</field>
<field name="website_id" ref="website.default_website"/>
</record>
<!-- Pre loaded covers -->
<record id="blog_post_cover_01" model="ir.attachment">
<field name="public" eval="True"/>
<field name="name">Blog Post Cover 1</field>
<field name="datas_fname">Blog Post Cover 1</field>
<field name="res_model">ir.ui.view</field>
<field name="type">url</field>
<field name="url">/website_blog/static/src/img/demo/blog_post_cover_1.jpg</field>
</record>
<record id="blog_post_cover_02" model="ir.attachment">
<field name="public" eval="True"/>
<field name="name">Blog Post Cover 2</field>
<field name="datas_fname">Blog Post Cover 2</field>
<field name="res_model">ir.ui.view</field>
<field name="type">url</field>
<field name="url">/website_blog/static/src/img/demo/blog_post_cover_2.jpg</field>
</record>
</data>
<data>
<!-- jump to blog at install -->
<record id="action_open_website" model="ir.actions.act_url">
<field name="name">Website Blogs</field>
<field name="target">self</field>
<field name="url" eval="'/blog/'+str(ref('website_blog.blog_blog_1'))"/>
</record>
<record id="base.open_menu" model="ir.actions.todo">
<field name="action_id" ref="action_open_website"/>
<field name="state">open</field>
</record>
<!-- Blog-related subtypes for messaging / Chatter -->
<record id="mt_blog_blog_published" model="mail.message.subtype">
<field name="name">Published Post</field>
<field name="res_model">blog.blog</field>
<field name="default" eval="True"/>
<field name="description">Published Post</field>
</record>
</data>
</odoo>