diff --git a/addons/sale/report/invoice_report_templates.xml b/addons/sale/report/invoice_report_templates.xml
index 672fc817422..b7a746384d3 100644
--- a/addons/sale/report/invoice_report_templates.xml
+++ b/addons/sale/report/invoice_report_templates.xml
@@ -22,7 +22,7 @@
Unit Price |
Disc.(%) |
Taxes |
- Price |
+ Amount |
@@ -53,7 +53,7 @@
|
-
+ |
|
diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py
index 432a4e57a7c..bcf147c7cd4 100644
--- a/addons/sale_stock/models/sale_order.py
+++ b/addons/sale_stock/models/sale_order.py
@@ -137,13 +137,9 @@ class SaleOrderLine(models.Model):
@api.multi
@api.depends('product_id')
def _compute_qty_delivered_updateable(self):
- # prefetch field before filtering
- self.mapped('product_id')
- # on consumable or stockable products, qty_delivered_updateable defaults
- # to False; on other lines use the original computation
- lines = self.filtered(lambda line: line.product_id.type not in ('consu', 'product'))
- lines = lines.with_prefetch(self._prefetch)
- super(SaleOrderLine, lines)._compute_qty_delivered_updateable()
+ for line in self:
+ if line.product_id.type not in ('consu', 'product'):
+ super(SaleOrderLine, line)._compute_qty_delivered_updateable()
@api.onchange('product_id')
def _onchange_product_id_set_customer_lead(self):
diff --git a/addons/sale_stock/tests/test_sale_stock.py b/addons/sale_stock/tests/test_sale_stock.py
index c99f211ce50..517d1dbdd70 100644
--- a/addons/sale_stock/tests/test_sale_stock.py
+++ b/addons/sale_stock/tests/test_sale_stock.py
@@ -52,7 +52,7 @@ class TestSaleStock(TestSale):
pick_2 = self.so.picking_ids[0]
pick_2.force_assign()
pick_2.move_lines.write({'quantity_done': 1})
- self.assertIsNone(pick_2.button_validate(), 'Sale Stock: second picking should be final without need for a backorder')
+ self.assertTrue(pick_2.button_validate(), 'Sale Stock: second picking should be final without need for a backorder')
self.assertEqual(self.so.invoice_status, 'to invoice', 'Sale Stock: so invoice_status should be "to invoice" after complete delivery')
del_qties = [sol.qty_delivered for sol in self.so.order_line]
del_qties_truth = [2.0 if sol.product_id.type in ['product', 'consu'] else 0.0 for sol in self.so.order_line]
@@ -104,7 +104,7 @@ class TestSaleStock(TestSale):
pick = self.so.picking_ids
pick.force_assign()
pick.move_lines.write({'quantity_done': 2})
- self.assertIsNone(pick.button_validate(), 'Sale Stock: complete delivery should not need a backorder')
+ self.assertTrue(pick.button_validate(), 'Sale Stock: complete delivery should not need a backorder')
del_qties = [sol.qty_delivered for sol in self.so.order_line]
del_qties_truth = [2.0 if sol.product_id.type in ['product', 'consu'] else 0.0 for sol in self.so.order_line]
self.assertEqual(del_qties, del_qties_truth, 'Sale Stock: delivered quantities are wrong after partial delivery')
diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index 314fee31e06..0017e805dd2 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -757,7 +757,7 @@ class Picking(models.Model):
if self._check_backorder():
return self.action_generate_backorder_wizard()
self.action_done()
- return
+ return True
def action_generate_backorder_wizard(self):
view = self.env.ref('stock.view_backorder_confirmation')
diff --git a/addons/web/static/src/less/fields.less b/addons/web/static/src/less/fields.less
index 4ac5643bf4d..aa61cb2a3c6 100644
--- a/addons/web/static/src/less/fields.less
+++ b/addons/web/static/src/less/fields.less
@@ -39,9 +39,7 @@
// Flex fields (inline)
&.o_field_many2one, &.o_field_radio, &.o_field_many2manytags, &.o_field_percent_pie, &.o_field_monetary, &.o_field_binary_file {
- @media (min-width: @screen-sm-min) {
- .o-inline-flex-display();
- }
+ .o-inline-flex-display();
> span, > button {
.o-flex(0, 0, auto);
}
@@ -185,6 +183,9 @@
// Radio buttons
&.o_field_radio {
+ @media (max-width: @screen-xs-max) {
+ display: inline-block;
+ }
.o_radio_input {
outline: none;
}