[FIX] website: typo, partner order, event demo data

bzr revid: chm@openerp.com-20131211112617-11kdph7cieews0y8
This commit is contained in:
Christophe Matthieu 2013-12-11 12:26:17 +01:00
parent 27ddae9d6d
commit 8f2f589561
17 changed files with 73 additions and 54 deletions

View File

@ -160,10 +160,10 @@
<center><strong>5-days Technical Training</strong></center>
<p>&nbsp;</p>
<p><strong>Course summary:</strong></p>
<p>This course is dedicated to partners, integrators and developers who need to grasp knowledge of the business applications development process. This course is for new developers or for IT professionals eager to learn more about technical aspects.</p>
<p>This course is dedicated to partners, integrators and developers who need to grasp knowledge about the business applications development process and for new developers or for IT professionals eager to learn more about technical aspects.</p>
<p>&nbsp;</p>
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul>
<li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@ -176,7 +176,7 @@
<li>training material.</li>
</ul>
<p>&nbsp;</p>
<p><strong>Requirements:</strong></p>
<p><strong>Requirements</strong></p>
<ul>
<li>Bring your own laptop.</li>
<li>Participants are expected to have some knowledge in programming.&nbsp;A basic knowledge of the Python programming is recommended.</li>

View File

@ -7,7 +7,7 @@
<field name="membership">True</field>
<field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
<field eval="time.strftime('%Y-12-01')" name="membership_date_to"/>
<field name="name">Golden Membership</field>
<field name="name">Gold Membership</field>
<field name="list_price">180</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="type">service</field>

View File

@ -304,8 +304,8 @@
<div class="row">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
@ -347,7 +347,7 @@
<span class="oe_snippet_thumbnail_title">Well</span>
</div>
<div class="oe_snippet_body well">
Explain the benefit you offer. Don't write about products or
Explain the benefits you offer. Don't write about products or
services here, write about solutions.
</div>
</div>
@ -360,8 +360,8 @@
</div>
<blockquote class="oe_snippet_body">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
@ -378,9 +378,8 @@
<h3 class="panel-title">Feature Title</h3>
</div>
<div class="panel-body">
Panels are great to compare offers or to emphasize on
key features. To compare products, use panels inside
columns.
Panels are a great tool to compare offers or to emphasize on
key features. To compare products, use the inside columns.
</div>
</div>
</div>
@ -654,8 +653,8 @@
<div class="col-md-4 col-md-offset-1 mt16 mb32">
<blockquote data-snippet-id="quote">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
@ -741,8 +740,8 @@
<div class="row">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>

View File

@ -189,7 +189,7 @@
<small> - <a href="/page/website.aboutus">About us</a></small>
</h4>
<p>
We are a team of passionated people whose goal is to improve everyone's
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
@ -608,7 +608,7 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
<div class="row">
<div class="col-md-6 mt32">
<p>
We are a team of passionated people whose goal is to improve everyone's
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>

View File

