185 lines
8.9 KiB
XML
185 lines
8.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
<record id="forum_help" model="forum.forum">
|
|
<field name="name">Help</field>
|
|
</record>
|
|
|
|
<record id="menu_questions" model="website.menu">
|
|
<field name="name">Forum</field>
|
|
<field name="url" eval="'/forum/'+str(ref('website_forum.forum_help'))"/>
|
|
<field name="parent_id" ref="website.main_menu"/>
|
|
<field name="sequence" type="int">35</field>
|
|
</record>
|
|
</data>
|
|
<data>
|
|
<function model="ir.config_parameter" name="set_param" eval="('auth_signup.allow_uninvited', True)" />
|
|
|
|
<!-- JUMP TO FORUM AT INSTALL -->
|
|
<record id="action_open_forum" model="ir.actions.act_url">
|
|
<field name="name">Forum</field>
|
|
<field name="target">self</field>
|
|
<field name="url" eval="'/forum/'+str(ref('website_forum.forum_help'))"/>
|
|
</record>
|
|
|
|
<!-- Set Admin karma -->
|
|
<record id="base.user_root" model="res.users">
|
|
<field name="karma">2500</field>
|
|
</record>
|
|
|
|
<!-- Answers subtypes -->
|
|
<record id="mt_answer_new" model="mail.message.subtype">
|
|
<field name="name">New Answer</field>
|
|
<field name="res_model">forum.post</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="hidden" eval="False"/>
|
|
<field name="description">New Answer</field>
|
|
</record>
|
|
<record id="mt_answer_edit" model="mail.message.subtype">
|
|
<field name="name">Answer Edited</field>
|
|
<field name="res_model">forum.post</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="description">Answer Edited</field>
|
|
</record>
|
|
<!-- Questions subtypes -->
|
|
<record id="mt_question_new" model="mail.message.subtype">
|
|
<field name="name">New Question</field>
|
|
<field name="res_model">forum.post</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="description">New Question</field>
|
|
</record>
|
|
<record id="mt_question_edit" model="mail.message.subtype">
|
|
<field name="name">Question Edited</field>
|
|
<field name="res_model">forum.post</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="description">Question Edited</field>
|
|
</record>
|
|
<!-- Forum subtypes, to follow all answers or questions -->
|
|
<record id="mt_forum_answer_new" model="mail.message.subtype">
|
|
<field name="name">New Answer</field>
|
|
<field name="res_model">forum.forum</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="hidden" eval="False"/>
|
|
<field name="parent_id" eval="ref('mt_answer_new')"/>
|
|
<field name="relation_field">forum_id</field>
|
|
</record>
|
|
<record id="mt_forum_question_new" model="mail.message.subtype">
|
|
<field name="name">New Question</field>
|
|
<field name="res_model">forum.forum</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="hidden" eval="False"/>
|
|
<field name="parent_id" eval="ref('mt_question_new')"/>
|
|
<field name="relation_field">forum_id</field>
|
|
</record>
|
|
|
|
</data>
|
|
<data noupdate="1">
|
|
|
|
<record id="base.open_menu" model="ir.actions.todo">
|
|
<field name="action_id" ref="action_open_forum"/>
|
|
<field name="state">open</field>
|
|
</record>
|
|
|
|
<!-- Reasons for closing Post -->
|
|
<record id="reason_1" model="forum.post.reason">
|
|
<field name="name">duplicate post</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_2" model="forum.post.reason">
|
|
<field name="name">off-topic or not relevant</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_3" model="forum.post.reason">
|
|
<field name="name">too subjective and argumentative</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_4" model="forum.post.reason">
|
|
<field name="name">not a real post</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_6" model="forum.post.reason">
|
|
<field name="name">not relevant or out dated</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_7" model="forum.post.reason">
|
|
<field name="name">contains offensive or malicious remarks</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_8" model="forum.post.reason">
|
|
<field name="name">spam or advertising</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_9" model="forum.post.reason">
|
|
<field name="name">too localized</field>
|
|
<field name="reason_type">basic</field>
|
|
</record>
|
|
<record id="reason_11" model="forum.post.reason">
|
|
<field name="name">insulting and offensive language</field>
|
|
<field name="reason_type">offensive</field>
|
|
</record>
|
|
<record id="reason_12" model="forum.post.reason">
|
|
<field name="name">violent language</field>
|
|
<field name="reason_type">offensive</field>
|
|
</record>
|
|
<record id="reason_13" model="forum.post.reason">
|
|
<field name="name">inappropriate and unacceptable statements</field>
|
|
<field name="reason_type">offensive</field>
|
|
</record>
|
|
<record id="reason_14" model="forum.post.reason">
|
|
<field name="name">threatening language</field>
|
|
<field name="reason_type">offensive</field>
|
|
</record>
|
|
<record id="reason_15" model="forum.post.reason">
|
|
<field name="name">racist and hate speech</field>
|
|
<field name="reason_type">offensive</field>
|
|
</record>
|
|
|
|
<!-- Email template for email validation (for karma purpose) -->
|
|
<record id="validation_email" model="mail.template">
|
|
<field name="name">Forum: Email Verification</field>
|
|
<field name="model_id" ref="base.model_res_users"/>
|
|
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
|
|
<field name="email_to">${object.email|safe}</field>
|
|
<field name="subject"><![CDATA[${object.company_id.name} Forums validation]]></field>
|
|
<field name="body_html"><![CDATA[
|
|
<div summary="o_mail_notification" style="padding:0px; width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
|
<table cellspacing="0" cellpadding="0" style="width:600px; border-collapse:collapse; background:inherit; color:inherit">
|
|
<tbody><tr>
|
|
<td valign="center" width="200" style="padding:0px 10px 5px 5px; font-size: 12px">
|
|
<img src="/logo.png" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.name}">
|
|
</td>
|
|
</tr></tbody>
|
|
</table>
|
|
</div>
|
|
<div summary="o_mail_notification" style="padding:0px; width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
|
<table cellspacing="0" cellpadding="0" style="vertical-align:top; padding:0px; border-collapse:collapse; background:inherit; color:inherit">
|
|
<tbody><tr>
|
|
<td valign="top" style="width:600px; padding:0px 10px 5px 5px;">
|
|
<div>
|
|
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0;margin:0px auto;padding:0">
|
|
</div>
|
|
</td>
|
|
</tr></tbody>
|
|
</table>
|
|
</div>
|
|
<div style="padding:0px; width:600px; max-width:600px; margin:0 auto; background: #FFFFFF repeat top /100%; color:#777777">
|
|
<table cellspacing="0" cellpadding="0" style="width:600px ;text-align:justify; margin:0 auto; border-collapse:collapse; background:inherit; color:inherit">
|
|
<tbody><tr>
|
|
<td style="padding:0px 10px 5px 5px;font-size: 14px;">
|
|
<p>Dear ${object.name},</p>
|
|
<p>You have been invited to validate your email in order to get access to
|
|
"${object.company_id.name}" Q/A Forums.</p>
|
|
<p>To validate your email, please click on the following link:</p>
|
|
<a style="margin-left: 15px; padding:5px 10px; border-radius: 3px; background-color:#875A7B; text-align:center; text-decoration:none; color:#F7FBFD;" href="${ctx.get('token_url')}">
|
|
Validate my account for "${object.company_id.name}" Q/A Forums
|
|
</a>
|
|
<p>Thanks for your participation!</p>
|
|
</td>
|
|
</tr></tbody>
|
|
</table>
|
|
</div>]]></field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|