2
0
account-financial-tools/account_spread_cost_revenue/views/account_move.xml

69 lines
3.0 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_invoice_spread" model="ir.ui.view">
<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="spread_check"
invisible="1"
groups="account.group_account_user,account.group_account_manager"
/>
<button
name="spread_details"
type="object"
class="btn btn-link"
icon="fa-arrow-circle-right"
title="Not linked to any spread board"
attrs="{'invisible': [('spread_check', '!=', 'unlinked')]}"
groups="account.group_account_user,account.group_account_manager"
/>
<button
name="spread_details"
type="object"
class="btn btn-success"
icon="fa-arrow-circle-right"
title="Linked to spread board"
attrs="{'invisible': [('spread_check', '!=', 'linked')]}"
groups="account.group_account_user,account.group_account_manager"
/>
</xpath>
<xpath
expr="//field[@name='line_ids']/tree//button[@name='action_automatic_entry']"
position="after"
>
<field
name="spread_check"
invisible="1"
groups="account.group_account_user,account.group_account_manager"
/>
<button
name="spread_details"
type="object"
class="btn btn-success"
icon="fa-arrow-circle-right"
title="Linked to spread board"
groups="account.group_account_user,account.group_account_manager"
attrs="{'invisible': [('spread_check', '!=', 'linked')], 'column_invisible': ['|', ('parent.move_type', '=', 'entry'), ('parent.state', '!=', 'posted')]}"
/>
</xpath>
</field>
</record>
<record id="action_account_moves_all_spread" model="ir.actions.act_window">
<field
name="context"
>{'journal_type':'general', 'search_default_group_by_move': 0, 'search_default_posted':1, 'name_groupby':1}</field>
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field
name="domain"
>[('display_type', 'not in', ('line_section', 'line_note'))]</field>
<field name="view_id" ref="account.view_move_line_tree" />
<field name="view_mode">tree,pivot,graph,form,kanban</field>
</record>
</odoo>