forked from OCA/account-closing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
account_cutoff_view.xml
115 lines (100 loc) · 5.07 KB
/
account_cutoff_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<!-- Form view -->
<record id="account_cutoff_form" model="ir.ui.view">
<field name="name">account.cutoff.prepaid.form</field>
<field name="model">account.cutoff</field>
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_form"/>
<field name="arch" type="xml">
<button name="back2draft" position="after">
<button class="oe_highlight" name="get_prepaid_lines" string="Re-Generate Lines" type="object" states="draft" invisible="'prepaid' not in context.get('type', '-')"/>
</button>
<field name="cutoff_date" position="after">
<field name="source_journal_ids" widget="many2many_tags" invisible="'prepaid' not in context.get('type', '-')"/>
</field>
</field>
</record>
<!-- Form view for lines -->
<record id="account_cutoff_line_form" model="ir.ui.view">
<field name="name">account.cutoff.line.prepaid.form</field>
<field name="model">account.cutoff.line</field>
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_line_form"/>
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="move_line_id" invisible="'prepaid' not in context.get('type', '-')"/>
<field name="move_date" invisible="'prepaid' not in context.get('type', '-')" />
<field name="invoice_id" invisible="'prepaid' not in context.get('type', '-')" />
</field>
<field name="name" position="after">
<field name="start_date" invisible="'prepaid' not in context.get('type', '-')"/>
<field name="end_date" invisible="'prepaid' not in context.get('type', '-')"/>
</field>
<field name="cutoff_amount" position="before">
<field name="total_days" invisible="'prepaid' not in context.get('type', '-')"/>
<field name="after_cutoff_days" invisible="'prepaid' not in context.get('type', '-')"/>
</field>
</field>
</record>
<!-- Tree view for lines -->
<record id="account_cutoff_line_tree" model="ir.ui.view">
<field name="name">account.cutoff.line.prepaid.tree</field>
<field name="model">account.cutoff.line</field>
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_line_tree"/>
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="move_line_id" invisible="'prepaid' not in context.get('type', '-')"/>
</field>
<field name="analytic_account_code" position="after">
<field name="start_date" invisible="'prepaid' not in context.get('type', '-')"/>
<field name="end_date" invisible="'prepaid' not in context.get('type', '-')"/>
<field name="total_days" string="Days Total" invisible="'prepaid' not in context.get('type', '-')"/>
<field name="after_cutoff_days" string="Days after Cut-off" invisible="'prepaid' not in context.get('type', '-')"/>
</field>
</field>
</record>
<record id="account_cutoff_prepaid_expense_action" model="ir.actions.act_window">
<field name="name">Prepaid Expense</field>
<field name="res_model">account.cutoff</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type', '=', 'prepaid_expense')]</field>
<field name="context">{'type': 'prepaid_expense'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start preparing a new prepaid expense.
</p><p>
This view can be used by accountants in order to collect information about prepaid expenses based on start date and end date. It then allows to generate the corresponding cutoff journal entry in one click.
</p>
</field>
</record>
<menuitem id="account_cutoff_prepaid_expense_menu"
parent="account_cutoff_base.cutoff_menu"
action="account_cutoff_prepaid_expense_action"
sequence="25"/>
<record id="account_cutoff_prepaid_revenue_action" model="ir.actions.act_window">
<field name="name">Prepaid Revenue</field>
<field name="res_model">account.cutoff</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type', '=', 'prepaid_revenue')]</field>
<field name="context">{'type': 'prepaid_revenue'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start preparing a new prepaid revenue.
</p><p>
This view can be used by accountants in order to collect information about prepaid revenues based on start date and end date. It then allows to generate the corresponding cutoff journal entry in one click.
</p>
</field>
</record>
<menuitem id="account_cutoff_prepaid_revenue_menu"
parent="account_cutoff_base.cutoff_menu"
action="account_cutoff_prepaid_revenue_action"
sequence="20"/>
</data>
</openerp>