Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]account_ux: Change currency button also visible for invoicing user #500

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions account_ux/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,19 @@
<attribute name="force_save">1</attribute>
</field>

<field name="currency_id" position="after">
<button name="%(action_account_change_currency)d" type="action" attrs="{'invisible':[('state','!=','draft')]}" icon="fa-pencil" class="btn-link"/>
<xpath expr="//group[@id='header_right_group']/div/field[@name='currency_id']" position="after">
<button name="%(action_account_change_currency)d" type="action" attrs="{'invisible':[('state','!=','draft')]}" icon="fa-pencil" class="btn-link"
groups="account.group_account_readonly"/>
<field name="other_currency" invisible="1"/>
</field>
</xpath>

<xpath expr="//group[@id='header_right_group']/field[@name='currency_id']" position="replace">
<label for="currency_id" groups="!account.group_account_readonly,base.group_multi_currency"/>
<div groups="!account.group_account_readonly,base.group_multi_currency">
<field name="currency_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<button name="%(action_account_change_currency)d" type="action" attrs="{'invisible':[('state','!=','draft')]}" icon="fa-pencil" class="btn-link"/>
</div>
</xpath>

<label for="journal_id" position="attributes">
<attribute name="groups">account.group_account_invoice</attribute>
Expand Down