From a5ca63c83beafd9a060ac58d3b4c6a9a987b28df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 20 Sep 2017 12:19:40 +0200 Subject: [PATCH] [FIX] sale: add force_save to make sure SO is correct Before the new views (SAAS15 and before), the 'readonly' modifier was kind of weird: a field which was in a readonly state was not saved (the field was not present in the RPC), UNLESS it is a subfield (for a x2many). With the new views, we changed the semantics, to make it more consistent: fields in readonly state are never sent to the server. This is a much simpler semantic, but it may introduce some problems, when we actually want to save the record. This is solved with a new attribute 'force_save', where we explicitely have to declare which fields should be save, even if they are in readonly mode. In this commit, we simply add the missing force_save attribute to the order line form view. This allow the user to create a new SO, add an order line with some invoice line, and save the result (without this, the server complains about a missing product_id field) --- addons/sale/views/sale_views.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 5c30cb820f0..69a5b997651 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -207,6 +207,7 @@