2020-01-29 18:37:08 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
2018-08-05 20:33:56 +02:00
|
|
|
<odoo>
|
2020-01-29 18:37:08 +01:00
|
|
|
<record id="view_move_form" model="ir.ui.view">
|
|
|
|
<field name="name">account.move.form.account.asset.management</field>
|
|
|
|
<field name="model">account.move</field>
|
|
|
|
<field name="inherit_id" ref="account.view_move_form" />
|
|
|
|
<field name="arch" type="xml">
|
2021-02-11 13:03:58 +01:00
|
|
|
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
2021-02-11 16:13:21 +01:00
|
|
|
<button
|
|
|
|
name="action_view_assets"
|
|
|
|
type="object"
|
|
|
|
class="oe_stat_button"
|
|
|
|
icon="fa-cube"
|
|
|
|
attrs="{'invisible': [('asset_count', '=', 0)]}"
|
2022-12-24 01:28:55 +01:00
|
|
|
groups="account.group_account_invoice"
|
2021-02-11 16:13:21 +01:00
|
|
|
>
|
2021-02-11 13:03:58 +01:00
|
|
|
<div class="o_field_widget o_stat_info">
|
2021-02-11 16:13:21 +01:00
|
|
|
<span class="o_stat_value">
|
|
|
|
<field name="asset_count" />
|
|
|
|
</span>
|
2021-02-11 13:03:58 +01:00
|
|
|
<span class="o_stat_text"> Asset(s)</span>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
</xpath>
|
2020-01-29 18:37:08 +01:00
|
|
|
<xpath
|
|
|
|
expr="//field[@name='invoice_line_ids']/tree/field[@name='quantity']"
|
|
|
|
position="before"
|
|
|
|
>
|
|
|
|
<field
|
|
|
|
name="asset_profile_id"
|
2021-05-04 12:59:53 +02:00
|
|
|
attrs="{'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}"
|
2021-05-04 13:59:29 +02:00
|
|
|
optional="show"
|
2022-12-24 01:28:55 +01:00
|
|
|
groups="account.group_account_invoice"
|
2020-01-29 18:37:08 +01:00
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="asset_id"
|
2021-05-04 12:59:53 +02:00
|
|
|
attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"
|
2022-12-24 01:28:55 +01:00
|
|
|
groups="account.group_account_manager,account.group_account_invoice"
|
2021-05-04 13:59:29 +02:00
|
|
|
optional="show"
|
2020-01-29 18:37:08 +01:00
|
|
|
/>
|
|
|
|
</xpath>
|
2023-06-28 20:22:38 +02:00
|
|
|
<xpath
|
|
|
|
expr="//field[@name='invoice_line_ids']/form/sheet/group/field[@name='quantity']"
|
|
|
|
position="before"
|
|
|
|
>
|
|
|
|
<field
|
|
|
|
name="asset_profile_id"
|
|
|
|
attrs="{'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="asset_id"
|
|
|
|
attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"
|
|
|
|
groups="account.group_account_manager"
|
|
|
|
/>
|
|
|
|
</xpath>
|
2020-01-29 18:37:08 +01:00
|
|
|
<xpath
|
|
|
|
expr="//notebook//field[@name='line_ids']/tree/field[@name='date_maturity']"
|
|
|
|
position="after"
|
|
|
|
>
|
2021-02-11 16:13:21 +01:00
|
|
|
<field
|
|
|
|
name="asset_profile_id"
|
|
|
|
domain="[('company_id','=', parent.company_id)]"
|
2021-10-30 15:05:14 +02:00
|
|
|
optional="hide"
|
2022-12-24 01:28:55 +01:00
|
|
|
groups="account.group_account_invoice"
|
2021-10-30 15:05:14 +02:00
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="asset_id"
|
2022-12-24 01:28:55 +01:00
|
|
|
groups="account.group_account_manager,account.group_account_invoice"
|
2021-10-30 15:05:14 +02:00
|
|
|
optional="show"
|
2021-02-11 16:13:21 +01:00
|
|
|
/>
|
2020-01-29 18:37:08 +01:00
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
2018-08-05 20:33:56 +02:00
|
|
|
</odoo>
|