account-closing/account_invoice_start_end_dates/views/account_move.xml
2021-12-12 03:12:24 +00:00

71 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2013-2020 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<flectra>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">start_end_dates.view_move_line_form</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_form" />
<field name="arch" type="xml">
<field name="date_maturity" position="after">
<field name="must_have_dates" invisible="1" />
<field
name="start_date"
attrs="{'required': [('must_have_dates', '=', True)]}"
/>
<field
name="end_date"
attrs="{'required': [('must_have_dates', '=', True)]}"
/>
</field>
</field>
</record>
<record id="view_move_form" model="ir.ui.view">
<field name="name">start_end_dates.view_move_form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='invoice_line_ids']/tree/field[@name='quantity']"
position="before"
>
<field name="must_have_dates" invisible="1" />
<field
name="start_date"
attrs="{'required': [('must_have_dates', '=', True)]}"
optional="show"
/>
<field
name="end_date"
attrs="{'required': [('must_have_dates', '=', True)]}"
optional="show"
/>
</xpath>
<xpath
expr="//field[@name='invoice_line_ids']/form//field[@name='analytic_tag_ids']"
position="before"
>
<field name="must_have_dates" invisible="1" />
<field
name="start_date"
attrs="{'required': [('must_have_dates', '=', True)]}"
/>
<field
name="end_date"
attrs="{'required': [('must_have_dates', '=', True)]}"
/>
</xpath>
<xpath
expr="//field[@name='line_ids']/tree/field[@name='credit']"
position="after"
>
<field name="start_date" optional="hide" />
<field name="end_date" optional="hide" />
</xpath>
</field>
</record>
</flectra>