Skip to content

Commit

Permalink
[FIX] account_move_update_analytic: Switch button text to icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Shide committed Sep 21, 2023
1 parent 1e9227a commit 38aa98b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions account_move_update_analytic/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
"views/account_move_line_view.xml",
],
"installable": True,
"maintainers": ["remi-filament", "Shide"],
}
8 changes: 6 additions & 2 deletions account_move_update_analytic/views/account_move_line_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
<field name="analytic_tag_ids" position="after">
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
string="Update Analytic"
type="action"
groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"
attrs="{'invisible': [('parent_state', '!=', 'posted')]}"
icon="fa-tags"
title="Update analytic account and tags"
aria-label="Update analytic account and tags"
/>
</field>
</field>
Expand All @@ -28,10 +30,12 @@
<field name="analytic_tag_ids" position="after">
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
string="Update Analytic"
type="action"
groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"
attrs="{'invisible': [('parent_state', '!=', 'posted'),]}"
icon="fa-tags"
title="Update analytic account and tags"
aria-label="Update analytic account and tags"
/>
</field>
</field>
Expand Down
8 changes: 6 additions & 2 deletions account_move_update_analytic/views/account_move_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
<field name="parent_state" invisible="1" />
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
string="Update Analytic"
type="action"
groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"
attrs="{'column_invisible': [('parent.state', '!=', 'posted')]}"
icon="fa-tags"
title="Update analytic account and tags"
aria-label="Update analytic account and tags"
/>
</xpath>
<xpath
Expand All @@ -29,13 +31,15 @@
<field name="parent_state" invisible="1" />
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
string="Update Analytic"
type="action"
groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"
attrs="{
'column_invisible': [('parent.state', '!=', 'posted')],
'invisible': [('display_type', 'in', ('line_section', 'line_note'))],
}"
icon="fa-tags"
title="Update analytic account and tags"
aria-label="Update analytic account and tags"
/>
</xpath>
</field>
Expand Down

0 comments on commit 38aa98b

Please sign in to comment.