diff --git a/addons/account/installer.py b/addons/account/installer.py index 961b8f9e763..343e22a7632 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -47,7 +47,7 @@ class account_installer(osv.osv_memory): # try get the list on apps server try: - apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com') + apps_server = self.pool.get('ir.module.module').get_apps_server(cr, uid, context=context) up = urlparse.urlparse(apps_server) url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index f4e5d17a8e0..7041c3aafbf 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -328,7 +328,7 @@ class account_asset_asset(osv.osv): default = {} if context is None: context = {} - default.update({'depreciation_line_ids': [], 'state': 'draft'}) + default.update({'depreciation_line_ids': [], 'account_move_line_ids': [], 'history_ids': [], 'state': 'draft'}) return super(account_asset_asset, self).copy(cr, uid, id, default, context=context) def _compute_entries(self, cr, uid, ids, period_id, context=None): diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 2671fc92581..5a17ac91e53 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -26,6 +26,7 @@ import openerp.addons.decimal_precision as dp class analytic_user_funct_grid(osv.osv): _name="analytic.user.funct.grid" _description= "Price per User" + _rec_name="user_id" _columns={ 'user_id': fields.many2one("res.users", "User", required=True,), 'product_id': fields.many2one("product.product", "Service", required=True,), diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index b4ce20d49e3..4fca426ffc0 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -2,6 +2,7 @@ import functools import logging import simplejson +import urlparse import werkzeug.utils from werkzeug.exceptions import BadRequest @@ -68,7 +69,8 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home): def get_state(self, provider): state = dict( d=request.session.db, - p=provider['id'] + p=provider['id'], + r=request.httprequest.full_path ) token = request.params.get('token') if token: @@ -137,8 +139,12 @@ class OAuthController(http.Controller): cr.commit() action = state.get('a') menu = state.get('m') + redirect = state.get('r') url = '/web' - if action: + if redirect and not redirect.startswith('/auth_oauth/signin') and \ + (not redirect.startswith('/web/login') or 'redirect' in urlparse.urlsplit(redirect).query): + url = redirect + elif action: url = '/web#action=%s' % action elif menu: url = '/web#menu_id=%s' % menu diff --git a/addons/auth_signup/auth_signup_data.xml b/addons/auth_signup/auth_signup_data.xml index f470811d39e..2789fcd8315 100644 --- a/addons/auth_signup/auth_signup_data.xml +++ b/addons/auth_signup/auth_signup_data.xml @@ -10,7 +10,7 @@ - + _usertemplate diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index d3a6394ee5d..cf6768e0f1f 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -13,6 +13,7 @@ openerp.pad = function(instance) { event.preventDefault(); self.set("configured", true); }); + this.pad_loading_request = null; }, initialize_content: function() { var self = this; @@ -30,14 +31,14 @@ openerp.pad = function(instance) { }, render_value: function() { var self = this; - this._configured_deferred.always(function() { + $.when(this._configured_deferred, this.pad_loading_request).always(function() { if (! self.get('configured')) { return; }; var value = self.get('value'); if (self.get('effective_readonly')) { if (_.str.startsWith(value, 'http')) { - this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) { + self.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) { self.$('.oe_pad_content').removeClass('oe_pad_loading').html('
'); self.$('.oe_pad_readonly').html(data); }).fail(function() { diff --git a/addons/payment/__openerp__.py b/addons/payment/__openerp__.py index bc5d3896ac2..c192bec7c1b 100644 --- a/addons/payment/__openerp__.py +++ b/addons/payment/__openerp__.py @@ -7,11 +7,12 @@ 'version': '1.0', 'description': """Payment Acquirer Base Module""", 'author': 'OpenERP SA', - 'depends': ['mail', 'account'], + 'depends': ['account'], 'data': [ 'views/payment_acquirer.xml', 'views/res_config_view.xml', 'security/ir.model.access.csv', ], 'installable': True, + 'auto_install': True, } diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 4946a71f80b..c547a611cd4 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -118,6 +118,7 @@
+ days
- diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index fac4f9ab357..eef4a71ba94 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -1399,6 +1399,9 @@ start : function () { var self = this; this._super(); + if (!self.$target.data("snippet-view")) { + this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target)); + } this.scroll(); this.$target.on('snippet-style-change snippet-style-preview', function () { self.$target.data("snippet-view").set_values(); diff --git a/addons/website_quote/security/ir.model.access.csv b/addons/website_quote/security/ir.model.access.csv index 1dbe5afbe34..88137036caa 100644 --- a/addons/website_quote/security/ir.model.access.csv +++ b/addons/website_quote/security/ir.model.access.csv @@ -6,3 +6,4 @@ access_sale_quote_line_manager,sale.quote.line,model_sale_quote_line,base.group_ access_sale_quote_option,sale.quote.option,model_sale_quote_option,base.group_sale_salesman,1,0,0,0 access_sale_quote_option_manager,sale.quote.option,model_sale_quote_option,base.group_sale_manager,1,1,1,1 access_sale_order_option,sale.order.option,model_sale_order_option,base.group_sale_salesman,1,1,1,1 +access_sale_order_option_all,sale.order.option,model_sale_order_option,,1,0,0,0 diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index bdf1ca7eaf2..374f17dcf06 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -43,7 +43,7 @@ class CheckoutInfo(object): result = dict((prefix + field_name, getattr(partner, field_name)) for field_name in self.string_billing_fields if getattr(partner, field_name)) result[prefix + 'state_id'] = partner.state_id and partner.state_id.id or '' result[prefix + 'country_id'] = partner.country_id and partner.country_id.id or '' - result[prefix + 'company'] = partner.parent_id and partner.parent_id.name or '' + result[prefix + 'company'] = partner.commercial_partner_id and partner.commercial_partner_id.is_company and partner.commercial_partner_id.name or '' return result def from_post(self, post): @@ -383,6 +383,8 @@ class Ecommerce(http.Controller): def add_cart(self, product_id, remove=None, **kw): request.registry['website']._ecommerce_add_product_to_cart(request.cr, request.uid, product_id=int(product_id), + number=float(kw.get('number',1)), + set_number=float(kw.get('set_number',-1)), context=request.context) return request.redirect("/shop/mycart")