##############################################################################
import controllers
-import website_blog
+import models
import wizard
'author': 'OpenERP SA',
'depends': ['knowledge', 'website_mail'],
'data': [
- 'website_blog_data.xml',
+ 'data/website_blog_data.xml',
'views/website_blog_classic.xml',
'views/website_blog_templates.xml',
# 'wizard/document_page_create_menu_view.xml',
'wizard/document_page_show_diff_view.xml',
'security/ir.model.access.csv',
- 'security/website_mail.xml',
+ 'security/website_blog.xml',
],
'demo': [
- 'website_blog_demo.xml'
+ 'data/website_blog_demo.xml'
],
'test': [
'test/document_page_test00.yml'
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+ <!-- <data noupdate="1"> -->
+ <data>
+
+ <record id="action_open_website" model="ir.actions.act_url">
+ <field name="name">Website Blogs</field>
+ <field name="target">self</field>
+ <field name="url">/blog</field>
+ </record>
+ <record id="base.open_menu" model="ir.actions.todo">
+ <field name="action_id" ref="action_open_website"/>
+ <field name="state">open</field>
+ </record>
+
+ <!-- CATEGORIES -->
+ <record id="blog_category_1" model="blog.category">
+ <field name="name">News</field>
+ <field name="description">Presentation of new OpenERP features</field>
+ <field name="template">
+Summary of the feature
+
+Long explanation
+
+Conclusion
+
+Additional ressources
+ </field>
+ </record>
+
+ <!-- Post-related subtypes for messaging / Chatter -->
+ <record id="mt_blog_post_new" model="mail.message.subtype">
+ <field name="name">New Post</field>
+ <field name="res_model">blog.post</field>
+ <field name="default" eval="True"/>
+ <field name="description">New Post</field>
+ </record>
+ <record id="mt_blog_post_published" model="mail.message.subtype">
+ <field name="name">Post Published</field>
+ <field name="res_model">blog.post</field>
+ <field name="default" eval="False"/>
+ <field name="description">Post Published</field>
+ </record>
+ <!-- Project-related subtypes for messaging / Chatter -->
+ <record id="mt_blog_category_post_new" model="mail.message.subtype">
+ <field name="name">New Post</field>
+ <field name="res_model">blog.category</field>
+ <field name="default" eval="True"/>
+ <field name="parent_id" eval="ref('mt_blog_post_new')"/>
+ <field name="relation_field">category_id</field>
+ </record>
+
+
+ <!-- Mail group for the company's jobs -->
+
+ <record id="blog_category_2" model="blog.category">
+ <field name="name">Jobs</field>
+ <field name="description">Job Announces</field>
+ </record>
+
+ <!-- Layout add nav and footer -->
+
+ <template id="footer_custom" inherit_option_id="website.layout" name="Job Announces">
+ <xpath expr="//footer//div[@name='info']/ul" position="inside">
+ <li><a t-href="/blog/%(website_blog.blog_category_2)d/">Jobs</a></li>
+ </xpath>
+ </template>
+
+
+ </data>
+</openerp>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+ <!-- <data noupdate="1"> -->
+ <data>
+
+ <!-- TAGS -->
+ <record id="blog_tag_1" model="blog.tag">
+ <field name="name">functional</field>
+ </record>
+ <record id="blog_tag_2" model="blog.tag">
+ <field name="name">pos</field>
+ </record>
+
+ <!-- POSTS -->
+ <record id="blog_post_1" model="blog.post">
+ <field name="name">OpenERP v8 New Features</field>
+ <field name="category_id" ref="blog_category_1"/>
+ <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
+ <field name="content"><![CDATA[
+ <section data-snippet-id='image-text'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-6 mt16 mb16">
+ <img class="img-responsive shadow" src="/website/static/src/img/image_text.jpg"/>
+ </div>
+ <div class="col-md-6 mt16">
+ <p>
+ OpenERP's Point of Sale introduces a super clean
+ interface with no installation required that runs
+ online and offline on modern hardwares.
+ </p><p>
+ It's full integration with the company inventory
+ and accounting, gives you real time statistics
+ without the hassle of integrating several applications.
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+ <section class="mt16 mb16" data-snippet-id='text-block'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12 text-center mt16 mb32">
+ <h2>
+ Linked with Project Management
+ </h2>
+ <h3 class="text-muted">Infinitely flexible. Incredibly easy to use.</h3>
+ </div>
+ <div class="col-md-12 mb16 mt16">
+ <p>
+ OpenERP's <b>collaborative and realtime</b> project
+ management helps your team get work done. Keep
+ track of everything, from the big picture to the
+ minute details, from the customer contract to the
+ billing.
+ </p><p>
+ Organize projects around <b>your own processes</b>. Work
+ on tasks and issues using the kanban view, schedule
+ tasks using the gantt chart and control deadlines
+ in the calendar view. Every project may have it's
+ own stages allowing teams to optimize their job.
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+ <section class="dark mt16 mb16" data-snippet-id='big-picture'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12 text-center mt32 mb32">
+ <h2>Work with the hardware you already have...</h2>
+ </div>
+ <div class="col-md-12">
+ <img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
+ </div>
+ <div class="col-md-6 col-md-offset-3 mb16 mt16">
+ <p class="text-center">
+ <b>No installation required</b>
+ </p>
+ <p class="text-center">
+ OpenERP's Point of Sale introduces a super clean
+ interface with no installation required that runs
+ online and offline on modern hardware. Laptops,
+ tablets, industrial POS, it runs on everything.
+ </p>
+ <p class="text-center">
+ <a href="/page/website.contactus">Get more information »</a>
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+
+]]>
+</field>
+ </record>
+
+ <record id="blog_post_2" model="blog.post">
+ <field name="name">New Hardware Integration</field>
+ <field name="category_id" ref="blog_category_1"/>
+ <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
+ <field name="content">
+<![CDATA[<section class="mt16 mb16" data-snippet-id='big-picture'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12">
+ <img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
+ </div>
+ <div class="col-md-6 col-md-offset-3 mb16 mt16">
+ <p class="text-center">
+ <b>New Features Launched</b>
+ </p>
+ <p class="text-center">
+ OpenERP's Point of Sale introduces a super clean
+ interface with no installation required that runs
+ online and offline on modern hardware. Laptops,
+ tablets, industrial POS, it runs on everything.
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+ <section data-snippet-id='pricing'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12 text-center mt16 mb32">
+ <h2>Our Offers</h2>
+ </div>
+
+ <div class="col-md-4">
+ <div class="panel panel-info">
+ <!-- Default panel contents -->
+ <div class="panel-heading text-center">
+ <h2 style="margin: 0">Beginner</h2>
+ <p style="margin: 0" class="text-muted">
+ Starter package
+ </p>
+ </div>
+ <div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1)">
+ <h2 style="margin: 0"><span>$</span><b style="font-size: 60px">450</b><small>.00</small></h2>
+ <div>per month</div>
+ </div>
+
+ <!-- List group -->
+ <ul class="list-group">
+ <li class="list-group-item">Battery: 8 hours</li>
+ <li class="list-group-item">Screen: 2.5 inch</li>
+ <li class="list-group-item">Weight: 1.1 ounces</li>
+ <li class="list-group-item">No support</li>
+ </ul>
+ <div class="panel-footer text-center">
+ <p class="text-muted">
+ <i>Free shipping, satisfied or reimbursed.</i>
+ </p>
+ <a href="/page/website.contactus" class="btn btn-primary btn-lg">Order now</a>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-4">
+ <div class="panel panel-primary">
+ <!-- Default panel contents -->
+ <div class="panel-heading text-center">
+ <h2 style="margin: 0">Professional</h2>
+ <p style="margin: 0">
+ Enterprise package
+ </p>
+ </div>
+ <div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1)">
+ <h2 style="margin: 0"><span>$</span><b style="font-size: 60px">590</b><small>.00</small></h2>
+ <div>per month</div>
+ </div>
+
+ <!-- List group -->
+ <ul class="list-group">
+ <li class="list-group-item">Battery: 12 hours</li>
+ <li class="list-group-item">Screen: 2.8 inch</li>
+ <li class="list-group-item">Weight: 1.2 ounces</li>
+ <li class="list-group-item">Limited support</li>
+ </ul>
+ <div class="panel-footer text-center">
+ <p class="text-muted">
+ <i>Free shipping, satisfied or reimbursed.</i>
+ </p>
+ <a href="/page/website.contactus" class="btn btn-primary btn-lg">Order now</a>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-4">
+ <div class="panel panel-info">
+ <!-- Default panel contents -->
+ <div class="panel-heading text-center">
+ <h2 style="margin: 0">Expert</h2>
+ <p style="margin: 0" class="text-muted">
+ The top of the top
+ </p>
+ </div>
+ <div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1)">
+ <h2 style="margin: 0"><span>$</span><b style="font-size: 60px">890</b><small>.00</small></h2>
+ <div>per month</div>
+ </div>
+
+ <!-- List group -->
+ <ul class="list-group">
+ <li class="list-group-item">Battery: 20 hours</li>
+ <li class="list-group-item">Screen: 2.8 inch</li>
+ <li class="list-group-item">Weight: 1.2 ounces</li>
+ <li class="list-group-item">Unlimited support</li>
+ </ul>
+ <div class="panel-footer text-center">
+ <p class="text-muted">
+ <i>Free shipping, satisfied or reimbursed.</i>
+ </p>
+ <a href="/page/website.contactus" class="btn btn-primary btn-lg">Contact us</a>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </section>
+
+
+]]>
+</field>
+ </record>
+
+ <record id="blog_post_3" model="blog.post">
+ <field name="name">Touchscreen Point of Sale</field>
+ <field name="category_id" ref="blog_category_1"/>
+ <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1'), ref('blog_tag_2')])]"/>
+ <field name="content">
+<![CDATA[<p>The brand new OpenERP touchscreen point of sale available with 6.1 allows you
+to manage your shop sales very easily. It's fully web based so that you don't
+have to install or deploy any software and all the sales shops can be easily
+consolidated. It works in connected and disconnected modes so that you can
+continue to sell if you lose your internet connection.</p>
+<img src="http://www.openerp.com/sites/default/files/fileattach/POS(2).png" alt="">
+<h3>Here's a summary of its main features and benefits:</h3>
+<ul>
+ <li>100% WEB based</li>
+ <li>available for any touchscreen device (ipod, ipad, any tablet)mobile (with portable devices)</li>
+ <li>no installation required</li>
+ <li>no synchronization needed, completely integrated</li>
+ <li>continue working even when your connection is down if you close your browser, data won't be lost</li>
+ <li>fully web based with a clean interface smart interface</li>
+</ul>
+<p>You have different options to select your products. You can do it through the
+barcode reader, just browse through the categories you have put in place (ie.
+drinks, snacks, meals, etc.), or text search in case neither of the other
+options work for you. If you need to use the POS for your restaurant, for
+example, your employees can record at the same time multiple tickets without
+having to wait to do one transaction at a time. Along, to facilitate payment,
+the application allows multiple payment methods.</p>
+<p>The POS application is so simple and accessible to use that your shop or
+restaurant will never need any other tool to manage orders. Due to its smart
+and user-friendly interface you don't need any training to learn how to use it.
+Think of it as an out-of-the-box solution to boost your business' productivity.
+</p>
+]]>
+</field>
+ </record>
+
+ <record id="blog_post_4" model="blog.post">
+ <field name="name">Announcig a New Partnership</field>
+ <field name="category_id" ref="blog_category_1"/>
+ <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
+ <field name="content"><![CDATA[
+ <section data-snippet-id='image-text'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-6 mt16 mb16">
+ <img class="img-responsive shadow" src="/website/static/src/img/text_image.png"/>
+ </div>
+ <div class="col-md-6 mt16">
+ <p>
+ We are proud to announce a new partnership with
+ the company OpenERP. Their open source application suite
+ will allow us to reach new market, specifically in
+ the accounting area.
+ </p><p>
+ The full integration with the company inventory
+ and accounting, will give our customers real time statistics
+ without the hassle of integrating several applications.
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+ <section class="mt16 mb16" data-snippet-id='text-block'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12 text-center mt16 mb32">
+ <h2>
+ Linked with Project Management
+ </h2>
+ <h3 class="text-muted">Infinitely flexible. Incredibly easy to use.</h3>
+ </div>
+ <div class="col-md-12 mb16 mt16">
+ <p>
+ OpenERP's <b>collaborative and realtime</b> project
+ management helps your team get work done. Keep
+ track of everything, from the big picture to the
+ minute details, from the customer contract to the
+ billing.
+ </p><p>
+ Organize projects around <b>your own processes</b>. Work
+ on tasks and issues using the kanban view, schedule
+ tasks using the gantt chart and control deadlines
+ in the calendar view. Every project may have it's
+ own stages allowing teams to optimize their job.
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+ <section class="dark mt16 mb16" data-snippet-id='big-picture'>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-12 text-center mt32 mb32">
+ <h2>Work with the hardware you already have...</h2>
+ </div>
+ <div class="col-md-12">
+ <img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
+ </div>
+ <div class="col-md-6 col-md-offset-3 mb16 mt16">
+ <p class="text-center">
+ <b>No installation required</b>
+ </p>
+ <p class="text-center">
+ OpenERP's Point of Sale introduces a super clean
+ interface with no installation required that runs
+ online and offline on modern hardware. Laptops,
+ tablets, industrial POS, it runs on everything.
+ </p>
+ <p class="text-center">
+ <a href="/page/website.contactus">Get more information »</a>
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+
+]]>
+</field>
+ </record>
+
+
+ </data>
+</openerp>
--- /dev/null
+import website_blog
--- /dev/null
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+from openerp import tools
+from openerp import SUPERUSER_ID
+from openerp.osv import osv, fields
+from openerp.tools.translate import _
+
+import difflib
+
+
+class BlogCategory(osv.Model):
+ _name = 'blog.category'
+ _description = 'Blog Category'
+ _inherit = ['mail.thread']
+ _order = 'name'
+
+ _columns = {
+ 'name': fields.char('Name', required=True),
+ 'description': fields.text('Description'),
+ 'template': fields.html('Template'),
+ 'blog_post_ids': fields.one2many(
+ 'blog.post', 'category_id',
+ 'Blogs',
+ ),
+ }
+
+
+class BlogTag(osv.Model):
+ _name = 'blog.tag'
+ _description = 'Blog Tag'
+ _order = 'name'
+
+ _columns = {
+ 'name': fields.char('Name', required=True),
+ 'blog_post_ids': fields.many2many(
+ 'blog.post', string='Posts',
+ ),
+ }
+
+
+class BlogPost(osv.Model):
+ _name = "blog.post"
+ _description = "Blog Post"
+ _inherit = ['mail.thread']
+ _order = 'name'
+ # maximum number of characters to display in summary
+ _shorten_max_char = 250
+
+ def get_shortened_content(self, cr, uid, ids, name, arg, context=None):
+ res = {}
+ for page in self.browse(cr, uid, ids, context=context):
+ try:
+ body_short = tools.html_email_clean(
+ page.content,
+ remove=True,
+ shorten=True,
+ max_length=self._shorten_max_char,
+ expand_options={
+ 'oe_expand_container_tag': 'div',
+ 'oe_expand_container_class': 'oe_mail_expand text-center',
+ 'oe_expand_container_content': '',
+ 'oe_expand_a_href': '/blog/%d/%d' % (page.category_id.id, page.id),
+ 'oe_expand_a_class': 'oe_mail_expand btn btn-info',
+ 'oe_expand_separator_node': 'br',
+ },
+ protect_sections=True,
+ )
+ except Exception:
+ body_short = False
+ res[page.id] = body_short
+ return res
+
+ _columns = {
+ 'name': fields.char('Title', required=True),
+ 'category_id': fields.many2one(
+ 'blog.category', 'Category',
+ required=True, ondelete='cascade',
+ ),
+ 'tag_ids': fields.many2many(
+ 'blog.tag', string='Tags',
+ ),
+ 'content': fields.html('Content'),
+ 'shortened_content': fields.function(
+ get_shortened_content,
+ type='html',
+ string='Shortened Content',
+ help="Shortened content of the page that serves as a summary"
+ ),
+ # website control
+ 'website_published': fields.boolean(
+ 'Publish', help="Publish on the website"
+ ),
+ 'website_published_datetime': fields.datetime(
+ 'Publish Date'
+ ),
+ # TDE TODO FIXME: when website_mail/mail_thread.py inheritance work -> this field won't be necessary
+ 'website_message_ids': fields.one2many(
+ 'mail.message', 'res_id',
+ domain=lambda self: [
+ '&', ('model', '=', self._name), ('type', '=', 'comment')
+ ],
+ string='Website Messages',
+ help="Website communication history",
+ ),
+ # technical stuff: history, menu (to keep ?)
+ 'history_ids': fields.one2many(
+ 'blog.post.history', 'post_id',
+ 'History', help='Last post modifications'
+ ),
+ 'menu_id': fields.many2one('ir.ui.menu', "Menu", readonly=True),
+ # creation / update stuff
+ 'create_date': fields.datetime(
+ 'Created on',
+ select=True, readonly=True,
+ ),
+ 'create_uid': fields.many2one(
+ 'res.users', 'Author',
+ select=True, readonly=True,
+ ),
+ 'write_date': fields.datetime(
+ 'Last Modified on',
+ select=True, readonly=True,
+ ),
+ 'write_uid': fields.many2one(
+ 'res.users', 'Last Contributor',
+ select=True, readonly=True,
+ ),
+ }
+
+ def create_history(self, cr, uid, ids, vals, context=None):
+ for i in ids:
+ history = self.pool.get('blog.post.history')
+ if vals.get('content'):
+ res = {
+ 'content': vals.get('content', ''),
+ 'post_id': i,
+ }
+ history.create(cr, uid, res)
+
+ def create(self, cr, uid, vals, context=None):
+ if context is None:
+ context = {}
+ create_context = dict(context, mail_create_nolog=True)
+ post_id = super(BlogPost, self).create(cr, uid, vals, context=create_context)
+ self.create_history(cr, uid, [post_id], vals, context)
+ return post_id
+
+ def write(self, cr, uid, ids, vals, context=None):
+ result = super(BlogPost, self).write(cr, uid, ids, vals, context)
+ self.create_history(cr, uid, ids, vals, context)
+ return result
+
+ def img(self, cr, uid, ids, field='image_small', context=None):
+ post = self.browse(cr, SUPERUSER_ID, ids[0], context=context)
+ return "/website/image?model=%s&field=%s&id=%s" % ('res.users', field, post.create_uid.id)
+
+
+class BlogPostHistory(osv.Model):
+ _name = "blog.post.history"
+ _description = "Document Page History"
+ _order = 'id DESC'
+ _rec_name = "create_date"
+
+ _columns = {
+ 'post_id': fields.many2one('blog.post', 'Blog Post'),
+ 'summary': fields.char('Summary', size=256, select=True),
+ 'content': fields.text("Content"),
+ 'create_date': fields.datetime("Date"),
+ 'create_uid': fields.many2one('res.users', "Modified By"),
+ }
+
+ def getDiff(self, cr, uid, v1, v2, context=None):
+ history_pool = self.pool.get('blog.post.history')
+ text1 = history_pool.read(cr, uid, [v1], ['content'])[0]['content']
+ text2 = history_pool.read(cr, uid, [v2], ['content'])[0]['content']
+ line1 = line2 = ''
+ if text1:
+ line1 = text1.splitlines(1)
+ if text2:
+ line2 = text2.splitlines(1)
+ if (not line1 and not line2) or (line1 == line2):
+ raise osv.except_osv(_('Warning!'), _('There are no changes in revisions.'))
+ diff = difflib.HtmlDiff()
+ return diff.make_table(line1, line2, "Revision-%s" % (v1), "Revision-%s" % (v2), context=True)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.rule" id="website_blog_post_public">
+ <field name="name">Blog Post: public: published only</field>
+ <field name="model_id" ref="model_blog_post"/>
+ <field name="domain_force">[('website_published', '=', True)]</field>
+ <field name="groups" eval="[(4, ref('base.group_public'))]"/>
+ </record>
+
+ </data>
+</openerp>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data>
-
- <record model="ir.rule" id="website_blog_post_public">
- <field name="name">Blog Post: public: published only</field>
- <field name="model_id" ref="model_blog_post"/>
- <field name="domain_force">[('website_published', '=', True)]</field>
- <field name="groups" eval="[(4, ref('base.group_public'))]"/>
- </record>
-
- </data>
-</openerp>
#
##############################################################################
-from openerp.addons.mail.tests.test_mail_base import TestMailBase
+from openerp.addons.mail.tests.common import TestMail
from openerp.tools import mute_logger, email_split
-class TestControllers(TestMailBase):
+class TestControllers(TestMail):
def test_00(self):
cr, uid = self.cr, self.uid
</template>
<!-- Blog Post Summary -->
- <template id="view_blog_post_short" name="Blog Post Summary">
+ <template id="blog_post_short" name="Blog Post Summary">
<div>
<h2 class="text-center">
<a t-attf-href="/blog/#{blog_post.category_id.id}/#{blog_post.id}" t-field="blog_post.name"></a>
</h2>
- <p class="post-meta text-muted text-center">
+ <p class="post-meta text-muted text-center" name='blog_post_data'>
<span class="icon-calendar"> <span t-field="blog_post.create_date"/></span> &nbsp;
<span class="icon-user"> By <span t-field="blog_post.create_uid"/> &nbsp;</span>
<span t-if="len(blog_post.message_ids) > 0" class="icon-comment"> With
</template>
<!-- Options: Blog Post Summary: hide author -->
- <template id="view_blog_post_short_author" inherit_option_id="website_blog.view_blog_post_short" name="Hide Authors">
+ <template id="opt_blog_post_short_author" name="Hide Authors"
+ inherit_option_id="website_blog.blog_post_short">
<xpath expr="//span[@class='icon-user']" position="attributes">
<attribute name="class">hidden</attribute>
</xpath>
</template>
<!-- Options: Blog Post Summary: show category -->
- <template id="view_blog_post_short_category" inherit_option_id="website_blog.view_blog_post_short" name="Show Blog Name">
+ <template id="opt_blog_post_short_category" name="Blog Name"
+ inherit_option_id="website_blog.blog_post_short">
<xpath expr="//span[@class='icon-user']" position="after">
<span class="icon-folder-open"> In <span t-field="blog_post.category_id"/> &nbsp;</span>
</xpath>
</template>
+ <!-- Option: Blog Post Summary: show tags -->
+ <template id="opt_blog_post_short_tags" name="Tags"
+ inherit_option_id="website_blog.blog_post_short" inherit_id="website_blog.blog_post_short">
+ <xpath expr="//p[@name='blog_post_data']" position="after">
+ <p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
+ <span class="icon-tags"/>
+ <t t-foreach="blog_post.tag_ids" t-as="tag">
+ <a t-attf-href="/blog/tag/#{tag.id}" t-esc="tag.name"/> &nbsp;
+ </t>
+ </p>
+ </xpath>
+ </template>
+
<!-- Blog Post Complete -->
- <template id="view_blog_post" name="Blog Post">
+ <template id="blog_post_complete" name="Blog Post">
<div>
<t t-call="website.publish_management">
<t t-set="object" t-value="blog_post"/>
<t t-set="publish_edit" t-value="True"/>
</t>
- </div><div class="clearfix"/>
+ </div>
+ <div class="clearfix"/>
<h1 class="text-center" t-field="blog_post.name"/>
- <p class="post-meta text-muted text-center">
+ <p class="post-meta text-muted text-center" name="blog_post_data">
<span class="icon-calendar"> <span t-field="blog_post.create_date"/></span> &nbsp;
<span class="icon-user"> By <span t-field="blog_post.create_uid"/> &nbsp;</span>
<span t-if="len(blog_post.message_ids) > 0" class="icon-comment"> With
<a t-if="len(blog_post.message_ids) > 1" t-attf-href="#comments"><t t-esc="len(blog_post.message_ids)"/> comments</a>
</span>
</p>
- <p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
- <span class="icon-tags"/>
- <t t-foreach="blog_post.tag_ids" t-as="tag">
- <a t-attf-href="/blog/tag/#{tag.id}" t-esc="tag.name"/> &nbsp;
- </t>
- </p>
<div t-field="blog_post.content" class="mt16"/>
<hr class="mb32"/>
</template>
<!-- Options: Blog Post: user can reply -->
- <template id="view_blog_post_author" inherit_option_id="website_blog.view_blog_post" name="Hide Authors">
+ <template id="opt_blog_post_complete_comment" name="Comment Form"
+ inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete">
<xpath expr="//ul[last()]" position="after">
- <section groups="group_website_blog_reply" class="mb32">
- <h4>Leave a Comment</h4>
- <form id="comment" t-attf-action="/blog/#{blog_post.category_id.id}/#{blog_post.id}/post#post"
- method="POST">
- <img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
- <div class="pull-left mb32" style="width: 75%%">
- <textarea rows="3" class="form-control" placeholder="Write a comment..."></textarea>
- <button type="submit" class="btn btn-danger mt8">Post</button>
- </div>
- </form>
- </section>
+ <section groups="group_website_blog_reply" class="mb32">
+ <h4>Leave a Comment</h4>
+ <form id="comment" t-attf-action="/blog/#{blog_post.category_id.id}/#{blog_post.id}/post#post"
+ method="POST">
+ <img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
+ <div class="pull-left mb32" style="width: 75%%">
+ <textarea rows="3" class="form-control" placeholder="Write a comment..."></textarea>
+ <button type="submit" class="btn btn-danger mt8">Post</button>
+ </div>
+ </form>
+ </section>
</xpath>
</template>
<!-- Options: Blog Post: hide author -->
- <template id="view_blog_post_author" inherit_option_id="website_blog.view_blog_post" name="Hide Authors">
+ <template id="opt_blog_post_complete_author" name="Hide Authors"
+ inherit_option_id="website_blog.blog_post_complete">
<xpath expr="//span[@class='icon-user']" position="attributes">
<attribute name="class">hidden</attribute>
</xpath>
</template>
<!-- Options: Blog Post: show category -->
- <template id="view_blog_post_show_category" inherit_option_id="website_blog.view_blog_post" name="Show Blog Name">
+ <template id="opt_blog_post_complete_category" name="Blog Name"
+ inherit_option_id="website_blog.blog_post_complete">
<xpath expr="//span[@class='icon-user']" position="after">
<span class="icon-folder-open"> In <span t-field="blog_post.category_id"/> &nbsp;</span>
</xpath>
</template>
+ <!-- Options: Blog Post: show tags -->
+ <template id="opt_blog_post_complete_tags" name="Tags"
+ inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete">
+ <xpath expr="//p[@name='blog_post_data']" position="after">
+ <p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
+ <span class="icon-tags"/>
+ <t t-foreach="blog_post.tag_ids" t-as="tag">
+ <a t-attf-href="/blog/tag/#{tag.id}" t-esc="tag.name"/> &nbsp;
+ </t>
+ </p>
+ </xpath>
+ </template>
+
<!-- Page -->
<template id="index" name="Blogs" page="True">
<t t-call="website.layout">
- <t t-set="head">
- <script type="text/javascript" src="/website_blog/static/src/js/website_blog.js"></script>
- <link rel='stylesheet' href='/website_blog/static/src/css/website_blog.css'/>
- </t>
- <t t-set="title">Blog</t>
- <div id="wrap">
- <div class="container mt16 js_website_blog">
- <div class="row">
- <div class="col-lg-8 col-sm-9" t-if="not blog_post">
- <t t-foreach="blog_posts" t-as="blog_post" data-publish="">
- <t t-call="website_blog.view_blog_post_short"/>
- </t>
- <div class="pull-right" t-call="website.pager"/>
- </div>
- <div class="col-md-9 col-lg-8" t-if="blog_post">
- <t t-call="website_blog.view_blog_post">
- <t t-set="blog_post" t-value="blog_post"/>
- </t>
+ <t t-set="head">
+ <script type="text/javascript" src="/website_blog/static/src/js/website_blog.js"></script>
+ <link rel='stylesheet' href='/website_blog/static/src/css/website_blog.css'/>
+ </t>
+ <t t-set="title">Blog</t>
+ <div id="wrap">
+ <div class="container mt16 js_website_blog">
+ <div class="row">
+ <div class="col-lg-12 col-sm-12" t-if="not blog_post" id="blog_post">
+ <t t-foreach="blog_posts" t-as="blog_post" data-publish="">
+ <t t-call="website_blog.blog_post_short"/>
+ </t>
+ <div class="pull-right" t-call="website.pager"/>
+ </div>
+ <div class="col-lg-12 col-sm-12" t-if="blog_post" id="blog_posts_summary">
+ <t t-call="website_blog.blog_post_complete">
+ <t t-set="blog_post" t-value="blog_post"/>
+ </t>
+ </div>
</div>
</div>
</div>
- </div>
</t>
</template>
- <!-- Option: right column -->
- <template id="blog_right_column" inherit_id="website_blog.index" inherit_option_id="website_blog.index" name="Right Column">
+ <!-- Option: Blog: Right Column -->
+ <template id="blog_right_column" name="Right Column"
+ inherit_option_id="website_blog.index" inherit_id="website_blog.index">
<xpath expr="//div[@class='row']" position="inside">
- <div class="col-sm-3 hidden-xs col-lg-offset-1 mb32" id="right_column">
+ <div class="col-lg-3 col-sm-3 hidden-xs col-lg-offset-1 mb32" id="right_column">
<t t-if="category and editable">
<a t-attf-href="/blog/#{category.id}/new" class="btn btn-primary pull-right">New Blog Post</a>
</t>
<div class="clearfix mb48"/>
</div>
</xpath>
+ <xpath expr="//div[@id='blog_post']" position="attributes">
+ <attribute name="class">col-lg-8 col-sm-8</attribute>
+ </xpath>
+ <xpath expr="//div[@id='blog_posts_summary']" position="attributes">
+ <attribute name="class">col-lg-8 col-sm-8</attribute>
+ </xpath>
</template>
<!-- Option: Right Column: archives -->
- <template id="blog_history" inherit_id="website_blog.blog_right_column" inherit_option_id="website_blog.blog_right_column" name="Archives">
+ <template id="opt_blog_rc_history" name="Archives"
+ inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column">
<xpath expr="//div[@id='right_column']" position="inside">
<section>
<h4>Archives</h4>
</template>
<!-- Option: Right Column: about us -->
- <template id="blog_aboutus" inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column" name="About" priority="4">
+ <template id="opt_blog_rc_about_us" name="About Us" priority="4"
+ inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column">
<xpath expr="//div[@id='right_column']" position="inside">
<section class="mb16">
<h4>About us</h4>
</template>
<!-- Option: Right Column: follow us -->
- <template id="blog_followus" inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column" name="Follow us" priority="2">
+ <template id="opt_blog_rc_follow_us" name="Follow us" priority="2"
+ inherit_option_id="website_blog.blog_right_column" inherit_id="website_blog.blog_right_column">
<xpath expr="//div[@id='right_column']" position="inside">
<section class="mb16">
<h4>Follow us</h4>
</xpath>
</template>
- <!-- Option: Right Column: categories + category in blog post -->
- <template id="blog_categories" inherit_option_id="website_blog.blog_right_column" name="Other Blogs" priority="6">
+ <!-- Option: Right Column: categories -->
+ <template id="opt_blog_rc_categories" name="Other Blogs" priority="6"
+ inherit_option_id="website_blog.blog_right_column">
<xpath expr="//div[@id='right_column']" position="inside">
<section class="mb16">
<h4>Other Blogs</h4>
</xpath>
</template>
- </data>
+</data>
</openerp>
+++ /dev/null
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-
-from openerp import tools
-from openerp import SUPERUSER_ID
-from openerp.osv import osv, fields
-from openerp.tools.translate import _
-
-import difflib
-
-
-class BlogCategory(osv.Model):
- _name = 'blog.category'
- _description = 'Blog Category'
- _inherit = ['mail.thread']
- _order = 'name'
-
- _columns = {
- 'name': fields.char('Name', required=True),
- 'description': fields.text('Description'),
- 'template': fields.html('Template'),
- 'blog_post_ids': fields.one2many(
- 'blog.post', 'category_id',
- 'Blogs',
- ),
- }
-
-
-class BlogTag(osv.Model):
- _name = 'blog.tag'
- _description = 'Blog Tag'
- _order = 'name'
-
- _columns = {
- 'name': fields.char('Name', required=True),
- 'blog_post_ids': fields.many2many(
- 'blog.post', string='Posts',
- ),
- }
-
-
-class BlogPost(osv.Model):
- _name = "blog.post"
- _description = "Blog Post"
- _inherit = ['mail.thread']
- _order = 'name'
- # maximum number of characters to display in summary
- _shorten_max_char = 250
-
- def get_shortened_content(self, cr, uid, ids, name, arg, context=None):
- res = {}
- for page in self.browse(cr, uid, ids, context=context):
- try:
- body_short = tools.html_email_clean(
- page.content,
- remove=True,
- shorten=True,
- max_length=self._shorten_max_char,
- expand_options={
- 'oe_expand_container_tag': 'div',
- 'oe_expand_container_class': 'oe_mail_expand text-center',
- 'oe_expand_container_content': '',
- 'oe_expand_a_href': '/blog/%d/%d' % (page.category_id.id, page.id),
- 'oe_expand_a_class': 'oe_mail_expand btn btn-info',
- 'oe_expand_separator_node': 'br',
- },
- protect_sections=True,
- )
- except Exception:
- body_short = False
- res[page.id] = body_short
- return res
-
- _columns = {
- 'name': fields.char('Title', required=True),
- 'category_id': fields.many2one(
- 'blog.category', 'Category',
- required=True, ondelete='cascade',
- ),
- 'tag_ids': fields.many2many(
- 'blog.tag', string='Tags',
- ),
- 'content': fields.html('Content'),
- 'shortened_content': fields.function(
- get_shortened_content,
- type='html',
- string='Shortened Content',
- help="Shortened content of the page that serves as a summary"
- ),
- # website control
- 'website_published': fields.boolean(
- 'Publish', help="Publish on the website"
- ),
- 'website_published_datetime': fields.datetime(
- 'Publish Date'
- ),
- # TDE TODO FIXME: when website_mail/mail_thread.py inheritance work -> this field won't be necessary
- 'website_message_ids': fields.one2many(
- 'mail.message', 'res_id',
- domain=lambda self: [
- '&', ('model', '=', self._name), ('type', '=', 'comment')
- ],
- string='Website Messages',
- help="Website communication history",
- ),
- # technical stuff: history, menu (to keep ?)
- 'history_ids': fields.one2many(
- 'blog.post.history', 'post_id',
- 'History', help='Last post modifications'
- ),
- 'menu_id': fields.many2one('ir.ui.menu', "Menu", readonly=True),
- # creation / update stuff
- 'create_date': fields.datetime(
- 'Created on',
- select=True, readonly=True,
- ),
- 'create_uid': fields.many2one(
- 'res.users', 'Author',
- select=True, readonly=True,
- ),
- 'write_date': fields.datetime(
- 'Last Modified on',
- select=True, readonly=True,
- ),
- 'write_uid': fields.many2one(
- 'res.users', 'Last Contributor',
- select=True, readonly=True,
- ),
- }
-
- def create_history(self, cr, uid, ids, vals, context=None):
- for i in ids:
- history = self.pool.get('blog.post.history')
- if vals.get('content'):
- res = {
- 'content': vals.get('content', ''),
- 'post_id': i,
- }
- history.create(cr, uid, res)
-
- def create(self, cr, uid, vals, context=None):
- if context is None:
- context = {}
- create_context = dict(context, mail_create_nolog=True)
- post_id = super(BlogPost, self).create(cr, uid, vals, context=create_context)
- self.create_history(cr, uid, [post_id], vals, context)
- return post_id
-
- def write(self, cr, uid, ids, vals, context=None):
- result = super(BlogPost, self).write(cr, uid, ids, vals, context)
- self.create_history(cr, uid, ids, vals, context)
- return result
-
- def img(self, cr, uid, ids, field='image_small', context=None):
- post = self.browse(cr, SUPERUSER_ID, ids[0], context=context)
- return "/website/image?model=%s&field=%s&id=%s" % ('res.users', field, post.create_uid.id)
-
-
-class BlogPostHistory(osv.Model):
- _name = "blog.post.history"
- _description = "Document Page History"
- _order = 'id DESC'
- _rec_name = "create_date"
-
- _columns = {
- 'post_id': fields.many2one('blog.post', 'Blog Post'),
- 'summary': fields.char('Summary', size=256, select=True),
- 'content': fields.text("Content"),
- 'create_date': fields.datetime("Date"),
- 'create_uid': fields.many2one('res.users', "Modified By"),
- }
-
- def getDiff(self, cr, uid, v1, v2, context=None):
- history_pool = self.pool.get('blog.post.history')
- text1 = history_pool.read(cr, uid, [v1], ['content'])[0]['content']
- text2 = history_pool.read(cr, uid, [v2], ['content'])[0]['content']
- line1 = line2 = ''
- if text1:
- line1 = text1.splitlines(1)
- if text2:
- line2 = text2.splitlines(1)
- if (not line1 and not line2) or (line1 == line2):
- raise osv.except_osv(_('Warning!'), _('There are no changes in revisions.'))
- diff = difflib.HtmlDiff()
- return diff.make_table(line1, line2, "Revision-%s" % (v1), "Revision-%s" % (v2), context=True)
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<openerp>
- <!-- <data noupdate="1"> -->
- <data>
-
- <record id="action_open_website" model="ir.actions.act_url">
- <field name="name">Website Blogs</field>
- <field name="target">self</field>
- <field name="url">/blog</field>
- </record>
- <record id="base.open_menu" model="ir.actions.todo">
- <field name="action_id" ref="action_open_website"/>
- <field name="state">open</field>
- </record>
-
- <!-- CATEGORIES -->
- <record id="blog_category_1" model="blog.category">
- <field name="name">News</field>
- <field name="description">Presentation of new OpenERP features</field>
- <field name="template">
-Summary of the feature
-
-Long explanation
-
-Conclusion
-
-Additional ressources
- </field>
- </record>
-
- <!-- Post-related subtypes for messaging / Chatter -->
- <record id="mt_blog_post_new" model="mail.message.subtype">
- <field name="name">New Post</field>
- <field name="res_model">blog.post</field>
- <field name="default" eval="True"/>
- <field name="description">New Post</field>
- </record>
- <record id="mt_blog_post_published" model="mail.message.subtype">
- <field name="name">Post Published</field>
- <field name="res_model">blog.post</field>
- <field name="default" eval="False"/>
- <field name="description">Post Published</field>
- </record>
- <!-- Project-related subtypes for messaging / Chatter -->
- <record id="mt_blog_category_post_new" model="mail.message.subtype">
- <field name="name">New Post</field>
- <field name="res_model">blog.category</field>
- <field name="default" eval="True"/>
- <field name="parent_id" eval="ref('mt_blog_post_new')"/>
- <field name="relation_field">category_id</field>
- </record>
-
-
- <!-- Mail group for the company's jobs -->
-
- <record id="blog_category_2" model="blog.category">
- <field name="name">Jobs</field>
- <field name="description">Job Announces</field>
- </record>
-
- <!-- Layout add nav and footer -->
-
- <template id="footer_custom" inherit_option_id="website.layout" name="Job Announces">
- <xpath expr="//footer//div[@name='info']/ul" position="inside">
- <li><a t-href="/blog/%(website_blog.blog_category_2)d/">Jobs</a></li>
- </xpath>
- </template>
-
-
- </data>
-</openerp>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<openerp>
- <!-- <data noupdate="1"> -->
- <data>
-
- <!-- TAGS -->
- <record id="blog_tag_1" model="blog.tag">
- <field name="name">functional</field>
- </record>
- <record id="blog_tag_2" model="blog.tag">
- <field name="name">pos</field>
- </record>
-
- <!-- POSTS -->
- <record id="blog_post_1" model="blog.post">
- <field name="name">OpenERP v8 New Features</field>
- <field name="category_id" ref="blog_category_1"/>
- <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
- <field name="content"><![CDATA[
- <section data-snippet-id='image-text'>
- <div class="container">
- <div class="row">
- <div class="col-md-6 mt16 mb16">
- <img class="img-responsive shadow" src="/website/static/src/img/image_text.jpg"/>
- </div>
- <div class="col-md-6 mt16">
- <p>
- OpenERP's Point of Sale introduces a super clean
- interface with no installation required that runs
- online and offline on modern hardwares.
- </p><p>
- It's full integration with the company inventory
- and accounting, gives you real time statistics
- without the hassle of integrating several applications.
- </p>
- </div>
- </div>
- </div>
- </section>
- <section class="mt16 mb16" data-snippet-id='text-block'>
- <div class="container">
- <div class="row">
- <div class="col-md-12 text-center mt16 mb32">
- <h2>
- Linked with Project Management
- </h2>
- <h3 class="text-muted">Infinitely flexible. Incredibly easy to use.</h3>
- </div>
- <div class="col-md-12 mb16 mt16">
- <p>
- OpenERP's <b>collaborative and realtime</b> project
- management helps your team get work done. Keep
- track of everything, from the big picture to the
- minute details, from the customer contract to the
- billing.
- </p><p>
- Organize projects around <b>your own processes</b>. Work
- on tasks and issues using the kanban view, schedule
- tasks using the gantt chart and control deadlines
- in the calendar view. Every project may have it's
- own stages allowing teams to optimize their job.
- </p>
- </div>
- </div>
- </div>
- </section>
- <section class="dark mt16 mb16" data-snippet-id='big-picture'>
- <div class="container">
- <div class="row">
- <div class="col-md-12 text-center mt32 mb32">
- <h2>Work with the hardware you already have...</h2>
- </div>
- <div class="col-md-12">
- <img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
- </div>
- <div class="col-md-6 col-md-offset-3 mb16 mt16">
- <p class="text-center">
- <b>No installation required</b>
- </p>
- <p class="text-center">
- OpenERP's Point of Sale introduces a super clean
- interface with no installation required that runs
- online and offline on modern hardware. Laptops,
- tablets, industrial POS, it runs on everything.
- </p>
- <p class="text-center">
- <a href="/page/website.contactus">Get more information »</a>
- </p>
- </div>
- </div>
- </div>
- </section>
-
-]]>
-</field>
- </record>
-
- <record id="blog_post_2" model="blog.post">
- <field name="name">New Hardware Integration</field>
- <field name="category_id" ref="blog_category_1"/>
- <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
- <field name="content">
-<![CDATA[<section class="mt16 mb16" data-snippet-id='big-picture'>
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
- </div>
- <div class="col-md-6 col-md-offset-3 mb16 mt16">
- <p class="text-center">
- <b>New Features Launched</b>
- </p>
- <p class="text-center">
- OpenERP's Point of Sale introduces a super clean
- interface with no installation required that runs
- online and offline on modern hardware. Laptops,
- tablets, industrial POS, it runs on everything.
- </p>
- </div>
- </div>
- </div>
- </section>
- <section data-snippet-id='pricing'>
- <div class="container">
- <div class="row">
- <div class="col-md-12 text-center mt16 mb32">
- <h2>Our Offers</h2>
- </div>
-
- <div class="col-md-4">
- <div class="panel panel-info">
- <!-- Default panel contents -->
- <div class="panel-heading text-center">
- <h2 style="margin: 0">Beginner</h2>
- <p style="margin: 0" class="text-muted">
- Starter package
- </p>
- </div>
- <div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1)">
- <h2 style="margin: 0"><span>$</span><b style="font-size: 60px">450</b><small>.00</small></h2>
- <div>per month</div>
- </div>
-
- <!-- List group -->
- <ul class="list-group">
- <li class="list-group-item">Battery: 8 hours</li>
- <li class="list-group-item">Screen: 2.5 inch</li>
- <li class="list-group-item">Weight: 1.1 ounces</li>
- <li class="list-group-item">No support</li>
- </ul>
- <div class="panel-footer text-center">
- <p class="text-muted">
- <i>Free shipping, satisfied or reimbursed.</i>
- </p>
- <a href="/page/website.contactus" class="btn btn-primary btn-lg">Order now</a>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="panel panel-primary">
- <!-- Default panel contents -->
- <div class="panel-heading text-center">
- <h2 style="margin: 0">Professional</h2>
- <p style="margin: 0">
- Enterprise package
- </p>
- </div>
- <div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1)">
- <h2 style="margin: 0"><span>$</span><b style="font-size: 60px">590</b><small>.00</small></h2>
- <div>per month</div>
- </div>
-
- <!-- List group -->
- <ul class="list-group">
- <li class="list-group-item">Battery: 12 hours</li>
- <li class="list-group-item">Screen: 2.8 inch</li>
- <li class="list-group-item">Weight: 1.2 ounces</li>
- <li class="list-group-item">Limited support</li>
- </ul>
- <div class="panel-footer text-center">
- <p class="text-muted">
- <i>Free shipping, satisfied or reimbursed.</i>
- </p>
- <a href="/page/website.contactus" class="btn btn-primary btn-lg">Order now</a>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="panel panel-info">
- <!-- Default panel contents -->
- <div class="panel-heading text-center">
- <h2 style="margin: 0">Expert</h2>
- <p style="margin: 0" class="text-muted">
- The top of the top
- </p>
- </div>
- <div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1)">
- <h2 style="margin: 0"><span>$</span><b style="font-size: 60px">890</b><small>.00</small></h2>
- <div>per month</div>
- </div>
-
- <!-- List group -->
- <ul class="list-group">
- <li class="list-group-item">Battery: 20 hours</li>
- <li class="list-group-item">Screen: 2.8 inch</li>
- <li class="list-group-item">Weight: 1.2 ounces</li>
- <li class="list-group-item">Unlimited support</li>
- </ul>
- <div class="panel-footer text-center">
- <p class="text-muted">
- <i>Free shipping, satisfied or reimbursed.</i>
- </p>
- <a href="/page/website.contactus" class="btn btn-primary btn-lg">Contact us</a>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- </section>
-
-
-]]>
-</field>
- </record>
-
- <record id="blog_post_3" model="blog.post">
- <field name="name">Touchscreen Point of Sale</field>
- <field name="category_id" ref="blog_category_1"/>
- <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1'), ref('blog_tag_2')])]"/>
- <field name="content">
-<![CDATA[<p>The brand new OpenERP touchscreen point of sale available with 6.1 allows you
-to manage your shop sales very easily. It's fully web based so that you don't
-have to install or deploy any software and all the sales shops can be easily
-consolidated. It works in connected and disconnected modes so that you can
-continue to sell if you lose your internet connection.</p>
-<img src="http://www.openerp.com/sites/default/files/fileattach/POS(2).png" alt="">
-<h3>Here's a summary of its main features and benefits:</h3>
-<ul>
- <li>100% WEB based</li>
- <li>available for any touchscreen device (ipod, ipad, any tablet)mobile (with portable devices)</li>
- <li>no installation required</li>
- <li>no synchronization needed, completely integrated</li>
- <li>continue working even when your connection is down if you close your browser, data won't be lost</li>
- <li>fully web based with a clean interface smart interface</li>
-</ul>
-<p>You have different options to select your products. You can do it through the
-barcode reader, just browse through the categories you have put in place (ie.
-drinks, snacks, meals, etc.), or text search in case neither of the other
-options work for you. If you need to use the POS for your restaurant, for
-example, your employees can record at the same time multiple tickets without
-having to wait to do one transaction at a time. Along, to facilitate payment,
-the application allows multiple payment methods.</p>
-<p>The POS application is so simple and accessible to use that your shop or
-restaurant will never need any other tool to manage orders. Due to its smart
-and user-friendly interface you don't need any training to learn how to use it.
-Think of it as an out-of-the-box solution to boost your business' productivity.
-</p>
-]]>
-</field>
- </record>
-
- <record id="blog_post_4" model="blog.post">
- <field name="name">Announcig a New Partnership</field>
- <field name="category_id" ref="blog_category_1"/>
- <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
- <field name="content"><![CDATA[
- <section data-snippet-id='image-text'>
- <div class="container">
- <div class="row">
- <div class="col-md-6 mt16 mb16">
- <img class="img-responsive shadow" src="/website/static/src/img/text_image.png"/>
- </div>
- <div class="col-md-6 mt16">
- <p>
- We are proud to announce a new partnership with
- the company OpenERP. Their open source application suite
- will allow us to reach new market, specifically in
- the accounting area.
- </p><p>
- The full integration with the company inventory
- and accounting, will give our customers real time statistics
- without the hassle of integrating several applications.
- </p>
- </div>
- </div>
- </div>
- </section>
- <section class="mt16 mb16" data-snippet-id='text-block'>
- <div class="container">
- <div class="row">
- <div class="col-md-12 text-center mt16 mb32">
- <h2>
- Linked with Project Management
- </h2>
- <h3 class="text-muted">Infinitely flexible. Incredibly easy to use.</h3>
- </div>
- <div class="col-md-12 mb16 mt16">
- <p>
- OpenERP's <b>collaborative and realtime</b> project
- management helps your team get work done. Keep
- track of everything, from the big picture to the
- minute details, from the customer contract to the
- billing.
- </p><p>
- Organize projects around <b>your own processes</b>. Work
- on tasks and issues using the kanban view, schedule
- tasks using the gantt chart and control deadlines
- in the calendar view. Every project may have it's
- own stages allowing teams to optimize their job.
- </p>
- </div>
- </div>
- </div>
- </section>
- <section class="dark mt16 mb16" data-snippet-id='big-picture'>
- <div class="container">
- <div class="row">
- <div class="col-md-12 text-center mt32 mb32">
- <h2>Work with the hardware you already have...</h2>
- </div>
- <div class="col-md-12">
- <img class="img-responsive" src="/website/static/src/img/big_picture.png" style="margin: 0 auto;"/>
- </div>
- <div class="col-md-6 col-md-offset-3 mb16 mt16">
- <p class="text-center">
- <b>No installation required</b>
- </p>
- <p class="text-center">
- OpenERP's Point of Sale introduces a super clean
- interface with no installation required that runs
- online and offline on modern hardware. Laptops,
- tablets, industrial POS, it runs on everything.
- </p>
- <p class="text-center">
- <a href="/page/website.contactus">Get more information »</a>
- </p>
- </div>
- </div>
- </div>
- </section>
-
-]]>
-</field>
- </record>
-
-
- </data>
-</openerp>