Skip to content

Commit

Permalink
[FIX] account_invoice_change_currency: the custom_rate field has a ba…
Browse files Browse the repository at this point in the history
…d position in supplier invoices. (OCA#458)
  • Loading branch information
hugho-ad authored and rolandojduartem committed Mar 31, 2022
1 parent 5a8253e commit 7f845ea
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions account_invoice_change_currency/views/account_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//form/header" position="inside">
- <field name="custom_rate" placeholder="Custom Rate" class="oe_inline" attrs="{'invisible': [('custom_rate', '=', 0)], 'readonly': [('state', '!=', 'draft')]}"/>
<button aria-label="Opened" type="object" name="action_account_change_currency" class="btn-link" states="draft" groups="account.group_account_manager">
<i title="Update Currency: Will convert the amount lines to the new currency set" class="fa fa-fw fa-refresh"/>
</button>
<xpath expr="//field[@name='currency_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='currency_id']" position="after">
<label for="currency_id" groups="base.group_multi_currency"/>
<div groups="base.group_multi_currency">
<field name="currency_id" options="{'no_create': True, 'no_open': True}" class="oe_inline"/>
- <field name="custom_rate" placeholder="Custom Rate" class="oe_inline" attrs="{'invisible': [('custom_rate', '=', 0)], 'readonly': [('state', '!=', 'draft')]}"/>
<button aria-label="Opened" type="object" name="action_account_change_currency" class="btn-link" states="draft" groups="account.group_account_manager">
<i title="Update Currency: Will convert the amount lines to the new currency set" class="fa fa-fw fa-refresh"/>
</button>
</div>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 7f845ea

Please sign in to comment.