From 614babd1e78e4ea329c3628bedbca652207b7867 Mon Sep 17 00:00:00 2001
From: Nicolas Martinelli <nim@odoo.com>
Date: Wed, 16 Jan 2019 11:09:21 +0000
Subject: [PATCH] [FIX] account: bank statement with many AML

- Create a bank statement with more than 80 lines (therefore more than
  80 AML)
- Reconcile the lines
- Go back to the bank statement, and try to add a new line

An error arise:
"You cannot do this modification on a posted journal entry, you can just
change some non legal fields"

The error arise on the `move_line_ids` field on which the web client
tries to write.

Actually, this field is hidden since it is only used in the domain of a
stat button. We can make it read-only.

opw-1921138

closes odoo/odoo#30266
---
 addons/account/views/account_view.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml
index 6d7434b65bdc..6973755853bc 100644
--- a/addons/account/views/account_view.xml
+++ b/addons/account/views/account_view.xml
@@ -559,7 +559,7 @@
                         <button class="oe_stat_button" name="button_journal_entries"
                                 string="Journal Entries" type="object"
                                 attrs="{'invisible':[('move_line_ids','=',[])]}" icon="fa-bars"/>
-                        <field name="move_line_ids" invisible="1"/>
+                        <field name="move_line_ids" invisible="1" readonly="1"/>
                     </div>
                     <div class="oe_title oe_inline">
                         <label for="name" class="oe_edit_only"/>
-- 
GitLab