summaryrefslogtreecommitdiff
path: root/odoo/addons/test_testing_utilities/ir.model.access.csv
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2019-03-22 12:22:04 +0000
committerXavier Morel <xmo@odoo.com>2019-04-03 08:44:22 +0000
commitef8df8fb4efeb61ea1880cbe04c0a6bf74d5fc37 (patch)
treee413ec63227b6ab8bcdd06a89405d43135af3df5 /odoo/addons/test_testing_utilities/ir.model.access.csv
parent922d77a29100453d831f61df9411715b383605df (diff)
[FIX] core: don't send readonly fields in o2m in SSF
The SSF would correctly filter out readonly fields when saving a toplevel form, however it could not remove readonly values when saving o2m pseudo-records to the parent form (as these would be expected to remain available for reading upon the next edition and whatnot), so these values would get sent in 0/1 commands. Filter out these fields during the parent / toplevel save call. Complexity notes: * evaluating readonly modifiers requires the entire record, so unchanged fields still have to be written back to the parent form and be filtered out when *it* is set up for save, an alternative would be to store the `changed` and `readonly` flags alongside the record dict, and have the post-process only override the pre-computed readonly flag using force_save * had to fix a test to match the new behaviour, the post-edition states turns out to be in line with the client's behaviour (or how it looks anyway) Fixes #32019
Diffstat (limited to 'odoo/addons/test_testing_utilities/ir.model.access.csv')
-rw-r--r--odoo/addons/test_testing_utilities/ir.model.access.csv2
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/addons/test_testing_utilities/ir.model.access.csv b/odoo/addons/test_testing_utilities/ir.model.access.csv
index be5208234d3..c43b736c531 100644
--- a/odoo/addons/test_testing_utilities/ir.model.access.csv
+++ b/odoo/addons/test_testing_utilities/ir.model.access.csv
@@ -17,3 +17,5 @@ access_test_testing_utilities_onchange_parent,access_test_testing_utilities_onch
access_test_testing_utilities_onchange_line,access_test_testing_utilities_onchange_line,model_test_testing_utilities_onchange_line,,1,0,0,0
access_model_test_testing_utilities_onchange_count,access_model_test_testing_utilities_onchange_count,model_test_testing_utilities_onchange_count,,1,1,1,1
access_test_testing_utilities_onchange_count_sub,access_test_testing_utilities_onchange_count_sub,model_test_testing_utilities_onchange_count_sub,,1,1,1,1
+access_o2m_readonly_subfield_parent,access_o2m_readonly_subfield_parent,model_o2m_readonly_subfield_parent,,1,1,1,1
+access_o2m_readonly_subfield_child,access_o2m_readonly_subfield_child,model_o2m_readonly_subfield_child,,1,1,1,1