[MERGE] forward port branch saas-6 up to 271067f50c
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user