|
1 | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <!-- Copyright 2022 ACSONE SA/NV |
3 | | - License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
| 3 | + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
4 | 4 | <odoo> |
5 | 5 | <record model="ir.ui.view" id="contract_line_form_view"> |
6 | 6 | <field name="model">contract.line</field> |
|
9 | 9 | >contract.line.form (in contract_update_last_date_invoiced)</field> |
10 | 10 | <field name="inherit_id" ref="contract.contract_line_form_view" /> |
11 | 11 | <field name="arch" type="xml"> |
12 | | - <xpath expr="//field[@name='last_date_invoiced']" position="before"> |
| 12 | + <!-- Replace the last_date_invoiced field with a div containing field + button --> |
| 13 | + <xpath |
| 14 | + expr="//group[@name='next_period_dates']//field[@name='last_date_invoiced']" |
| 15 | + position="replace" |
| 16 | + > |
| 17 | + <label for="last_date_invoiced" /> |
13 | 18 | <div class="o_row"> |
14 | | - <div class="last_date_invoiced_wrapper"> |
15 | | - <label for="last_date_invoiced" /> |
16 | | - </div> |
| 19 | + <field name="last_date_invoiced" readonly="True" /> |
17 | 20 | <button |
18 | 21 | name="action_update_last_date_invoiced" |
19 | 22 | type="object" |
20 | | - string="Update Invoice Dates" |
| 23 | + title="Update Last Date Invoiced" |
21 | 24 | invisible="display_type" |
22 | 25 | groups="contract_update_last_date_invoiced.group_contract_line_update_last_date_invoiced" |
23 | | - class="oe_inline btn-secondary" |
| 26 | + class="btn btn-link p-0" |
24 | 27 | icon="fa-refresh" |
25 | 28 | /> |
26 | 29 | </div> |
27 | 30 | </xpath> |
28 | | - <xpath expr="//field[@name='last_date_invoiced']" position="attributes"> |
29 | | - <attribute name="class" add="oe_inline" separator=" " /> |
30 | | - </xpath> |
31 | | - <xpath |
32 | | - expr="//div[hasclass('last_date_invoiced_wrapper')]" |
33 | | - position="inside" |
34 | | - > |
35 | | - <xpath expr="//field[@name='last_date_invoiced']" position="move" /> |
36 | | - </xpath> |
37 | 31 | </field> |
38 | 32 | </record> |
39 | 33 | </odoo> |
0 commit comments