[FIX] account: disable creation of account.move.line in any view

Creating new `account.move.line` is already blocked at List/Form view but it was not disabled at Kanban views since it is needed for mobile views. Creating new AML from Kanban leads to traceback due to the required field.

In this commit, we pass `'create':0` in the action so user can not create new AML from any view.

closes odoo/odoo#49244

X-original-commit: 1db71a9968b09bc56eff11e54d4e5b52693196cf
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
Swapnesh Shah
2020-04-08 13:59:42 +00:00
parent 923988934a
commit d9a4f1a4fb
+1 -1
View File
@@ -1167,7 +1167,7 @@
view_id="account.view_move_line_tax_audit_tree"/>
<record id="action_account_moves_all_a" model="ir.actions.act_window">
<field name="context">{'journal_type':'general', 'search_default_group_by_move': 1, 'search_default_posted':1, 'name_groupby':1}</field>
<field name="context">{'journal_type':'general', 'search_default_group_by_move': 1, 'search_default_posted':1, 'name_groupby':1, 'create':0}</field>
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field>