diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 31927036a38..736a531cc66 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -77,7 +77,7 @@ class account_analytic_invoice_line(osv.osv): price = price_unit elif pricelist_id: price = res.price - else: + if price is False: price = res.list_price if not name: name = self.pool.get('product.product').name_get(cr, uid, [res.id], context=local_context)[0][1] diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index af4caae608f..ba17a3c6a24 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -139,7 +139,8 @@ + attrs="{'required': [('invoice_on_timesheets', '=', True)]}" + domain="[('type', '=', 'sale')]"/> + - or Cancel + or Cancel diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index db43cc00586..83562142643 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -95,6 +95,9 @@ .openerp .oe_kanban_view .oe_kanban_groups { height: inherit; } +.openerp .oe_kanban_view .oe_kanban_groups_records { + height: 100%; +} .openerp .oe_kanban_view.oe_kanban_grouped_by_m2o .oe_kanban_group_title { cursor: move; } @@ -162,10 +165,7 @@ padding: 0px; background: white; } -.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards { - height: 100%; -} -.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards { +.openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_column, .openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_column_cards { height: 100%; } .openerp .oe_kanban_view .oe_kanban_aggregates { diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 77533c1182e..8d2174bc22e 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -119,6 +119,8 @@ // KanbanGroups {{{ .oe_kanban_groups height: inherit + .oe_kanban_groups_records + height: 100% &.oe_kanban_grouped_by_m2o .oe_kanban_group_title cursor: move .oe_kanban_header @@ -178,9 +180,9 @@ .oe_kanban_column padding: 0px background: #ffffff - - .oe_kanban_column, .oe_kanban_column_cards - height: 100% + &.oe_kanban_grouped + .oe_kanban_column, .oe_kanban_column_cards + height: 100% .oe_kanban_aggregates padding: 0 margin: 0px diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 51e8bc3b991..94b170a0c59 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -973,7 +973,9 @@ }, clean_for_save: function () { this._super(); - this.$target.find(".item").removeClass("next prev left right"); + this.$target.find(".item").removeClass("next prev left right active"); + this.$indicators.find('li').removeClass('active'); + this.$indicators.find('li:first').addClass('active'); if(!this.$target.find(".item.active").length) { this.$target.find(".item:first").addClass("active"); } diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index f5051025117..2417ac154f4 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -209,7 +209,8 @@ e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); - ga('create','');ga('send','pageview'); + ga('create',_.str.trim('')); + ga('send','pageview'); diff --git a/addons/website_event_track/views/website_event.xml b/addons/website_event_track/views/website_event.xml index 3cea1b35599..552033b5386 100644 --- a/addons/website_event_track/views/website_event.xml +++ b/addons/website_event_track/views/website_event.xml @@ -134,9 +134,7 @@
  • - - , - +
  • diff --git a/openerp/addons/base/ir/ir_cron.py b/openerp/addons/base/ir/ir_cron.py index e5a5e5f024b..e0f6e38b5ba 100644 --- a/openerp/addons/base/ir/ir_cron.py +++ b/openerp/addons/base/ir/ir_cron.py @@ -238,7 +238,7 @@ class ir_cron(osv.osv): locked_job = lock_cr.fetchone() if not locked_job: - # job was already executed by another parallel process/thread, skipping it. + _logger.debug("Job `%s` already executed by another process/thread. skipping it", job['name']) continue # Got the lock on the job row, run its code _logger.debug('Starting job `%s`.', job['name']) diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py index 442dc0ce741..3101f52f2e0 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -1141,13 +1141,20 @@ class ir_model_data(osv.osv): # Remove non-model records first, then model fields, and finish with models unlink_if_refcount((model, res_id) for model, res_id in to_unlink - if model not in ('ir.model','ir.model.fields')) + if model not in ('ir.model','ir.model.fields','ir.model.constraint')) + unlink_if_refcount((model, res_id) for model, res_id in to_unlink + if model == 'ir.model.constraint') + + ir_module_module = self.pool['ir.module.module'] + ir_model_constraint = self.pool['ir.model.constraint'] + modules_to_remove_ids = ir_module_module.search(cr, uid, [('name', 'in', modules_to_remove)], context=context) + constraint_ids = ir_model_constraint.search(cr, uid, [('module', 'in', modules_to_remove_ids)], context=context) + ir_model_constraint._module_data_uninstall(cr, uid, constraint_ids, context) + unlink_if_refcount((model, res_id) for model, res_id in to_unlink if model == 'ir.model.fields') ir_model_relation = self.pool['ir.model.relation'] - ir_module_module = self.pool['ir.module.module'] - modules_to_remove_ids = ir_module_module.search(cr, uid, [('name', 'in', modules_to_remove)]) relation_ids = ir_model_relation.search(cr, uid, [('module', 'in', modules_to_remove_ids)]) ir_model_relation._module_data_uninstall(cr, uid, relation_ids, context) diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index b82e6b8242d..20091351343 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -436,11 +436,7 @@ class module(osv.osv): including the deletion of all database structures created by the module: tables, columns, constraints, etc.""" ir_model_data = self.pool.get('ir.model.data') - ir_model_constraint = self.pool.get('ir.model.constraint') modules_to_remove = [m.name for m in self.browse(cr, uid, ids, context)] - modules_to_remove_ids = [m.id for m in self.browse(cr, uid, ids, context)] - constraint_ids = ir_model_constraint.search(cr, uid, [('module', 'in', modules_to_remove_ids)]) - ir_model_constraint._module_data_uninstall(cr, uid, constraint_ids, context) ir_model_data._module_data_uninstall(cr, uid, modules_to_remove, context) self.write(cr, uid, ids, {'state': 'uninstalled'}) return True diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 439463b962a..a2bb213cbf6 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -1261,8 +1261,16 @@ class function(_column): return new_values def get(self, cr, obj, ids, name, uid=False, context=None, values=None): - result = self._fnct(obj, cr, uid, ids, name, self._arg, context) - if self._multi: + multi = self._multi + # if we already have a value, don't recompute it. + # This happen if case of stored many2one fields + if values and not multi and name in values[0]: + result = {v['id']: v[name] for v in values} + elif values and multi and all(n in values[0] for n in name): + result = {v['id']: dict({n: v[n]} for n in name) for v in values} + else: + result = self._fnct(obj, cr, uid, ids, name, self._arg, context) + if multi: swap = {} for rid, values in result.iteritems(): for f, v in values.iteritems(): diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index fdd39d4cb76..6796042922f 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -2816,7 +2816,7 @@ class BaseModel(object): ('numeric', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]), ('float8', 'float', get_pg_type(f)[1], '::'+get_pg_type(f)[1]), ] - if f_pg_type == 'varchar' and f._type == 'char' and ((f.size is None and f_pg_size) or f_pg_size < f.size): + if f_pg_type == 'varchar' and f._type == 'char' and f_pg_size and (f.size is None or f_pg_size < f.size): try: with cr.savepoint(): cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size)))