Odoo Help

0

Working with the Website Blog module

By
Lucas Huber
on 5/12/16, 11:30 AM 2,057 views

Is there anybody using the blog module and is happy with it? How do you use it?

In my case I like the outcome, but the creation of a blog post is a real hassle. Normally I use a text program to write a blog and copy and paste it into the web application. But this does not work in Odoo, or results in sometimes strange behavior. For example I can't paste text into a table. With a normal Odoo webpage I do often use the HTML editor as workaround or to fix wrong layouts. But the blog module does not allow the use of the HTML editor. So I have to retype any table word by word into my blog and broken layouts are sometimes impossible to fix.


Any suggestions are welcome to improve this situation. 

1
Jérémy Kersten (jke)
On 5/12/16, 12:37 PM

Hello,

You cannot use the html editor because it is an html field on blog post model and not an ir.ui.view.

But if your really want paste your html code directly or just text, you can always add the field 'content' in the form view (of model blog post) in the backend. 


Thanks a lot Jérémy, this is very good solution

Lucas Huber
on 5/13/16, 5:06 AM

Just applied successfully your solution. Thanks; it helps While expecting Odoo to implement a fair blog app!

Thomas
on 9/26/17, 5:17 AM
0
Herve GUERIN
On 10/3/17, 10:06 AM

I needed to edit the content of a page of blog to add some specific html code.

I found a solution which is close to the proposal of Lucas Huber, but I found that this matter is not really related to the title of this post, so I post my solution in another post with a more appropriate title, there :

https://www.odoo.com/fr_FR/forum/aide-1/question/how-to-edit-html-content-of-a-blog-post-124590

My trick :

In the view of blog.post, I added that code in the view just before the </sheet> tag :

<group string="Contenu">

<field name="content" placeholder="Ajoutez une description..." widget="html" modifiers="{}"/ >

</group>

The ' widget="html" ' clause make the field use the html editor instead of a simple mono or multi-line editor.

The id of the view to be modified/inherited is : website_blog.view_blog_post_form

Flag

I just tried your proposal and I got an error message saying

ValidateError

Field(s) `arch` failed against a constraint: Invalid view definition

Error details:

attributes construct error, line 9, column 70

Thomas
on 10/10/17, 9:21 AM

You have a syntax problem in your xml file, may be caused at line 9 or may be not because those error message and not always very precise. If you dont see the error, my advice is to neutralize parts of your xml file up to find the wrong part. I think that my text <group>....</group> is syntaxically correct and cannot cause your error by itself.

Herve GUERIN
on 10/10/17, 10:47 AM

I don't have many possibilities as I am using a SAAS database! je vais en rester là sans changement. en attendant une version native du blog plus performante!Merci

Thomas
on 10/10/17, 12:10 PM
0
Lucas Huber
On 5/13/16, 5:13 AM

I did ad the content field to the blog.post model form view "blog.post.form" but strangely the html field does always over shoot the width of the form sheet. It is still usable but not nice. I don't have an idea why, because I often use html fields and never experierenced such behavior.

<notebook>
     <page name="content" string="Blog content">
             <field name="content" style="width: 600px"/>
     </page>
     <page name="technical" string="Technical" groups="base.group_no_one">
           <group string="Technical" groups="base.group_no_one">
                 <field name="write_uid" context="{'default_groups_ref': ['base.group_user',                 'base.group_partner_manager', 'base.group_website_designer']}"/>    
                 <field name="write_date"/>
         </group>
     </page>
 </notebook>

I did try to avoid this in adding style="width: 600px" or widget="html".

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

4 follower(s)

Stats

Asked: 5/12/16, 11:30 AM
Seen: 2057 times
Last updated: 10/3/17, 10:06 AM