diff --git a/addons/.bzrignore b/addons/.bzrignore deleted file mode 100644 index 8c348710117..00000000000 --- a/addons/.bzrignore +++ /dev/null @@ -1,2 +0,0 @@ -.* -**/node_modules diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 964fa1584ba..1f257376331 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -128,13 +128,12 @@ class sale_order(osv.osv): sale_clause = '' no_invoiced = False for arg in args: - if arg[1] == '=': - if arg[2]: - clause += 'AND inv.state = \'paid\'' - else: - clause += 'AND inv.state != \'cancel\' AND sale.state != \'cancel\' AND inv.state <> \'paid\' AND rel.order_id = sale.id ' - sale_clause = ', sale_order AS sale ' - no_invoiced = True + if (arg[1] == '=' and arg[2]) or (arg[1] == '!=' and not arg[2]): + clause += 'AND inv.state = \'paid\'' + else: + clause += 'AND inv.state != \'cancel\' AND sale.state != \'cancel\' AND inv.state <> \'paid\' AND rel.order_id = sale.id ' + sale_clause = ', sale_order AS sale ' + no_invoiced = True cursor.execute('SELECT rel.order_id ' \ 'FROM sale_order_invoice_rel AS rel, account_invoice AS inv '+ sale_clause + \ diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b97a5ba50ab..91146789602 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2647,11 +2647,11 @@ .openerp .oe_list_editable .oe_list_content td.oe_list_field_cell { padding: 4px 6px 3px; } -.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) { +.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell { color: transparent; text-shadow: none; } -.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) * { +.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell * { visibility: hidden; } .openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_drop_down_button { @@ -2667,6 +2667,13 @@ min-width: 0; max-width: none; } +.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_list_field_handle { + color: transparent; +} +.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_readonly { + padding: 4px 6px 3px; + text-align: left; +} .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea { height: 27px; -moz-border-radius: 0; @@ -2678,9 +2685,14 @@ .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field select { min-width: 0; } -.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer input { +.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float.oe_readonly, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer.oe_readonly { + padding: 6px 0px 0px; text-align: right; + max-width: 100px; +} +.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer input { width: 100% !important; + text-align: right; } .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime input.oe_datepicker_master, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date input.oe_datepicker_master { width: 100% !important; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index dce3401a3ed..07d683268f1 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -2138,7 +2138,7 @@ $sheet-padding: 16px .oe_list_editable .oe_list_content td.oe_list_field_cell padding: 4px 6px 3px .oe_list.oe_list_editable.oe_editing - .oe_edition .oe_list_field_cell:not(.oe_readonly) + .oe_edition .oe_list_field_cell * visibility: hidden color: transparent @@ -2150,6 +2150,11 @@ $sheet-padding: 16px .oe_input_icon margin-top: 5px .oe_form_field + &.oe_list_field_handle + color: transparent + &.oe_readonly + padding: 4px 6px 3px + text-align: left min-width: 0 max-width: none input, textarea @@ -2160,9 +2165,13 @@ $sheet-padding: 16px input, textarea, select min-width: 0 &.oe_form_field_float,&.oe_form_view_integer - input + &.oe_readonly + padding: 6px 0px 0px text-align: right + max-width: 100px + input width: 100% !important + text-align: right &.oe_form_field_datetime,&.oe_form_field_date input.oe_datepicker_master width: 100% !important diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 3f46c7374ff..956ec494573 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2810,7 +2810,9 @@ instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instanc }, set_dimensions: function (height, width) { this._super(height, width); - this.datewidget.$input.css('height', height); + if (!this.get("effective_readonly")) { + this.datewidget.$input.css('height', height); + } } }); @@ -3510,6 +3512,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc this.floating = false; this.current_display = null; this.is_started = false; + this.ignore_focusout = false; }, reinit_value: function(val) { this.internal_set_value(val); @@ -3641,6 +3644,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc var ed_delay = 200; var ed_duration = 15000; var anyoneLoosesFocus = function (e) { + if (self.ignore_focusout) { return; } var used = false; if (self.floating) { if (self.last_search.length > 0) { @@ -3844,11 +3848,17 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc _search_create_popup: function() { this.no_ed = true; this.ed_def.reject(); - return instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments); + this.ignore_focusout = true; + this.reinit_value(false); + var res = instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments); + this.ignore_focusout = false; + this.no_ed = false; + return res; }, set_dimensions: function (height, width) { this._super(height, width); - this.$input.css('height', height); + if (!this.get("effective_readonly") && this.$input) + this.$input.css('height', height); } }); diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index ea2c28d9c3f..144de8eb21c 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -285,9 +285,7 @@ if (!this.editor.is_editing()) { return; } for(var i=0, len=this.fields_for_resize.length; i res_users.check() - # -> res_users.check_credentials() - except (openerp.exceptions.AccessDenied, openerp.http.SessionExpiredException): - # All other exceptions mean undetermined status (e.g. connection pool full), - # let them bubble up - request.session.logout() - getattr(self, "_auth_method_%s" % auth_method)() + try: + if request.session.uid: + try: + request.session.check_security() + # what if error in security.check() + # -> res_users.check() + # -> res_users.check_credentials() + except (openerp.exceptions.AccessDenied, openerp.http.SessionExpiredException): + # All other exceptions mean undetermined status (e.g. connection pool full), + # let them bubble up + request.session.logout() + getattr(self, "_auth_method_%s" % auth_method)() + except (openerp.exceptions.AccessDenied, openerp.http.SessionExpiredException): + raise + except Exception: + _logger.exception("Exception during request Authentication.") + raise openerp.exceptions.AccessDenied() return auth_method def _handle_exception(self, exception): diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index eb154d4a05f..df673f95b32 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -496,6 +496,7 @@ class module(osv.osv): 'params': {'menu_id': menu_ids and menu_ids[0] or False} } + #TODO remove me in master, not called anymore def button_immediate_uninstall(self, cr, uid, ids, context=None): """ Uninstall the selected module(s) immediately and fully, diff --git a/openerp/addons/base/module/module_view.xml b/openerp/addons/base/module/module_view.xml index 3f92c79e2cf..7cc46539e8f 100644 --- a/openerp/addons/base/module/module_view.xml +++ b/openerp/addons/base/module/module_view.xml @@ -82,8 +82,7 @@