[MERGE] forward port of branch 7.0 up to 3632949
This commit is contained in:
commit
2f4be42d8c
|
@ -5415,6 +5415,20 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
|
|||
this._super.apply(this, arguments);
|
||||
this.render_value();
|
||||
this.set_filename('');
|
||||
},
|
||||
set_value: function(value_){
|
||||
var changed = value_ !== this.get_value();
|
||||
this._super.apply(this, arguments);
|
||||
// By default, on binary images read, the server returns the binary size
|
||||
// This is possible that two images have the exact same size
|
||||
// Therefore we trigger the change in case the image value hasn't changed
|
||||
// So the image is re-rendered correctly
|
||||
if (!changed){
|
||||
this.trigger("change:value", this, {
|
||||
oldValue: value_,
|
||||
newValue: value_
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -421,8 +421,8 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
stop: function(event, ui) {
|
||||
var stop_index = ui.item.index();
|
||||
if (start_index !== stop_index) {
|
||||
var $start_column = $('.oe_kanban_groups_records .oe_kanban_column').eq(start_index);
|
||||
var $stop_column = $('.oe_kanban_groups_records .oe_kanban_column').eq(stop_index);
|
||||
var $start_column = self.$('.oe_kanban_groups_records .oe_kanban_column').eq(start_index);
|
||||
var $stop_column = self.$('.oe_kanban_groups_records .oe_kanban_column').eq(stop_index);
|
||||
var method = (start_index > stop_index) ? 'insertBefore' : 'insertAfter';
|
||||
$start_column[method]($stop_column);
|
||||
var tmp_group = self.groups.splice(start_index, 1)[0];
|
||||
|
@ -1148,7 +1148,7 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
|
|||
*/
|
||||
instance.web_kanban.QuickCreate = instance.web.Widget.extend({
|
||||
template: 'KanbanView.quick_create',
|
||||
|
||||
|
||||
/**
|
||||
* close_btn: If true, the widget will display a "Close" button able to trigger
|
||||
* a "close" event.
|
||||
|
|
|
@ -24,9 +24,10 @@ import time
|
|||
import psycopg2
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
import pytz
|
||||
|
||||
import openerp
|
||||
from openerp import netsvc
|
||||
from openerp import netsvc, SUPERUSER_ID
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||
from openerp.tools.safe_eval import safe_eval as eval
|
||||
|
@ -158,8 +159,8 @@ class ir_cron(osv.osv):
|
|||
must not be committed/rolled back!
|
||||
"""
|
||||
try:
|
||||
now = datetime.now()
|
||||
nextcall = datetime.strptime(job['nextcall'], DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
now = fields.datetime.context_timestamp(job_cr, SUPERUSER_ID, datetime.now())
|
||||
nextcall = fields.datetime.context_timestamp(job_cr, SUPERUSER_ID, datetime.strptime(job['nextcall'], DEFAULT_SERVER_DATETIME_FORMAT))
|
||||
numbercall = job['numbercall']
|
||||
|
||||
ok = False
|
||||
|
@ -175,7 +176,7 @@ class ir_cron(osv.osv):
|
|||
if not numbercall:
|
||||
addsql = ', active=False'
|
||||
cron_cr.execute("UPDATE ir_cron SET nextcall=%s, numbercall=%s"+addsql+" WHERE id=%s",
|
||||
(nextcall.strftime(DEFAULT_SERVER_DATETIME_FORMAT), numbercall, job['id']))
|
||||
(nextcall.astimezone(pytz.UTC).strftime(DEFAULT_SERVER_DATETIME_FORMAT), numbercall, job['id']))
|
||||
|
||||
finally:
|
||||
job_cr.commit()
|
||||
|
|
|
@ -452,7 +452,7 @@ class YamlInterpreter(object):
|
|||
# do not shadow values explicitly set in yaml.
|
||||
record_dict[key] = process_val(key, val)
|
||||
else:
|
||||
_logger.warning("The returning field '%s' from your on_change call '%s'"
|
||||
_logger.debug("The returning field '%s' from your on_change call '%s'"
|
||||
" does not exist either on the object '%s', either in"
|
||||
" the view '%s'",
|
||||
key, match.group(1), model._name, view_info['name'])
|
||||
|
|
Loading…
Reference in New Issue