diff --git a/addons/base_import/models/base_import.py b/addons/base_import/models/base_import.py
index b682de4b..ebb760a7 100644
--- a/addons/base_import/models/base_import.py
+++ b/addons/base_import/models/base_import.py
@@ -497,7 +497,6 @@ class Import(models.TransientModel):
'headers_type': header_types or False,
'preview': preview,
'options': options,
- 'advanced_mode': any([len(models.fix_import_export_id_paths(col)) > 1 for col in headers or []]),
'debug': self.user_has_groups('base.group_no_one'),
}
except Exception as error:
diff --git a/addons/base_import/static/src/js/import_action.js b/addons/base_import/static/src/js/import_action.js
index 4133f46b..74f9ce83 100644
--- a/addons/base_import/static/src/js/import_action.js
+++ b/addons/base_import/static/src/js/import_action.js
@@ -301,7 +301,6 @@ var DataImport = Widget.extend(ControlPanelMixin, {
this.$buttons.filter('.o_import_button').add(this.$('.oe_import_file_reload'))
.prop('disabled', false);
this.$el.addClass('oe_import_preview');
- this.$('input.oe_import_advanced_mode').prop('checked', result.advanced_mode);
this.$('.oe_import_grid').html(QWeb.render('ImportView.preview', result));
if (result.headers.length === 1) {
diff --git a/addons/base_import/static/src/xml/base_import.xml b/addons/base_import/static/src/xml/base_import.xml
index e5a5d431..5fb46528 100644
--- a/addons/base_import/static/src/xml/base_import.xml
+++ b/addons/base_import/static/src/xml/base_import.xml
@@ -76,7 +76,7 @@
id="oe_import_has_header" checked="checked"/>
-
Participants preferably have a functional knowledge of our software (see Functional Training).
-To get more information, visit the Flectra Official Website.
+To get more information, visit the Flectra Official Website.
@@ -291,7 +291,7 @@
Participants preferably have a functional knowledge of our software (see Functional Training).
-To get more information, visit the Flectra Official Website.
+To get more information, visit the Flectra Official Website.
@@ -463,7 +463,7 @@
Participants preferably have a functional knowledge of our software (see Functional Training).
-To get more information, visit the Flectra Official Website.
+To get more information, visit the Flectra Official Website.
diff --git a/addons/website_event/static/src/js/website_event.js b/addons/website_event/static/src/js/website_event.js
index 473d672e..e090bd8a 100644
--- a/addons/website_event/static/src/js/website_event.js
+++ b/addons/website_event/static/src/js/website_event.js
@@ -20,8 +20,11 @@ return instance.appendTo($form).then(function () {
flectra.define('website_event.website_event', function (require) {
var ajax = require('web.ajax');
+var core = require('web.core');
var Widget = require('web.Widget');
+var _t = core._t;
+
// Catch registration form event, because of JS for attendee details
var EventRegistrationForm = Widget.extend({
start: function () {
@@ -31,7 +34,6 @@ var EventRegistrationForm = Widget.extend({
.off('click')
.removeClass('a-submit')
.click(function (ev) {
- $(this).attr('disabled', true);
self.on_click(ev);
});
});
@@ -41,22 +43,31 @@ var EventRegistrationForm = Widget.extend({
ev.preventDefault();
ev.stopPropagation();
var $form = $(ev.currentTarget).closest('form');
+ var $button = $(ev.currentTarget).closest('[type="submit"]');
var post = {};
+ $('#registration_form table').siblings('.alert').remove();
$('#registration_form select').each(function () {
post[$(this).attr('name')] = $(this).val();
});
var tickets_ordered = _.some(_.map(post, function (value, key) { return parseInt(value); }));
if (!tickets_ordered) {
- return $('#registration_form table').after(
- 'Please select at least one ticket.
'
- );
+ $('')
+ .text(_t('Please select at least one ticket.'))
+ .insertAfter('#registration_form table');
+ return $.Deferred();
} else {
+ $button.attr('disabled', true);
return ajax.jsonRpc($form.attr('action'), 'call', post).then(function (modal) {
var $modal = $(modal);
+ $modal.modal({backdrop: 'static', keyboard: false});
$modal.find('.modal-body > div').removeClass('container'); // retrocompatibility - REMOVE ME in master / saas-19
- $modal.after($form).modal();
+ $modal.insertAfter($form).modal();
$modal.on('click', '.js_goto_event', function () {
$modal.modal('hide');
+ $button.prop('disabled', false);
+ });
+ $modal.on('click', '.close', function () {
+ $button.prop('disabled', false);
});
});
}
diff --git a/addons/website_event/views/event_templates.xml b/addons/website_event/views/event_templates.xml
index a28b7435..3ad9c2b6 100644
--- a/addons/website_event/views/event_templates.xml
+++ b/addons/website_event/views/event_templates.xml
@@ -480,7 +480,7 @@
Event registration is closed.
-
+
Configure and Launch Event Registration
diff --git a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js
index d03f6505..c64e2dd7 100644
--- a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js
+++ b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js
@@ -61,6 +61,9 @@ var ProductComparison = Widget.extend({
}
prod = parseInt(prod, 10);
}
+ if (!prod) {
+ return;
+ }
self.add_new_products(prod);
website_sale_utils.animate_clone($('#comparelist .o_product_panel_header'), $(this).closest('form'), -50, 10);
} else {
diff --git a/addons/website_sale_comparison/static/src/less/website_sale_comparison.less b/addons/website_sale_comparison/static/src/less/website_sale_comparison.less
index ff167568..29ef1a1a 100644
--- a/addons/website_sale_comparison/static/src/less/website_sale_comparison.less
+++ b/addons/website_sale_comparison/static/src/less/website_sale_comparison.less
@@ -50,5 +50,9 @@
margin-right: 8px;
}
}
+
+ div.css_not_available .o_add_compare_dyn {
+ display: none;
+ }
}
diff --git a/addons/website_sale_comparison/views/website_sale_comparison_template.xml b/addons/website_sale_comparison/views/website_sale_comparison_template.xml
index 7152a828..2eb444a4 100644
--- a/addons/website_sale_comparison/views/website_sale_comparison_template.xml
+++ b/addons/website_sale_comparison/views/website_sale_comparison_template.xml
@@ -57,7 +57,7 @@
-
+
diff --git a/addons/website_sale_wishlist/models/product_wishlist.py b/addons/website_sale_wishlist/models/product_wishlist.py
index da70ca19..34f9291f 100644
--- a/addons/website_sale_wishlist/models/product_wishlist.py
+++ b/addons/website_sale_wishlist/models/product_wishlist.py
@@ -36,14 +36,15 @@ class ProductWishlist(models.Model):
@api.model
def current(self):
- """Get all wishlist items that belong to current user or session."""
- return self.search([
+ """Get all wishlist items that belong to current user or session,
+ filter products that are unpublished."""
+ return self.sudo().search([
"|",
("partner_id", "=", self.env.user.partner_id.id),
"&",
("partner_id", "=", False),
("session", "=", self.env.user.current_session),
- ])
+ ]).filtered('product_id.product_tmpl_id.website_published')
@api.model
def _add_to_wishlist(self, pricelist_id, currency_id, website_id, price, product_id, partner_id=False, session=False):
diff --git a/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js b/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js
index d15ac3e6..fb841e02 100644
--- a/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js
+++ b/addons/website_sale_wishlist/static/src/js/website_sale_wishlist.js
@@ -28,7 +28,12 @@ var ProductWishlist = Widget.extend({
if ($('.wishlist-section').length) {
$('.wishlist-section a.o_wish_rm').on('click', function (e){ self.wishlist_rm(e, false); });
- $('.wishlist-section a.o_wish_add').on('click', function (e){ self.wishlist_add_or_mv(e); });
+ $('.wishlist-section a.o_wish_add').on('click', function (e){
+ $('.wishlist-section a.o_wish_add').addClass('disabled');
+ self.wishlist_add_or_mv(e).then(function(o) {
+ $('.wishlist-section a.o_wish_add').removeClass('disabled');
+ });
+ });
}
$('.oe_website_sale').on('change', 'input.js_variant_change, select.js_variant_change, ul[data-attribute_value_ids]', function(ev) {
@@ -75,7 +80,7 @@ var ProductWishlist = Widget.extend({
if (!product_id && e.currentTarget.classList.contains('o_add_wishlist_dyn')) {
product_id = parseInt($el.parent().find('.product_id').val());
}
- if (!_.contains(self.wishlist_product_ids, product_id)) {
+ if (product_id && !_.contains(self.wishlist_product_ids, product_id)) {
return ajax.jsonRpc('/shop/wishlist/add', 'call', {
'product_id': product_id
}).then(function () {
@@ -133,7 +138,7 @@ var ProductWishlist = Widget.extend({
// can be hidden if empty
$('#my_cart').removeClass('hidden');
website_sale_utils.animate_clone($('#my_cart'), tr, 25, 40);
- this.add_to_cart(product, tr.find('qty').val() || 1);
+ return this.add_to_cart(product, tr.find('qty').val() || 1);
},
wishlist_mv: function(e){
var tr = $(e.currentTarget).parents('tr');
@@ -143,6 +148,7 @@ var ProductWishlist = Widget.extend({
website_sale_utils.animate_clone($('#my_cart'), tr, 25, 40);
var adding_deffered = this.add_to_cart(product, tr.find('qty').val() || 1);
this.wishlist_rm(e, adding_deffered);
+ return adding_deffered;
},
add_to_cart: function(product_id, qty_id) {
var add_to_cart = ajax.jsonRpc("/shop/cart/update_json", 'call', {
diff --git a/addons/website_sale_wishlist/static/src/less/website_sale_wishlist.less b/addons/website_sale_wishlist/static/src/less/website_sale_wishlist.less
index 2bac6365..7804a44f 100644
--- a/addons/website_sale_wishlist/static/src/less/website_sale_wishlist.less
+++ b/addons/website_sale_wishlist/static/src/less/website_sale_wishlist.less
@@ -2,6 +2,10 @@
.td-wish-btn {
width: 140px;
}
+
+ div.css_not_available .o_add_wishlist_dyn {
+ display: none;
+ }
}
// XS size
diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py
index 55599e2d..cd13df96 100644
--- a/addons/website_slides/controllers/main.py
+++ b/addons/website_slides/controllers/main.py
@@ -186,8 +186,9 @@ class WebsiteSlides(http.Controller):
response.mimetype = 'application/pdf'
return response
- @http.route('''/slides/slide//download''', type='http', auth="public", website=True)
- def slide_download(self, slide, sitemap=False):
+ @http.route('''/slides/slide//download''', type='http', auth="public", website=True, sitemap=False)
+ def slide_download(self, slide, **kw):
+ slide = slide.sudo()
if slide.download_security == 'public' or (slide.download_security == 'user' and request.session.uid):
filecontent = base64.b64decode(slide.datas)
disposition = 'attachment; filename=%s.pdf' % werkzeug.urls.url_quote(slide.name)
@@ -197,7 +198,7 @@ class WebsiteSlides(http.Controller):
('Content-Length', len(filecontent)),
('Content-Disposition', disposition)])
elif not request.session.uid and slide.download_security == 'user':
- return werkzeug.utils.redirect('/web?redirect=/slides/slide/%s' % (slide.id))
+ return request.redirect('/web/login?redirect=/slides/slide/%s' % (slide.id))
return request.render("website.403")
@http.route('''/slides/slide//promote''', type='http', auth='user', website=True)
diff --git a/addons/website_slides/data/website_slides_demo.xml b/addons/website_slides/data/website_slides_demo.xml
index 8c24bfbb..b6f38705 100644
--- a/addons/website_slides/data/website_slides_demo.xml
+++ b/addons/website_slides/data/website_slides_demo.xml
@@ -37,9 +37,9 @@
Discover how you can integrate MRP, PLM, Quality and Maintenance in a single application to maximize the efficiency of your manufacturing operations.
-Read more about the features at: https://www.flectra.com/page/manufacturing-features
+Read more about the features at: https://www.flectrahq.com/manufacturing
-Discover Flectra MRP: https://www.flectra.com/page/manufacturing
+Discover Flectra MRP: https://www.flectrahq.com/manufacturing
Flectra CRM
@@ -51,7 +51,7 @@ Discover Flectra MRP: https://www.flectra.com/page/manufacturing
- Discover the CRM sales people love https://www.flectra.com/page/crm
+ Discover the CRM sales people love https://www.flectrahq.com/crm
Flectra All-in-One Software Demonstration
@@ -65,7 +65,7 @@ Discover Flectra MRP: https://www.flectra.com/page/manufacturing
Discover the all-in-one business management software solution that fits any business size and use case.
-Learn more at https://flectra.com
+Learn more at https://flectrahq.com
Flectra Sign Demonstration
@@ -79,7 +79,7 @@ Learn more at https://flectra.com
Stop doing manual printing and scanning. Move to electronic signature with Flectra Sign!
-Discover more at https://www.flectra.com/page/sign
+Discover more at https://www.flectrahq.com/sign
Awesome Timesheet by Flectra
@@ -120,7 +120,7 @@ iOS: http://bit.ly/1ZUZsZD
Warehouse management software for the 21st century.
-Discover Flectra Inventory: https://www.flectra.com/page/warehouse
+Discover Flectra Inventory: https://www.flectrahq.com/warehouse
Flectra Sales
@@ -132,7 +132,7 @@ Discover Flectra Inventory: https://www.flectra.com/page/warehouse
- Learn more at https://www.flectra.com/page/sales
+ Learn more at https://www.flectrahq.com/sales
@@ -162,7 +162,7 @@ Discover Flectra Inventory: https://www.flectra.com/page/warehouse
- OpenSource CMS, A performance comparison - Mantavya Gajjar
+ OpenSource CMS, A performance comparison
presentation
@@ -171,7 +171,7 @@ Discover Flectra Inventory: https://www.flectra.com/page/warehouse
10
4718
- 1. Open Source CMS A performance comparision Mantavya Gajjar – Managining Director, Flectra India
+ 1. Open Source CMS A performance comparision
2. Topics 1 2 3 4 5 o Introduction – Products to Compare – Test Environment o Test Cases (home, catalogue, product pages) – Performance ● Google PageSpeed Inside ● Speed Test using Pingdom – Scalability ● Load Test using Blitz – Maintainability ● Source Code – cloc ● Community to maintain the source code – W3C Markup Validations o Conclusion
3. Introduction
4. Introduction Open Source Products, compared with Flectra
@@ -240,7 +240,7 @@ Discover Flectra Inventory: https://www.flectra.com/page/warehouse
67. Conclusion
68. Conclusion Performance : o Flectra is 3x times faster than the Drupal o Flectra is 6x times faster than the Magento o Flectra is 2x times faster than the Prestashop Scalability : o Flectra timeout at 198 users o Drupal timeout at 125 users o Magento timeout at 148 users o Prestashop timeout at 104 users Maintainability : o 1.3x times smaller then the drupal o 5.5x times smaller then the magento o 1.9x times smaller then the prestashop
69. Questions ?
-70. Flectra sales@flectra.com +32 (0) 2 290 34 90 www.flectra.com R&D and services offce Chaussée de Namur 40 B-1367 Grand Rosière Sales offce Avenue Van Nieuwenhuyse 6 B-1160 Brussels Thank You
+70. Flectra sales@flectrahq.com +32 (0) 2 290 34 90 www.flectrahq.com R&D and services offce Chaussée de Namur 40 B-1367 Grand Rosière Sales offce Avenue Van Nieuwenhuyse 6 B-1160 Brussels Thank You
diff --git a/addons/website_slides/models/slides.py b/addons/website_slides/models/slides.py
index 5d0a023a..ca609dcd 100644
--- a/addons/website_slides/models/slides.py
+++ b/addons/website_slides/models/slides.py
@@ -16,6 +16,8 @@ from flectra.addons.http_routing.models.ir_http import slug
from flectra.tools import image
from flectra.tools.translate import html_translate
from flectra.exceptions import Warning
+from flectra.http import request
+from flectra.addons.http_routing.models.ir_http import url_for
class Channel(models.Model):
@@ -368,10 +370,13 @@ class Slide(models.Model):
embed_code = fields.Text('Embed Code', readonly=True, compute='_get_embed_code')
def _get_embed_code(self):
- base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
+ base_url = request and request.httprequest.url_root or self.env['ir.config_parameter'].sudo().get_param('web.base.url')
+ if base_url[-1] == '/':
+ base_url = base_url[:-1]
for record in self:
if record.datas and (not record.document_id or record.slide_type in ['document', 'presentation']):
- record.embed_code = '' % (base_url, record.id, 315, 420)
+ slide_url = base_url + url_for('/slides/embed/%s?page=1' % record.id)
+ record.embed_code = '' % (slide_url, 315, 420)
elif record.slide_type == 'video' and record.document_id:
if not record.mime_type:
# embed youtube video
diff --git a/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js b/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js
index d5e72669..f313a37d 100644
--- a/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js
+++ b/addons/website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js
@@ -147,12 +147,22 @@ var PDFSlidesViewer = (function(){
PDFSlidesViewer.prototype.toggleFullScreenFooter = function(){
if(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) {
- $('div#PDFViewer > div.navbar-fixed-bottom').toggleClass('oe_show_footer');
+ var $navBarFooter = $('div#PDFViewer > div.navbar-fixed-bottom');
+ $navBarFooter.toggleClass('oe_show_footer');
+
+ if ($navBarFooter.css('display') === 'none') {
+ $navBarFooter.css('display', 'block');
+ $('div#PDFViewer').css('padding-bottom', '50px');
+ } else {
+ $navBarFooter.css('display', 'none');
+ $('div#PDFViewer').css('padding-bottom', '0');
+ }
}
}
PDFSlidesViewer.prototype.toggleFullScreen = function(){
- var el = this.canvas.parentNode;
+ // The canvas and the navigation bar needs to be fullscreened
+ var el = this.canvas.parentNode.parentNode;
var isFullscreenAvailable = document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled || false;
if(isFullscreenAvailable){ // Full screen supported