diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 819dd4a5ee8..fc9a877f3b9 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1250,7 +1250,9 @@ exports.Orderline = Backbone.Model.extend({ this.trigger('change',this); }, get_unit_price: function(){ - return round_di(this.price || 0, this.pos.dp['Product Price']) + var digits = this.pos.dp['Product Price']; + // round and truncate to mimic _sybmbol_set behavior + return parseFloat(round_di(this.price || 0, digits).toFixed(digits)); }, get_unit_display_price: function(){ if (this.pos.config.iface_tax_included) { diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py index 55d0f5dd0c3..fdbebe53eff 100644 --- a/addons/stock/procurement.py +++ b/addons/stock/procurement.py @@ -448,13 +448,12 @@ class procurement_order(osv.osv): ''' Create procurement based on Orderpoint - :param bool use_new_cursor: if set, use a dedicated cursor and auto-commit after processing each procurement. + :param bool use_new_cursor: if set, use dedicated cursors and auto-commit after processing + 1000 orderpoints. This is appropriate for batch jobs only. ''' if context is None: context = {} - if use_new_cursor: - cr = openerp.registry(cr.dbname).cursor() orderpoint_obj = self.pool.get('stock.warehouse.orderpoint') procurement_obj = self.pool.get('procurement.order') product_obj = self.pool.get('product.product') @@ -466,6 +465,8 @@ class procurement_order(osv.osv): while orderpoint_ids: ids = orderpoint_ids[:1000] del orderpoint_ids[:1000] + if use_new_cursor: + cr = openerp.registry(cr.dbname).cursor() product_dict = {} ops_dict = {} ops = orderpoint_obj.browse(cr, uid, ids, context=context) @@ -532,12 +533,10 @@ class procurement_order(osv.osv): if use_new_cursor: cr.commit() + cr.close() if prev_ids == ids: break else: prev_ids = ids - if use_new_cursor: - cr.commit() - cr.close() return {} diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 31c4eebda9d..44093469135 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1423,6 +1423,7 @@ .openerp .oe_application .oe_form_sheetbg { background: url(/web/static/src/img/form_sheetbg.png); border-bottom: 1px solid #ddd; + z-index: 1; } .openerp .oe_application .oe_form_sheetbg .oe_subtotal_footer label { font-weight: bold; @@ -2203,6 +2204,10 @@ .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 textarea.field_text { + position: relative; + z-index: 1; +} .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; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 37ac418816d..0073a1195c5 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1279,6 +1279,7 @@ $sheet-padding: 16px .oe_form_sheetbg background: url(/web/static/src/img/form_sheetbg.png) border-bottom: 1px solid #ddd + z-index: 1 // Customize font weight according bootstrap3 .oe_subtotal_footer label font-weight: bold @@ -1892,6 +1893,9 @@ $sheet-padding: 16px margin: 0 input, textarea, select min-width: 0 + textarea.field_text + position: relative + z-index: 1 &.oe_form_field_float,&.oe_form_view_integer &.oe_readonly padding: 6px 0px 0px diff --git a/doc/cla/corporate/metalsartigan.md b/doc/cla/corporate/metalsartigan.md new file mode 100644 index 00000000000..a49cdd39186 --- /dev/null +++ b/doc/cla/corporate/metalsartigan.md @@ -0,0 +1,15 @@ +Canada, 2017-4-4 + +Métal Sartigan agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Jérôme Thériault jerther@gmail.com https://github.com/jerther + +List of contributors: + +Jérôme Thériault jerther@gmail.com https://github.com/jerther diff --git a/openerp/models.py b/openerp/models.py index 85c6a45c65b..c7598e23d68 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -751,7 +751,7 @@ class BaseModel(object): field = cls._fields.get(name) if not field: _logger.warning("method %s.%s: @constrains parameter %r is not a field name", cls._name, attr, name) - if not (field.store or field.column and field.column._fnct_inv): + elif not (field.store or field.column and field.column._fnct_inv): _logger.warning("method %s.%s: @constrains parameter %r is not writeable", cls._name, attr, name) methods.append(func)