@ -234,17 +234,17 @@
</record>
<record id="blog_post_3" model="blog.post">
<field name="name">Touchscreen Point of Sale</field>
<field name="name">Touchscreen Point of Sale for 6.1</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="website_meta_keywords">Point of Sale, Hardware, Interface, Payment Terminal, Store</field>
<field name="website_meta_description">Point of Sale with no installation required that runs online and offline.</field>
<field name="content">
<![CDATA[<p>The brand new OpenERP touchscreen point of sale available with 6.1 allows you
<![CDATA[<p>The brand new OpenERP touchscreen point of sale is available with 6.1 which 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>
continue to sell even 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>
@ -272,7 +272,7 @@ Think of it as an out-of-the-box solution to boost your business' productivity.
</record>
<record id="blog_post_4" model="blog.post">
<field name="name">Announcig a New Partnership</field>
<field name="name">Announcing 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="website_published" eval="True"/>
@ -289,7 +289,7 @@ Think of it as an out-of-the-box solution to boost your business' productivity.
<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
will allow us to reach new markets, specifically in
the accounting area.
</p><p>
The full integration with the company inventory

View File

@ -329,7 +329,7 @@
<section class="mt32">
<h4>About us</h4>
<p>
Write here a small text for <b>new visitors</b> finding your website
Write a small text here for when <b>new visitors</b> find your website
through your <b>blog entries</b>, referenced in Google.
</p>
<div>

View File

@ -44,14 +44,14 @@ class WebsiteCrmPartnerAssign(http.Controller):
pager = request.website.pager(url="/partners/", total=len(partner_ids), page=page, step=self._references_per_page, scope=7, url_args=post)
# search for partners to display
partner_ids = partner_obj.search(
request.cr, openerp.SUPERUSER_ID, partner_domain,
context=request.context,
limit=self._references_per_page, offset=pager['offset'],
order="grade_id ASC,partner_weight DESC")
google_map_partner_ids = ",".join([str(p) for p in partner_ids])
partners_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, partner_ids, website_partner.white_list, context=request.context)
partners_data = partner_obj.search_read(request.cr, openerp.SUPERUSER_ID,
domain=partner_domain,
fields=request.website.get_partner_white_list_fields(),
offset=pager['offset'],
limit=self._references_per_page,
order="grade_id DESC,partner_weight DESC",
context=request.context)
google_map_partner_ids = ",".join([str(p['id']) for p in partners_data])
# group by country
countries = partner_obj.read_group(
@ -74,7 +74,7 @@ class WebsiteCrmPartnerAssign(http.Controller):
context=request.context, count=True)
grades.insert(0, {
'grade_id_count': grades_partners,
'grade_id': ("all", _("All Grades"))
'grade_id': ("all", _("All Levels"))
})
values = {

View File

@ -1 +1,2 @@
import res_partner
import website

View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from openerp.osv import orm
class Website(orm.Model):
_inherit = 'website'
def get_partner_white_list_fields(self, cr, uid, ids, context=None):
fields = super(Website, self).get_partner_white_list_fields(cr, uid, ids, context=context)
fields += ["grade_id"]
return fields

View File

@ -81,6 +81,7 @@
<span t-esc="partner_data['grade_id'][1]"/> Partners
<t t-if="current_country"> in <t t-esc="current_country.name"/></t>
</h3>
<t t-set="internal_gid" t-value="partner_data['grade_id'][1]"/>
</t>
<div class="media thumbnail">
<a class="pull-left" t-href="/partners/#{ slug([partner_data.get('id'), partner_data.get('name')]) }/">

View File

@ -62,7 +62,7 @@ class WebsiteCustomer(http.Controller):
cr, openerp.SUPERUSER_ID, domain,
limit=self._references_per_page, offset=pager['offset'], context=context)
partners_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, partner_ids, website_partner.white_list, context=request.context)
request.cr, openerp.SUPERUSER_ID, partner_ids, request.website.get_partner_white_list_fields(), context=request.context)
values = {
'countries': countries,
'current_country_id': country_id or 0,
@ -84,11 +84,11 @@ class WebsiteCustomer(http.Controller):
if values['partner_data']['assigned_partner_id']:
values['assigned_partner_data'] = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, [values['partner_data']['assigned_partner_id'][0]],
website_partner.white_list, context=request.context)[0]
request.website.get_partner_white_list_fields(), context=request.context)[0]
if values['partner_data']['implemented_partner_ids']:
implemented_partners_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, values['partner_data']['implemented_partner_ids'],
website_partner.white_list, context=request.context)
request.website.get_partner_white_list_fields(), context=request.context)
values['implemented_partners_data'] = []
for data in implemented_partners_data:
if data.get('website_published'):

View File

