Skip to content

Commit

Permalink
[FIX] account: disable creation of account.move.line in any view
Browse files Browse the repository at this point in the history
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#49002

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
  • Loading branch information
sswapnesh committed Apr 7, 2020
1 parent de4e67d commit 1db71a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,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>
Expand Down

0 comments on commit 1db71a9

Please sign in to comment.