[MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121128155252-fspz3t9ywt2neww4
This commit is contained in:
@@ -652,7 +652,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe_dropdown_toggle {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
color: #4C4C4C;
|
||||
font-weight: normal;
|
||||
}
|
||||
.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened {
|
||||
|
||||
@@ -564,7 +564,7 @@ $sheet-padding: 16px
|
||||
position: relative
|
||||
cursor: pointer
|
||||
.oe_dropdown_toggle
|
||||
color: rgba(0,0,0,0.3)
|
||||
color: #4C4C4C
|
||||
font-weight: normal
|
||||
.oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened
|
||||
display: block
|
||||
|
||||
@@ -990,7 +990,7 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
|
||||
};
|
||||
date.today = new py.def(function () {
|
||||
var d = new Date();
|
||||
return new date(d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate());
|
||||
return new date(d.getFullYear(), d.getMonth() + 1, d.getDate());
|
||||
});
|
||||
datetime.time = new py.type(function time() {
|
||||
throw new Error('datetime.time not implemented');
|
||||
|
||||
@@ -119,6 +119,9 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
|
||||
},
|
||||
session_logout: function() {
|
||||
this.set_cookie('session_id', '');
|
||||
var url = "#";
|
||||
$.bbq.pushState(url);
|
||||
window.location.search = "";
|
||||
return this.rpc("/web/session/destroy", {});
|
||||
},
|
||||
get_cookie: function (name) {
|
||||
|
||||
@@ -1033,7 +1033,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||
|| field.get("readonly")
|
||||
|| field.field.type === 'one2many'
|
||||
|| field.field.type === 'many2many'
|
||||
|| field.field.type === 'binary') {
|
||||
|| field.field.type === 'binary'
|
||||
|| field.password) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1681,11 +1682,11 @@ instance.web.form.compute_domain = function(expr, fields) {
|
||||
switch (op.toLowerCase()) {
|
||||
case '=':
|
||||
case '==':
|
||||
stack.push(field_value == val);
|
||||
stack.push(_.isEqual(field_value, val));
|
||||
break;
|
||||
case '!=':
|
||||
case '<>':
|
||||
stack.push(field_value != val);
|
||||
stack.push(!_.isEqual(field_value, val));
|
||||
break;
|
||||
case '<':
|
||||
stack.push(field_value < val);
|
||||
@@ -2246,7 +2247,9 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
|
||||
var self = this;
|
||||
var $input = this.$el.find('input');
|
||||
$input.change(function() {
|
||||
self.internal_set_value(self.parse_value($input.val()));
|
||||
if(self.is_syntax_valid()){
|
||||
self.internal_set_value(self.parse_value($input.val()));
|
||||
}
|
||||
});
|
||||
this.setupFocus($input);
|
||||
},
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
<t t-esc="menu.name"/>
|
||||
<t t-if="menu.needaction_enabled and menu.needaction_counter">
|
||||
<div class="oe_tag oe_tag_dark oe_menu_counter">
|
||||
<t t-esc="menu.needaction_counter"/>
|
||||
<t t-if="menu.needaction_counter > 99"> 99+ </t><t t-if="menu.needaction_counter <= 99"> <t t-esc="menu.needaction_counter"/> </t>
|
||||
</div>
|
||||
</t>
|
||||
</a>
|
||||
@@ -681,13 +681,15 @@
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div t-name="ListView.buttons" class="oe_list_buttons">
|
||||
<t t-name="ListView.buttons">
|
||||
<div class="oe_list_buttons">
|
||||
<t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable and widget.is_action_enabled('create')">
|
||||
<button type="button" class="oe_button oe_list_add oe_highlight">
|
||||
<t t-esc="widget.options.addable"/>
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="ListView.pager">
|
||||
<div class="oe_list_pager" t-att-colspan="widget.columns_count">
|
||||
<t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
|
||||
@@ -1033,7 +1035,7 @@
|
||||
t-att-autofocus="widget.node.attrs.autofocus"
|
||||
t-att-id="widget.id_for_label">
|
||||
<t t-foreach="widget.values" t-as="option">
|
||||
<option><t t-esc="option[1]"/></option>
|
||||
<option><t t-esc="widget.node.attrs.placeholder" t-if="option[0] == false and widget.node.attrs.placeholder"/><t t-esc="option[1]" t-if="option[0] != false"/></option>
|
||||
</t>
|
||||
</select>
|
||||
</span>
|
||||
|
||||
@@ -323,7 +323,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||
$columns.sortable({
|
||||
handle : '.oe_kanban_draghandle',
|
||||
start: function(event, ui) {
|
||||
self.currently_dragging.index = ui.item.index();
|
||||
self.currently_dragging.index = ui.item.parent().children('.oe_kanban_record').index(ui.item);
|
||||
self.currently_dragging.group = ui.item.parents('.oe_kanban_column:first').data('widget');
|
||||
ui.item.find('*').on('click.prevent', function(ev) {
|
||||
return false;
|
||||
@@ -334,7 +334,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||
stop: function(event, ui) {
|
||||
var record = ui.item.data('widget');
|
||||
var old_index = self.currently_dragging.index;
|
||||
var new_index = ui.item.index();
|
||||
var new_index = ui.item.parent().children('.oe_kanban_record').index(ui.item);
|
||||
var old_group = self.currently_dragging.group;
|
||||
var new_group = ui.item.parents('.oe_kanban_column:first').data('widget');
|
||||
if (!(old_group.title === new_group.title && old_group.value === new_group.value && old_index == new_index)) {
|
||||
@@ -1070,8 +1070,10 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
|
||||
*/
|
||||
quick_add: function () {
|
||||
var self = this;
|
||||
var val = this.$input.val();
|
||||
if (/^\s*$/.test(val)) { return; }
|
||||
this._dataset.call(
|
||||
'name_create', [self.$input.val() || false, new instance.web.CompoundContext(
|
||||
'name_create', [val, new instance.web.CompoundContext(
|
||||
this._dataset.get_context(), this._context)])
|
||||
.then(function(record) {
|
||||
self.$input.val("");
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
<div class="oe_fold_column">
|
||||
<div t-attf-class="oe_kanban_group_title #{widget.undefined_title ? 'oe_kanban_group_title_undefined' : ''}">
|
||||
<span><t t-esc="widget.title"/></span>
|
||||
<span class="oe_kanban_group_length oe_tag" style="position:relative; top:-2px;"><t t-esc="widget.group.get('length')"/></span>
|
||||
<span class="oe_kanban_group_length oe_tag" style="position:relative; top:-2px;">
|
||||
<t t-if="widget.group.get('length') > 99"> 99+ </t><t t-if="widget.group.get('length') <= 99"> <t t-esc="widget.group.get('length')"/> </t>
|
||||
</span>
|
||||
</div>
|
||||
<ul class="oe_kanban_aggregates">
|
||||
<li t-foreach="widget.aggregates" t-as="aggregate">
|
||||
|
||||
Reference in New Issue
Block a user