- Dear
+ Dear
You have been assigned to the
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index df20d976efd..ed0794d2cff 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -1509,6 +1509,7 @@ exports.Orderline = Backbone.Model.extend({
// when we add an new orderline we want to merge it with the last line to see reduce the number of items
// in the orderline. This returns true if it makes sense to merge the two
can_be_merged_with: function(orderline){
+ var price = parseFloat(round_di(this.price || 0, this.pos.dp['Product Price']).toFixed(this.pos.dp['Product Price']));
if( this.get_product().id !== orderline.get_product().id){ //only orderline of the same product can be merged
return false;
}else if(!this.get_unit() || !this.get_unit().is_pos_groupable){
@@ -1517,7 +1518,7 @@ exports.Orderline = Backbone.Model.extend({
return false;
}else if(this.get_discount() > 0){ // we don't merge discounted orderlines
return false;
- }else if(this.price !== orderline.get_product().get_price(orderline.order.pricelist, this.get_quantity())){
+ }else if(price !== orderline.get_product().get_price(orderline.order.pricelist, this.get_quantity())){
return false;
}else if(this.product.tracking == 'lot') {
return false;
diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py
index 396480d5833..bd600c14452 100644
--- a/addons/stock/models/stock_inventory.py
+++ b/addons/stock/models/stock_inventory.py
@@ -213,7 +213,7 @@ class Inventory(models.Model):
def _get_inventory_lines_values(self):
# TDE CLEANME: is sql really necessary ? I don't think so
locations = self.env['stock.location'].search([('id', 'child_of', [self.location_id.id])])
- domain = ' location_id in %s'
+ domain = ' location_id in %s AND active = TRUE'
args = (tuple(locations.ids),)
vals = []
@@ -254,6 +254,8 @@ class Inventory(models.Model):
self.env.cr.execute("""SELECT product_id, sum(quantity) as product_qty, location_id, lot_id as prod_lot_id, package_id, owner_id as partner_id
FROM stock_quant
+ LEFT JOIN product_product
+ ON product_product.id = stock_quant.product_id
WHERE %s
GROUP BY product_id, location_id, lot_id, package_id, partner_id """ % domain, args)
diff --git a/addons/stock_dropshipping/models/sale.py b/addons/stock_dropshipping/models/sale.py
index 81f975cbce6..b527701a049 100644
--- a/addons/stock_dropshipping/models/sale.py
+++ b/addons/stock_dropshipping/models/sale.py
@@ -11,9 +11,11 @@ class SaleOrderLine(models.Model):
@api.multi
def _get_qty_procurement(self):
- if not self.move_ids.filtered(lambda r: r.state != 'cancel') and self.purchase_line_ids.filtered(lambda r: r.state != 'cancel'):
+ # People without purchase rights should be able to do this operation
+ purchase_lines_sudo = self.sudo().purchase_line_ids
+ if not self.move_ids.filtered(lambda r: r.state != 'cancel') and purchase_lines_sudo.filtered(lambda r: r.state != 'cancel'):
qty = 0.0
- for po_line in self.purchase_line_ids.filtered(lambda r: r.state != 'cancel'):
+ for po_line in purchase_lines_sudo.filtered(lambda r: r.state != 'cancel'):
qty += po_line.product_uom._compute_quantity(po_line.product_qty, self.product_uom, rounding_method='HALF-UP')
return qty
else:
diff --git a/doc/cla/corporate/cybrosys.md b/doc/cla/corporate/cybrosys.md
new file mode 100644
index 00000000000..0d413d31ba7
--- /dev/null
+++ b/doc/cla/corporate/cybrosys.md
@@ -0,0 +1,16 @@
+India 2018-08-27
+
+Cybrosys Techno SOlutions 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,
+
+Niyas Raphy niyas@cybrosys.com https://github.com/CybroOdoo
+
+List of contributors:
+
+Sainu Abideen sainu@cybrosys.com https://github.com/CybroOdoo
+Cybrosys odoo@cybrosys.com https://github.com/CybroOdoo
diff --git a/odoo/addons/base/data/res_country_data.xml b/odoo/addons/base/data/res_country_data.xml
index 3e0db583e3e..0b508cd4e27 100644
--- a/odoo/addons/base/data/res_country_data.xml
+++ b/odoo/addons/base/data/res_country_data.xml
@@ -1734,7 +1734,7 @@