@ -18,8 +18,7 @@
<h4>to learn .JS development</h4>
</div>
<div class="carousel-image hidden-xs"><img alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png"></div>
<img class="carousel-image hidden-xs" alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png">
</div>
</div>
</div>
@ -116,7 +115,7 @@
<div class="col-md-12 mb16 mt16" data-snippet-id="colmd">
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul><li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@ -146,7 +145,7 @@
<div class="container oe_dark">
<div class="row">
<div class="col-md-12" data-snippet-id="colmd">
<h1 class="text-center">A great content...</h1>
<h1 class="text-center">Read Great Contents</h1>
<h3 class="text-muted text-center">What do people&nbsp;say about this course?</h3>
</div>
@ -181,8 +180,7 @@
<h4>to learn .JS development</h4>
</div>
<div class="carousel-image hidden-xs"><img alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png"></div>
<img class="carousel-image hidden-xs" alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png">
</div>
</div>
</div>
@ -279,7 +277,7 @@
<div class="col-md-12 mb16 mt16" data-snippet-id="colmd">
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul><li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@ -309,7 +307,7 @@
<div class="container oe_dark">
<div class="row">
<div class="col-md-12" data-snippet-id="colmd">
<h1 class="text-center">A great content...</h1>
<h1 class="text-center">Read Great Contents</h1>
<h3 class="text-muted text-center">What do people&nbsp;say about this course?</h3>
</div>
@ -357,7 +355,7 @@
<h4>to learn .JS development</h4>
</div>
<div class="carousel-image hidden-xs"><img alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png"></div>
<img class="carousel-image hidden-xs" alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png">
</div>
</div>
</div>
@ -454,7 +452,7 @@
<div class="col-md-12 mb16 mt16" data-snippet-id="colmd">
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul><li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@ -484,7 +482,7 @@
<div class="container oe_dark">
<div class="row">
<div class="col-md-12" data-snippet-id="colmd">
<h1 class="text-center">A great content...</h1>
<h1 class="text-center">Read Great Contents</h1>
<h3 class="text-muted text-center">What do people&nbsp;say about this course?</h3>
</div>

View File

@ -49,7 +49,7 @@
</section>
<div class="row">
<div t-attf-class="col-md-#{(len(event.sponsor_ids) > 6) and 2 or (12/ len(event.sponsor_ids))} text-center" t-foreach="event.sponsor_ids" t-as="sponsor">
<a href="sponsor.partner_id.website or '#'" style="position: relative; display: inline-block;">
<a t-href="#{sponsor.partner_id and ('partners/%s/' % sponsor.partner_id.id) or '#'}" style="position: relative; display: inline-block;">
<span t-field="sponsor.partner_id.image"
t-field-options='{"widget": "image", "class": "shadow"}'/>
<div class="ribbon-wrapper">

View File

@ -59,7 +59,7 @@ class WebsiteMembership(http.Controller):
google_map_partner_ids = ",".join(map(str, partner_ids))
partners_data = {}
for partner in partner_obj.read(cr, openerp.SUPERUSER_ID, partner_ids, website_partner.white_list, context=context):
for partner in partner_obj.read(cr, openerp.SUPERUSER_ID, partner_ids, request.website.get_partner_white_list_fields(), context=context):
partners_data[partner.get("id")] = partner
# format domain for group_by and memberships

View File

@ -6,10 +6,8 @@ from openerp.addons.web.http import request
from openerp.addons.website.models import website
import werkzeug
white_list = ["grade_id", "name", "parent_id", 'website_short_description', "website_published",
"website_description", "tel", "fax", "image", "image_small", "image_medium"]
def get_partner_template_value(partner, add_white_list=None):
def get_partner_template_value(partner):
ctx = dict(request.context, show_address=True)
partner_obj = request.registry['res.partner']
partner_id = partner.id
@ -18,7 +16,7 @@ def get_partner_template_value(partner, add_white_list=None):
partner = None
partner_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, [partner_id], white_list + (add_white_list or []), context=ctx)[0]
request.cr, openerp.SUPERUSER_ID, [partner_id], request.website.get_partner_white_list_fields(), context=ctx)[0]
if not partner_data["website_published"]:
return None

View File

@ -1,2 +1,3 @@
import res_partner
import res_company
import res_company
import website

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from openerp.osv import orm
class Website(orm.Model):
_inherit = 'website'
def get_partner_white_list_fields(self, cr, uid, ids, context=None):
return ["name", "parent_id", 'website_short_description', "website_published",
"website_description", "tel", "fax", "image", "image_small", "image_medium"]