From f295bdccadece90ac4c9f701dd55d60ebd394bff Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 27 Jul 2016 16:16:57 +0200 Subject: [PATCH 1/3] [FIX] stock: fix traceback of unlink of picking --- addons/stock/models/stock_picking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 6200ebc8227..0dd0fdf9c59 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -417,7 +417,8 @@ class Picking(models.Model): @api.multi def unlink(self): - self.mapped('move_lines').action_cancel().unlink() + self.mapped('move_lines').action_cancel() + self.mapped('move_lines').unlink() # Checks if moves are not done return super(Picking, self).unlink() # Actions From ec841b7fa17378578a3a56a957fd81c0fc9adc30 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 27 Jul 2016 17:09:49 +0200 Subject: [PATCH 2/3] [FIX] inventory: when creating partial inventory, it should also go to partial state --- addons/stock/models/stock_inventory.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py index 675b8b63e2d..f8e4133ba94 100644 --- a/addons/stock/models/stock_inventory.py +++ b/addons/stock/models/stock_inventory.py @@ -165,11 +165,11 @@ class Inventory(models.Model): @api.multi def action_start(self): - for inventory in self.filtered(lambda inventory: not inventory.line_ids and inventory.filter != 'partial'): - self.write({ - 'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()], - 'state': 'confirm', 'date': fields.Datetime.now() - }) + for inventory in self.filtered(lambda x: not x.line_ids): + vals = {'state': 'confirm', 'date': fields.Datetime.now()} + if inventory.filter != 'partial': + vals.update({'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()]}) + inventory.write(vals) return True prepare_inventory = action_start From 09e943429ee2b1e25b5179927c9a3a62b78cd76e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Sat, 30 Jul 2016 12:43:21 +0200 Subject: [PATCH 3/3] [FIX] website_sale: unable to edit product price The less refactoring in 5b65befcd889139152c590490fb8965c9f4b5279 wrongly removed the css directive that hide some elements in edit mode. As a side effect, the product price was appearing twice when editing a product. Commit 44ca4317a93c4cd9a80aadba4cebf3c708bd1513 tempt to fix it but removed the edition part. opw:683343 --- addons/web_editor/static/src/less/web_editor.common.less | 4 ++++ addons/website_sale/views/templates.xml | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/addons/web_editor/static/src/less/web_editor.common.less b/addons/web_editor/static/src/less/web_editor.common.less index 0af28ca1daf..53d9ba46377 100644 --- a/addons/web_editor/static/src/less/web_editor.common.less +++ b/addons/web_editor/static/src/less/web_editor.common.less @@ -8,6 +8,10 @@ html, body { display: none !important; } +.editor_enable .css_editable_mode_hidden { + display: none !important; +} + /* ----- Editor (for public user, like forum) ----- */ .note-toolbar { margin-left: 0 !important; diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index f47c5dbe381..0eb173a800a 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -434,6 +434,13 @@ +

+ +