Improve search and pivot view of account.move.line
This commit is contained in:
@@ -316,6 +316,11 @@ module -->
|
|||||||
<field name="model">account.move.line</field>
|
<field name="model">account.move.line</field>
|
||||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<filter domain="[('move_id.state','=','draft')]" position="before">
|
||||||
|
<filter name="current_year" string="Current Year" domain="[('date', '>=', (context_today().strftime('%Y-01-01'))), ('date', '<=', (context_today().strftime('%Y-12-31')))]"/>
|
||||||
|
<filter name="previous_year" string="Previous Year" domain="[('date', '>=', (context_today() + relativedelta(day=1, month=1, years=-1)).strftime('%Y-%m-%d')), ('date', '<=', (context_today() + relativedelta(day=31, month=12, years=-1)).strftime('%Y-%m-%d'))]"/>
|
||||||
|
<separator/>
|
||||||
|
</filter>
|
||||||
<field name="partner_id" position="after">
|
<field name="partner_id" position="after">
|
||||||
<field name="reconcile_string" />
|
<field name="reconcile_string" />
|
||||||
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
||||||
@@ -381,6 +386,22 @@ module -->
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- By default, the pivot view displays the journal as row
|
||||||
|
which is really not interesting from an accountant point of view
|
||||||
|
So I prefer to display account_id by default on row.
|
||||||
|
The only drawback is that it makes quite a big pivot table
|
||||||
|
by default -->
|
||||||
|
<record id="view_move_line_pivot" model="ir.ui.view">
|
||||||
|
<field name="name">usability.account.move.line.pivot</field>
|
||||||
|
<field name="model">account.move.line</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_line_pivot"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="journal_id" position="replace">
|
||||||
|
<field name="account_id" type="row"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="view_account_move_filter" model="ir.ui.view">
|
<record id="view_account_move_filter" model="ir.ui.view">
|
||||||
<field name="name">account_usability.account_move_search</field>
|
<field name="name">account_usability.account_move_search</field>
|
||||||
<field name="model">account.move</field>
|
<field name="model">account.move</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user