[MERGE] Merge parents

bzr revid: rim@openerp.com-20140114074420-swwlexlcq3wfaf5n
bzr revid: rim@openerp.com-20140115075208-aw04xhkjvxzr184z
This commit is contained in:
Richard Mathot (OpenERP)
2014-01-15 08:52:08 +01:00
24 changed files with 331 additions and 288 deletions
@@ -1,3 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_decimal_precision_config,decimal.precision configuration,model_decimal_precision,base.group_system,1,1,1,1
access_decimal_precision_all,decimal.precision,model_decimal_precision,,1,0,0,0
access_decimal_precision_test_all,decimal.precision.test,model_decimal_precision_test,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_decimal_precision_config decimal.precision configuration model_decimal_precision base.group_system 1 1 1 1
3 access_decimal_precision_all decimal.precision model_decimal_precision 1 0 0 0
4 access_decimal_precision_test_all decimal.precision.test model_decimal_precision_test 1 1 1 1
-6
View File
@@ -74,8 +74,6 @@
<field name="deadline" eval="(DateTime.today() + timedelta(60)).strftime('%Y-%m-%d')"/>
<field name="price">1500.0</field>
<field name="register_max">10</field>
<field name="description_sale">Cathering for breakfast and lunch
VIP Parking access</field>
</record>
@@ -105,8 +103,6 @@ VIP Parking access</field>
<field name="deadline" eval="(DateTime.today() + timedelta(60)).strftime('%Y-%m-%d')"/>
<field name="price">1500.0</field>
<field name="register_max">5</field>
<field name="description_sale">Cathering for breakfast and lunch
VIP Parking access</field>
</record>
<record id="event_3_ticket_1" model="event.event.ticket">
@@ -125,8 +121,6 @@ VIP Parking access</field>
<field name="deadline" eval="(DateTime.today() + timedelta(60)).strftime('%Y-%m-%d')"/>
<field name="price">1500.0</field>
<field name="register_max">5</field>
<field name="description_sale">Cathering for breakfast and lunch
VIP Parking access</field>
</record>
</data>
@@ -8,7 +8,6 @@
<field name="env">test</field>
<field name="message"><![CDATA[
<p>You will be redirected to the Paypal website after cliking on the payment button.</p>]]></field>
<field name="paypal_tx_url">https://www.sandbox.paypal.com/cgi-bin/webscr</field>
<field name="paypal_email_id">dummy</field>
<field name="paypal_seller_id">dummy</field>
<field name="paypal_api_username">dummy</field>
+4 -4
View File
@@ -400,7 +400,7 @@
<field name="name">product.public.category.form</field>
<field name="model">product.public.category</field>
<field name="arch" type="xml">
<form string="Product Categories" version="7.0">
<form string="Pos/Public Categories" version="7.0">
<sheet>
<field name="image_medium" widget='image' class="oe_avatar oe_right"/>
<div class="oe_left">
@@ -426,7 +426,7 @@
</field>
</record>
<record id="product_public_category_action" model="ir.actions.act_window">
<field name="name">Public Categories</field>
<field name="name">Pos/Public Product Categories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.public.category</field>
<field name="view_type">form</field>
@@ -445,7 +445,7 @@
</p>
</field>
</record>
<menuitem action="product_public_category_action" id="menu_product_public_category" parent="base.menu_product" sequence="10" />
<menuitem action="product_public_category_action" id="menu_product_public_category" parent="prod_config_main" sequence="10" />
<!-- END -->
<!-- Unit of Measure -->
@@ -802,7 +802,7 @@
<field name="mes_type"/>
</group>
<group colspan="4" string="Product Variants">
<group colspan="4" string="Product Variants" groups="product.group_product_variant">
<field colspan="4" name="product_variant_ids" nolabel="1">
<tree string="Product Variants" editable="bottom">
<field name="active"/>
+1 -1
View File
@@ -624,7 +624,7 @@ class res_company(osv.osv):
partner = self.browse(cr, openerp.SUPERUSER_ID, ids[0], context=context).partner_id
return partner and partner.google_map_link(zoom, context=context) or None
class base_language_install(osv.osv):
class base_language_install(osv.osv_memory):
_inherit = "base.language.install"
_columns = {
'website_ids': fields.many2many('website', string='Websites to translate'),
+14 -1
View File
@@ -81,6 +81,10 @@
outline: none !important;
}
.css_editable_display {
display: block !important;
}
.css_non_editable_mode_hidden {
display: none;
}
@@ -103,6 +107,14 @@
top: 2px;
}
.oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child {
background-image: url("/website/static/src/img/edit_here.png") !important;
}
.oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before {
content: "Press The Top-Left Edit Button" !important;
}
/* ---- EDITOR BAR ---- {{{ */
table.editorbar-panel {
cursor: pointer;
@@ -433,8 +445,9 @@ ul.oe_menu_editor .disclose {
/* ---- SNIPPET MANIPULATOR ---- {{{ */
.resize_editor_busy {
background-color: rgba(0,0,0,0.1);
background-color: rgba(0, 0, 0, 0.3);
}
.oe_overlay {
display: none;
position: absolute;
@@ -67,6 +67,9 @@
.oe_editable:focus
outline: none !important
.css_editable_display
display: block !important
.css_non_editable_mode_hidden
display: none
@@ -85,6 +88,12 @@
position: relative !important
top: +2px
.oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child
background-image: url('/website/static/src/img/edit_here.png') !important
.oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before
content: 'Press The Top-Left Edit Button' !important
// }}}
/* ---- EDITOR BAR ---- {{{ */
+63 -140
View File
@@ -78,95 +78,6 @@
margin-bottom: 0px !important;
}
.pt128 {
padding-top: 128px !important;
}
.pt92 {
padding-top: 92px !important;
}
.pt64 {
padding-top: 64px !important;
}
.pt48 {
padding-top: 48px !important;
}
.pt32 {
padding-top: 32px !important;
}
.pt16 {
padding-top: 16px !important;
}
.pt8 {
padding-top: 8px !important;
}
.pt4 {
padding-top: 4px !important;
}
.pt0 {
padding-top: 0px !important;
}
.pb128 {
padding-bottom: 128px !important;
}
.pb92 {
padding-bottom: 92px !important;
}
.pb64 {
padding-bottom: 64px !important;
}
.pb48 {
padding-bottom: 48px !important;
}
.pb32 {
padding-bottom: 32px !important;
}
.pb16 {
padding-bottom: 16px !important;
}
.pb8 {
padding-bottom: 8px !important;
}
.pb4 {
padding-bottom: 4px !important;
}
.pb0 {
padding-bottom: 0px !important;
}
/* Grid of unequally tall elements */
.grid > [class*="col-md"] {
display: inline-block;
float: none;
vertical-align: top;
box-sizing: border-box;
}
.grid > [class*="col-md"].grid-align-top > [class*="col-md"] {
vertical-align: top;
}
.grid > [class*="col-md"].grid-align-middle > [class*="col-md"] {
vertical-align: middle;
}
.grid > [class*="col-md"].grid-align-bottom > [class*="col-md"] {
vertical-align: bottom;
}
/* Extra Styles */
img.shadow {
-webkit-border-radius: 3px;
@@ -185,9 +96,14 @@ h1.text-muted, h2.text-muted, h3.text-muted {
}
/* ----- BOOTSTRAP HACK FOR HEADER NAV BAR ----- */
.navbar.navbar-default.navbar-static-top {
.navbar.navbar-static-top {
margin-bottom: 0;
}
.navbar.navbar-static-top ul.nav > li.divider {
margin-top: 15px;
padding-top: 20px;
border-right: 1px solid grey;
}
/* ----- BOOTSTRAP HACK FOR STICKY FOOTER ----- */
html, body, #wrapwrap {
@@ -209,7 +125,7 @@ header, main, footer {
footer {
height: 100%;
background: #eff8f8;
background: rgba(100, 200, 200, 0.1);
background: rgba(200, 200, 200, 0.1);
}
#footer_container {
@@ -233,7 +149,7 @@ footer {
}
.oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child {
background-image: url("/website/static/src/img/edit_here.png");
background-image: url("/website/static/src/img/under_construction.png");
background-repeat: no-repeat;
background-position: center;
height: 220px !important;
@@ -244,7 +160,7 @@ footer {
}
.oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before {
content: "Press The Top-Left Edit Button";
content: "This page is under construction";
text-align: center;
display: block;
padding-top: 160px;
@@ -257,6 +173,10 @@ footer {
content: "Drag Building Blocks Here";
}
.css_editable_display {
display: none;
}
/* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */
.navbar .nav > li > p {
margin-bottom: 0px;
@@ -334,10 +254,15 @@ ul.nav-stacked > li > a {
}
/* ---- SNIPPETS --- */
[data-snippet-id],.colmd,.hr,.blockquote {
overflow: hidden;
[data-snippet-id], .colmd, .hr, .blockquote {
overflow: hidden;
}
@media (max-width: 400px) {
[data-snippet-id] {
height: auto !important;
}
}
.carousel-inner {
height: 100%;
}
@@ -345,6 +270,7 @@ ul.nav-stacked > li > a {
height: 100%;
background-size: 100%;
}
.carousel .carousel-caption {
left: auto;
right: auto;
@@ -431,7 +357,7 @@ div.carousel[data-snippet-id="slider"] .carousel-indicators .active {
/* Background */
.oe_dark {
background: #eff8f8;
background: rgba(100, 200, 200, 0.14);
background: rgba(200, 200, 200, 0.14);
-webkit-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset;
-moz-box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset;
box-shadow: 0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset;
@@ -439,16 +365,55 @@ div.carousel[data-snippet-id="slider"] .carousel-indicators .active {
.oe_black {
background-color: rgba(0, 0, 0, 0.9);
color: white;
}
.oe_green {
background-color: rgba(0, 128, 0, 0.8);
background-color: #51d466;
color: white;
}
.oe_green .text-muted {
color: #dddddd;
}
.oe_blue_light {
background-color: #4791d2;
color: white;
}
.oe_blue_light .text-muted {
color: #dddddd;
}
.oe_blue {
background-color: #34495e;
color: white;
}
.oe_orange {
background-color: #e67e22;
color: white;
}
.oe_orange .text-muted {
color: #dddddd;
}
.oe_purple {
background-color: #b163a3;
color: white;
}
.oe_purple .text-muted {
color: #dddddd;
}
.oe_red {
background-color: rgba(255, 0, 0, 0.8);
background-color: #f75353;
color: white;
}
.oe_red .text-muted {
color: #dddddd;
}
/* Misc */
.oe_img_bg {
background-size: 100%;
}
@@ -508,45 +473,3 @@ span[data-oe-type="monetary"] {
-o-column-count: 3;
column-count: 3;
}
.bs-callout {
margin: 20px 0;
padding: 20px;
border-left: 3px solid #eeeeee;
}
.bs-callout h4 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout-danger {
background-color: #fdf7f7;
border-color: #eed3d7;
}
.bs-callout-danger h4 {
color: #b94a48;
}
.bs-callout-warning {
background-color: #faf8f0;
border-color: #faebcc;
}
.bs-callout-warning h4 {
color: #8a6d3b;
}
.bs-callout-info {
background-color: #f4f8fa;
border-color: #bce8f1;
}
.bs-callout-info h4 {
color: #34789a;
}
+55 -86
View File
@@ -51,57 +51,6 @@
.mb0
margin-bottom: 0px !important
.pt128
padding-top: 128px !important
.pt92
padding-top: 92px !important
.pt64
padding-top: 64px !important
.pt48
padding-top: 48px !important
.pt32
padding-top: 32px !important
.pt16
padding-top: 16px !important
.pt8
padding-top: 8px !important
.pt4
padding-top: 4px !important
.pt0
padding-top: 0px !important
.pb128
padding-bottom: 128px !important
.pb92
padding-bottom: 92px !important
.pb64
padding-bottom: 64px !important
.pb48
padding-bottom: 48px !important
.pb32
padding-bottom: 32px !important
.pb16
padding-bottom: 16px !important
.pb8
padding-bottom: 8px !important
.pb4
padding-bottom: 4px !important
.pb0
padding-bottom: 0px !important
/* Grid of unequally tall elements */
.grid > [class*="col-md"]
display: inline-block
float: none
vertical-align: top
box-sizing: border-box
&.grid-align-top > [class*="col-md"]
vertical-align: top
&.grid-align-middle > [class*="col-md"]
vertical-align: middle
&.grid-align-bottom > [class*="col-md"]
vertical-align: bottom
/* Extra Styles */
img.shadow
@@ -114,8 +63,13 @@ h1.text-muted, h2.text-muted, h3.text-muted
/* ----- BOOTSTRAP HACK FOR HEADER NAV BAR ----- */
.navbar.navbar-default.navbar-static-top
.navbar.navbar-static-top
margin-bottom: 0
ul.nav
> li.divider
margin-top: 15px
padding-top: 20px
border-right: 1px solid grey
/* ----- BOOTSTRAP HACK FOR STICKY FOOTER ----- */
@@ -133,7 +87,7 @@ header, main, footer
footer
height: 100%
background: rgb(239, 248, 248)
background: rgba(100, 200, 200, 0.1)
background: rgba(200, 200, 200, 0.1)
#footer_container
padding-top: 24px
@@ -154,7 +108,7 @@ footer
background-image: url('/website/static/src/img/drag_here.png')
.oe_structure.oe_empty:empty, [data-oe-type=html]:empty, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child
background-image: url('/website/static/src/img/edit_here.png')
background-image: url('/website/static/src/img/under_construction.png')
background-repeat: no-repeat
background-position: center
height: 220px !important
@@ -163,7 +117,7 @@ footer
position: static
.oe_structure.oe_empty:empty:before, [data-oe-type=html]:empty:before, .oe_structure.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before
content: 'Press The Top-Left Edit Button'
content: 'This page is under construction'
text-align: center
display: block
padding-top: 160px
@@ -174,6 +128,9 @@ footer
.oe_structure.oe_editable.oe_empty:empty:before, .oe_editable[data-oe-type=html]:empty:before, .oe_structure.oe_editable.oe_empty > .oe_drop_zone.oe_insert:only-child:before, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child:before
content: 'Drag Building Blocks Here'
.css_editable_display
display: none
/* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */
.navbar .nav > li > p
@@ -245,6 +202,10 @@ ul.nav-stacked > li > a
[data-snippet-id],.colmd,.hr,.blockquote
overflow: hidden
@media (max-width: 400px)
[data-snippet-id]
height: auto !important
.carousel-inner
height: 100%
.item
@@ -323,17 +284,52 @@ div.carousel[data-snippet-id="slider"]
padding: 32px 0
/* Background */
.oe_dark
background: #eff8f8
background: rgba(100, 200, 200, 0.14)
background: rgba(200, 200, 200, 0.14)
+box-shadow(0px 5px 9px -7px rgba(0, 0, 255, 0.5) inset, 0px -3px 9px -7px rgba(0, 0, 255, 0.5) inset)
.oe_black
background-color: rgba(0, 0, 0, 0.9)
color: white
.oe_green
background-color: rgba(0, 128, 0, 0.8)
background-color: #51d466
color: white
.text-muted
color: #ddd
.oe_blue_light
background-color: #4791d2
color: white
.text-muted
color: #ddd
.oe_blue
background-color: #34495e
color: white
.oe_orange
background-color: #e67e22
color: white
.text-muted
color: #ddd
.oe_purple
background-color: #b163a3
color: white
.text-muted
color: #ddd
.oe_red
background-color: rgba(255, 0, 0, 0.8)
background-color: #f75353
color: white
.text-muted
color: #ddd
/* Misc */
.oe_img_bg
background-size: 100%
@@ -379,30 +375,3 @@ span[data-oe-type="monetary"]
.oe_template_fallback
@include column-count(3)
// ---- Callouts from bootstrap doc ---- {{{
.bs-callout
margin: 20px 0
padding: 20px
border-left: 3px solid #eee
.bs-callout h4
margin-top: 0
margin-bottom: 5px
.bs-callout p:last-child
margin-bottom: 0
.bs-callout-danger
background-color: #fdf7f7
border-color: #eed3d7
.bs-callout-danger h4
color: #b94a48
.bs-callout-warning
background-color: #faf8f0
border-color: #faebcc
.bs-callout-warning h4
color: #8a6d3b
.bs-callout-info
background-color: #f4f8fa
border-color: #bce8f1
.bs-callout-info h4
color: #34789a
// }}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@@ -94,6 +94,11 @@
}).then(function (views) {
self.loadViews.call(self, views);
self.open.call(self);
// cf. fp's direct request
if (views.length >= 2) {
var mainTemplate = views[1];
self.$('#ace-view-list').val(mainTemplate.id).trigger('change');
}
});
var $editor = self.$('.ace_editor');
+116
View File
@@ -676,6 +676,118 @@
</section>
</div>
<div data-snippet-id="features" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_features.png"/>
<span class="oe_snippet_thumbnail_title">Features</span>
</div>
<section class="oe_snippet_body mb16">
<div class="container">
<div class="row">
<div class="col-md-12 text-center mb16">
<h2>List of Features</h2>
<h4 class="text-muted">Add a great slogan</h4>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-suitcase fa-5x"></span>
<h3 class="mt8 mb0">First Feature</h3>
<p class="text-muted">Tell what's the value for the customer for this feature.</p>
<p><a class="btn btn-primary">Learn More</a></p>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-lock fa-5x"></span>
<h3 class="mt8 mb0">Second Feature</h3>
<p class="text-muted">Talk about what the customer would like to know, not what you want to show.</p>
<p><a class="btn btn-success">Take Tour</a></p>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-heart fa-5x"></span>
<h3 class="mt8 mb0">Third Feature</h3>
<p class="text-muted">A small explanation of this great feature, in clear words.</p>
<p><a class="btn btn-info">Buy Now</a></p>
</div>
<div class="col-md-3 text-center">
<span class="fa fa-credit-card fa-5x"></span>
<h3 class="mt8 mb0">Fourth Feature</h3>
<p class="text-muted">A small explanation of this great feature on two lines.</p>
<p><a class="btn btn-danger">Buy Now</a></p>
</div>
</div>
</div>
</section>
</div>
<div data-snippet-id="features-list" data-selector-children=".oe_structure, [data-oe-type=html]">
<div class="oe_snippet_thumbnail">
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_features.png"/>
<span class="oe_snippet_thumbnail_title">Feature Grid</span>
</div>
<section class="oe_snippet_body mb16">
<div class="container">
<div class="row">
<div class="col-md-5 text-center mb16">
<h2>List of Features</h2>
<h4 class="text-muted">Add a great slogan</h4>
</div>
<div class="col-md-5 text-center mb16 col-md-offset-2">
<h2>Second List</h2>
<h4 class="text-muted">Add a great slogan</h4>
</div>
</div><div class="row">
<div class="col-md-5">
<ul class="list-unstyled">
<li>
<span style="min-width: 45px" class="fa fa-3x fa-comment pull-left mb16"></span>
<h3 class="mb0">Blog</h3>
<p>OpenERP includes a full features enterprise blog to promote your messages.</p>
</li>
<li>
<span style="min-width: 45px" class="fa fa-3x fa-columns pull-left mb16"></span>
<h3 class="mb0">Pricing Tables</h3>
<p>Use building blocks to use pricing tables to display your products or services.</p>
</li>
<li>
<span style="min-width: 45px" class="fa fa-3x fa-user pull-left mb16"></span>
<h3 class="mb0">Log In &amp; Signup</h3>
<p>Clean &amp; simple Log In, Signup &amp; Forgot Your Password forms.</p>
</li>
<li>
<span style="min-width: 45px" class="fa fa-3x fa-envelope pull-left mb16"></span>
<h3 class="mb0">Contact</h3>
<p>User-friendly contact form with Google Map integration.</p>
</li>
</ul>
</div>
<div class="col-md-5 col-md-offset-2">
<ul class="list-unstyled">
<li>
<span style="min-width: 45px" class="fa fa-3x fa-magic pull-left mb16"></span>
<h3 class="mb0">Bootstrap</h3>
<p>Uses Twitter Bootstrap's sleek, intuitive, and powerful front-end framework.</p>
</li>
<li>
<span style="min-width: 45px" class="fa fa-3x fa-font pull-left mb16"></span>
<h3 class="mb0">Google Web Fonts</h3>
<p>Royalty free, open source fonts for the people, by the people!</p>
</li>
<li>
<span style="min-width: 45px" class="fa fa-3x fa-bolt pull-left mb16"></span>
<h3 class="mb0">Powerful &amp; slick jQuery</h3>
<p>Fantastic jQuery plugins such as Isotope and Bootstrap's inbuilt features.</p>
</li>
<li>
<span style="min-width: 45px" class="fa fa-3x fa-picture-o pull-left mb16"></span>
<h3 class="mb0">Sample images</h3>
<p>Fantastic sample images fully licensed for use.</p>
</li>
</ul>
</div>
</div>
</div>
</section>
</div>
</div>
<div id="snippet_effect" class="tab-pane fade">
@@ -796,6 +908,10 @@
<li data-class='oe_dark'><a>Darken</a></li>
<li data-class='oe_green'><a>Green</a></li>
<li data-class='oe_red'><a>Red</a></li>
<li data-class='oe_blue_light'><a>Light Blue</a></li>
<li data-class='oe_blue'><a>Dark Blue</a></li>
<li data-class='oe_orange'><a>Orange</a></li>
<li data-class='oe_purple'><a>Purple</a></li>
<li data-class='oe_black'><a>Black</a></li>
</ul>
</li>
+5 -4
View File
@@ -97,12 +97,13 @@
<t t-foreach="website.menu_id.child_id" t-as="submenu">
<t t-call="website.submenu"/>
</t>
<li class="divider"/>
<li class="dropdown" t-ignore="true" t-if="user_id.id != website.public_user.id">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="badge">
<b>
<span t-esc="user_id.name"/>
<span class="caret"></span>
</span>
</b>
</a>
<ul class="dropdown-menu js_usermenu" role="menu">
<li><a href="/web" role="menuitem">Administration</a></li>
@@ -236,7 +237,7 @@
<xpath expr="//ul[@id='top_menu']" position="inside">
<li t-if="user_id.id == website.public_user.id">
<a t-attf-href="/web#redirect=#{ quote_plus(url_for('', keep_query='*')) }">
<span class="badge">Sign in</span>
<b>Sign in</b>
</a>
</li>
</xpath>
@@ -534,7 +535,7 @@
</div>
<div class="container" t-if="views">
<div class="bs-callout bs-callout-danger" t-if="qweb_template and editable">
<div class="alert alert-danger" t-if="qweb_template and editable">
<h4>Template fallback</h4>
<p>An error occured while rendering the template <code t-esc="qweb_template"/>.</p>
<p>If this error is caused by a change of yours in the templates, you have the possibility to reset one or more templates to their <strong>factory settings</strong>.</p>
+16 -8
View File
@@ -23,6 +23,7 @@ from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models import website
from openerp.tools.translate import _
from openerp import SUPERUSER_ID
import werkzeug
@@ -218,16 +219,23 @@ class WebsiteBlog(http.Controller):
}
return request.website.render("website_blog.blog_post_complete", values)
@website.route(['/blogpost/<int:blog_post_id>/comment'], type='http', auth="public")
def blog_post_comment(self, blog_post_id, **post):
@website.route(['/blogpost/comment'], type='http', auth="public", methods=['POST'])
def blog_post_comment(self, blog_post_id=0, **post):
cr, uid, context = request.cr, request.uid, request.context
if post.get('comment'):
request.registry['blog.post'].message_post(
cr, uid, blog_post_id,
body=post.get('comment'),
type='comment',
subtype='mt_comment',
context=dict(context, mail_create_nosubcribe=True))
user = request.registry['res.users'].browse(cr, SUPERUSER_ID, uid, context=context)
group_ids = user.groups_id
group_id = request.registry["ir.model.data"].get_object_reference(cr, uid, 'website_mail', 'group_comment')[1]
if group_id in [group.id for group in group_ids]:
blog_post = request.registry['blog.post']
blog_post.check_access_rights(cr, uid, 'read')
blog_post.message_post(
cr, SUPERUSER_ID, int(blog_post_id),
body=post.get('comment'),
type='comment',
subtype='mt_comment',
author_id=user.partner_id.id,
context=dict(context, mail_create_nosubcribe=True))
return werkzeug.utils.redirect(request.httprequest.referrer + "#comments")
@website.route('/blogpost/new', type='http', auth="public", multilang=True)
@@ -133,7 +133,7 @@
<!-- Options: Blog Post Summary: hide author -->
<template id="opt_blog_post_short_author" name="Author"
inherit_option_id="website_blog.blog_post_short">
<xpath expr="//span[@class*='oe_date']" position="after">
<xpath expr="//span[@class='fa fa-calendar oe_date']" position="after">
<span class="fa fa-user"> By <span t-field="blog_post.create_uid"/> &amp;nbsp;</span>
</xpath>
</template>
@@ -182,7 +182,7 @@
<h1 class="text-center" t-field="blog_post.name"/>
<p class="post-meta text-muted text-center" name="blog_post_data">
<span class="fa fa-calendar"> <span t-field="blog_post.create_date"/> &amp;nbsp;</span>
<span class="fa fa-calendar oe_date"> <span t-field="blog_post.create_date"/> &amp;nbsp;</span>
<span t-if="len(blog_post.message_ids) &gt; 0" class="fa fa-comment-o"> With
<a t-attf-href="#comments">
<t t-if="len(blog_post.message_ids) &lt;= 1" ><t t-esc="len(blog_post.message_ids)"/> comment</t>
@@ -218,10 +218,10 @@
<template id="opt_blog_post_complete_comment" name="Allow Comments"
inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete"
groups="website_mail.group_comment">
<xpath expr="//ul[@id='comments-list']" position="after">
<xpath expr="//ul[@id='comments-list']" position="before">
<section class="mb32 css_editable_mode_hidden">
<form id="comment" t-attf-action="/blogpost/#{blog_post.id}/comment"
method="POST">
<form id="comment" t-attf-action="/blogpost/comment" method="POST">
<input name="blog_post_id" t-att-value="blog_post.id" type="hidden"/>
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
<div class="pull-left mb32" style="width: 75%%">
<textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
@@ -236,7 +236,7 @@
<!-- Options: Blog Post: hide author -->
<template id="opt_blog_post_complete_author" name="Authors"
inherit_option_id="website_blog.blog_post_complete">
<xpath expr="//span[@class*='oe_date']" position="after">
<xpath expr="//span[@class='fa fa-calendar oe_date']" position="after">
<span class="fa fa-user"> By <span t-field="blog_post.create_uid"/> &amp;nbsp;</span>
</xpath>
</template>
@@ -244,7 +244,7 @@
<!-- Options: Blog Post: show category -->
<template id="opt_blog_post_complete_category" name="Blog Category"
inherit_option_id="website_blog.blog_post_complete">
<xpath expr="//span[@class*='oe_date']" position="after">
<xpath expr="//span[@class='fa fa-calendar oe_date']" position="after">
<span class="fa fa-folder-open"> In <span t-field="blog_post.category_id"/> &amp;nbsp;</span>
</xpath>
</template>
+3 -2
View File
@@ -35,7 +35,7 @@ class WebsiteMail(http.Controller):
if email and email != u'false': # post contains stringified booleans
partner_ids = partner_obj.search(request.cr, SUPERUSER_ID, [("email", "=", email)], context=request.context)
if not partner_ids:
partner_ids = [partner_obj.name_create(request.cr, SUPERUSER_ID, email, request.context)]
partner_ids = [partner_obj.name_create(request.cr, SUPERUSER_ID, email, request.context)[0]]
else:
partner_ids = [user_obj.browse(request.cr, request.uid, request.uid, request.context).partner_id.id]
return partner_ids
@@ -54,5 +54,6 @@ class WebsiteMail(http.Controller):
_object.check_access_rule(request.cr, request.uid, [_id], 'read', request.context)
_object.message_subscribe(request.cr, SUPERUSER_ID, [_id], partner_ids, context=request.context)
obj = _object.browse(request.cr, request.uid, _id)
follower_ids = [p.id for p in obj.message_follower_ids]
return obj.message_is_follower and 1 or 0
return partner_ids[0] in follower_ids and 1 or 0
@@ -0,0 +1,4 @@
.js_follow[data-follow='on'] .js_follow_btn ,
.js_follow[data-follow='off'] .js_unfollow_btn {
display: none;
}
@@ -1,12 +1,12 @@
$(document).ready(function () {
$(document).on('click', '.js_follow_btn', function (ev) {
$(document).on('click', '.js_follow_btn, .js_unfollow_btn', function (ev) {
ev.preventDefault();
var self = this;
var self = this;
var $data = $(this).parents("div.js_follow");
var $email = $(".js_follow_email", $data);
var message_is_follower = $data.attr("data-follow");
var $email = $data.find(".js_follow_email");
var message_is_follower = $data.attr("data-follow") || "off";
$data.attr("data-follow", message_is_follower == 'off' ? 'on' : 'off');
openerp.jsonRpc('/website_mail/follow', 'call', {
@@ -15,12 +15,10 @@ $(document).ready(function () {
'message_is_follower': message_is_follower,
'email': $email && $email.val() || false,
}).then(function (result) {
if (result) {
$data.html('<div class="alert alert-success mb0">Thanks for your subscription!</div>')
} else {
$data.attr("data-follow", + result ? 'on' : 'off');
$(self).text('Subscribe')
}
if (result) {
$data.find(" > *").toggleClass("hidden");
}
$data.attr("data-follow", result ? 'on' : 'off');
});
});
+4 -5
View File
@@ -12,18 +12,17 @@
t-att-value="email or ''"
placeholder="your email..."/>
<span class="input-group-btn">
<button href="#"
t-attf-class="btn btn-#{object.message_is_follower and 'default' or 'primary'} js_follow_btn">
<t t-if="object.message_is_follower">Unsubscribe</t>
<t t-if="not object.message_is_follower">Subscribe</t>
</button>
<button href="#" t-attf-class="btn btn-default js_unfollow_btn">Unsubscribe</button>
<button href="#" t-attf-class="btn btn-primary js_follow_btn">Subscribe</button>
</span>
<div class="alert alert-success hidden">Thanks for your subscription!</div>
</div>
</template>
<template id="head" inherit_id="website.layout" name="Mail customization">
<xpath expr="//head" position="inside">
<script type="text/javascript" src="/website_mail/static/src/js/website_mail.js"></script>
<link rel='stylesheet' href='/website_mail/static/src/css/website_mail.css'/>
</xpath>
</template>
+8 -8
View File
@@ -199,10 +199,10 @@ class Ecommerce(http.Controller):
@website.route([
'/shop/',
'/shop/page/<int:page>/',
'/shop/category/<int:category>/',
'/shop/category/<int:category>/page/<int:page>/'
'/shop/category/<model("product.public.category"):category>/',
'/shop/category/<model("product.public.category"):category>/page/<int:page>/'
], type='http', auth="public", multilang=True)
def shop(self, category=0, page=0, filters='', search='', **post):
def shop(self, category=None, page=0, filters='', search='', **post):
cr, uid, context = request.cr, request.uid, request.context
product_obj = request.registry.get('product.template')
domain = request.registry.get('website').ecommerce_get_product_domain()
@@ -211,7 +211,7 @@ class Ecommerce(http.Controller):
('name', 'ilike', "%%%s%%" % search),
('description', 'ilike', "%%%s%%" % search)]
if category:
domain.append(('product_variant_ids.public_categ_id', 'child_of', category))
domain.append(('product_variant_ids.public_categ_id', 'child_of', category.id))
if filters:
filters = simplejson.loads(filters)
if filters:
@@ -286,7 +286,7 @@ class Ecommerce(http.Controller):
}
return request.website.render("website_sale.product", values)
@website.route(['/shop/product/<int:product_template_id>/comment'], type='http', auth="public")
@website.route(['/shop/product/comment'], type='http', auth="public", methods=['POST'])
def product_comment(self, product_template_id, **post):
cr, uid, context = request.cr, request.uid, request.context
if post.get('comment'):
@@ -298,11 +298,11 @@ class Ecommerce(http.Controller):
context=dict(context, mail_create_nosubcribe=True))
return werkzeug.utils.redirect(request.httprequest.referrer + "#comments")
@website.route(['/shop/add_product/', '/shop/category/<int:cat_id>/add_product/'], type='http', auth="user", multilang=True, methods=['POST'])
def add_product(self, name="New Product", cat_id=0, **post):
@website.route(['/shop/add_product/'], type='http', auth="user", multilang=True, methods=['POST'])
def add_product(self, name="New Product", category=0, **post):
Product = request.registry.get('product.product')
product_id = Product.create(request.cr, request.uid, {
'name': name, 'public_categ_id': cat_id
'name': name, 'public_categ_id': category
}, context=request.context)
product = Product.browse(request.cr, request.uid, product_id, context=request.context)
@@ -536,6 +536,7 @@ Weight: 1.1 ounces</field>
</div>
</section>
</field>
<field name="suggested_product_ids" eval="[(6, 0, [ref('product.product_template_7')])]"/>
</record>
<record id="item1" model="product.pricelist.item">
+4 -3
View File
@@ -51,7 +51,7 @@
<template id="products_cart" name="Shopping cart">
<div class="ribbon-wrapper">
<div class="ribbon btn btn-danger">Promo</div>
<div class="ribbon btn btn-danger">Sale</div>
</div>
<div class="oe_product_image">
<a t-href="/shop/product/#{ slug(product) }/" t-keep-query="category,search,filters">
@@ -188,7 +188,8 @@
</table>
<t t-if="not bins">
<div class="text-center text-muted">
<h3>No product found</h3>
<h3 class="css_editable_display">No product found</h3>
<h3 class="css_non_editable_mode_hidden">There isn't available products right know, click <a t-href="/page/website.contactus">here</a> to contact us</h3>
<t groups="base.group_website_publisher">
<p>Click on "Content" to define a new product or "Help" for more informations.</p>
<img src="/website/static/src/img/content_here.png"/>
@@ -678,7 +679,7 @@
}'/>
</td>
<td class="text-center">
<a t-href="./add_cart/#{ product.id }/"><strong>Add to Cart</strong></a>
<a t-href="/shop/add_cart/#{ product.product_variant_ids[0].id }/"><strong>Add to Cart</strong></a>
</td>
</tr>
</tbody>
@@ -2,6 +2,7 @@
from openerp.addons.website_sale.controllers.main import Ecommerce
from openerp.addons.web.http import request
from openerp.addons.website.models import website
from openerp import SUPERUSER_ID
class Ecommerce(Ecommerce):
@@ -15,8 +16,8 @@ class Ecommerce(Ecommerce):
if order and carrier_id:
# recompute delivery costs
SaleOrder = request.registry['sale.order']
SaleOrder.write(cr, uid, [order.id], {'carrier_id': carrier_id}, context=context)
SaleOrder.delivery_set(cr, uid, [order.id], context=context)
SaleOrder.write(cr, SUPERUSER_ID, [order.id], {'carrier_id': carrier_id}, context=context)
SaleOrder.delivery_set(cr, SUPERUSER_ID, [order.id], context=context)
res = super(Ecommerce, self).payment(**post)
return res