|
10 | 10 | <label
|
11 | 11 | for="manual_currency"
|
12 | 12 | groups="base.group_multi_currency"
|
13 |
| - attrs="{'invisible': [('is_manual', '=', False)]}" |
| 13 | + invisible="not is_manual" |
14 | 14 | />
|
15 |
| - <div |
16 |
| - groups="base.group_multi_currency" |
17 |
| - attrs="{'invisible': [('is_manual', '=', False)]}" |
18 |
| - > |
19 |
| - <field name="manual_currency" /> |
| 15 | + <div groups="base.group_multi_currency" invisible="not is_manual"> |
| 16 | + <field name="manual_currency" readonly="state != 'draft'" /> |
20 | 17 | <label for="manual_currency_rate" invisible='1' />
|
21 |
| - <div |
22 |
| - class="o_row" |
23 |
| - attrs="{'invisible': [('manual_currency', '=', False)]}" |
24 |
| - > |
25 |
| - <field name="manual_currency_rate" /> |
| 18 | + <div class="o_row" invisible="not manual_currency"> |
| 19 | + <field |
| 20 | + name="manual_currency_rate" |
| 21 | + readonly="state != 'draft'" |
| 22 | + /> |
26 | 23 | <field
|
27 | 24 | name="type_currency"
|
28 |
| - attrs="{'required': [('manual_currency', '=', True)]}" |
| 25 | + required="manual_currency" |
| 26 | + readonly="state != 'draft'" |
29 | 27 | />
|
30 | 28 | <button
|
31 | 29 | aria-label="Opened"
|
32 | 30 | type="object"
|
33 | 31 | name="action_refresh_currency"
|
34 | 32 | class="btn-link"
|
35 |
| - states="draft" |
| 33 | + invisible="state != 'draft'" |
36 | 34 | >
|
37 | 35 | <i title="Update Currency" class="fa fa-fw fa-refresh" />
|
38 | 36 | </button>
|
|
46 | 44 | <field name="subtotal_company_currency" />
|
47 | 45 | <field name="company_currency_id" invisible="1" />
|
48 | 46 | </xpath>
|
49 |
| - <xpath expr="//field[@name='tax_totals_json']" position="before"> |
50 |
| - <field |
51 |
| - name="total_company_currency" |
52 |
| - attrs="{'invisible': [('currency_diff', '=', False)]}" |
53 |
| - /> |
| 47 | + <xpath expr="//field[@name='tax_totals']" position="before"> |
| 48 | + <field name="total_company_currency" invisible="not currency_diff" /> |
54 | 49 | <field name="company_currency_id" invisible="1" />
|
55 | 50 | <field name="currency_diff" invisible="1" />
|
56 | 51 | </xpath>
|
|
0 commit comments