Files
odoo_source/addons/website_blog/data/website_blog_data.xml
T
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00

58 lines
2.3 KiB
XML

<?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="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="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>