9
9
<field name="arch" type="xml">
10
10
<form string="Accrual Line">
11
11
<group colspan="2" col="4">
12
<field name="date" colspan="2" readonly="1"/>
13
<field name="period_id" colspan="2" on_change="onchange_period(period_id)"/>
15
<field name="description" colspan="4"/>
17
<field name="reference" colspan="4"/>
12
<field name="date" colspan="2" readonly="1"/>
13
<field name="document_date"/>
14
<field name="period_id" colspan="2" on_change="onchange_period(period_id)"/>
16
<field name="description" colspan="2"/>
17
<field name="reference" colspan="2"/>
19
19
<field name="third_party_type"/>
20
<field name="partner_id" nolabel="1" attrs="{'required': [('third_party_type', '=', 'res.partner')], 'invisible': [('third_party_type', '!=', 'res.partner')]}"/>
21
<field name="employee_id" nolabel="1" attrs="{'required': [('third_party_type', '=', 'hr.employee')], 'invisible': [('third_party_type', '!=', 'hr.employee')]}"/>
23
<field name="expense_account_id" colspan="2"/>
24
<field name="accrual_account_id" colspan="2"/>
26
<field name="journal_id" colspan="2" readonly="1"/>
28
<field name="accrual_amount" colspan="2"/>
29
<field name="currency_id" colspan="2"/>
20
<field name="partner_id" nolabel="1"
21
attrs="{'required': [('third_party_type', '=', 'res.partner')], 'invisible': [('third_party_type', '!=', 'res.partner')]}"/>
22
<field name="employee_id" nolabel="1"
23
attrs="{'required': [('third_party_type', '=', 'hr.employee')], 'invisible': [('third_party_type', '!=', 'hr.employee')]}"/>
25
<field name="expense_account_id" colspan="2"/>
26
<field name="accrual_account_id" colspan="2" domain="[('accrual_account', '=', True)]"/>
28
<field name="journal_id" colspan="2" readonly="1"/>
30
<field name="accrual_amount" colspan="2"/>
31
<field name="currency_id" colspan="2"/>
33
<field name="state" colspan="2" readonly="1"/>
34
<button name="button_cancel" string="Cancel" states="posted" type="object" icon="gtk-cancel"/>
35
<record id="view_msf_accrual_line_tree" model="ir.ui.view">
36
<field name="name">msf.accrual.line.tree</field>
37
<field name="model">msf.accrual.line</field>
38
<field name="type">tree</field>
39
<field name="arch" type="xml">
40
<tree string="Accruals Management" colors="red:not analytic_distribution_id; blue:analytic_distribution_id and state != 'posted'; black: state == 'posted'">
41
<button name="button_duplicate" string="Duplicate" type="object" icon="gtk-copy" />
43
<field name="period_id"/>
44
<field name="description"/>
45
<field name="reference"/>
46
<field name="third_party_name"/>
40
<record id="view_msf_accrual_line_tree" model="ir.ui.view">
41
<field name="name">msf.accrual.line.tree</field>
42
<field name="model">msf.accrual.line</field>
43
<field name="type">tree</field>
44
<field name="arch" type="xml">
45
<tree string="Accruals Management"
46
colors="red:not analytic_distribution_id; blue:analytic_distribution_id and state != 'posted'; black: state == 'posted'">
47
<button name="button_duplicate" string="Duplicate" type="object" icon="gtk-copy" />
49
<field name="document_date"/>
50
<field name="period_id"/>
51
<field name="description"/>
52
<field name="reference"/>
53
<field name="third_party_name"/>
47
54
<field name="analytic_distribution_id" invisible="1"/>
48
<button name="button_analytic_distribution" string="Analytical Distribution" type="object" icon="terp-stock_symbol-selection" context="context"/>
49
<field name="expense_account_id"/>
50
<field name="accrual_account_id"/>
51
<field name="accrual_amount"/>
52
<field name="currency_id"/>
53
<field name="functional_amount"/>
54
<field name="functional_currency_id"/>
60
<record id="view_msf_accrual_line_search" model="ir.ui.view">
61
<field name="name">msf.accrual.line.search</field>
62
<field name="model">msf.accrual.line</field>
63
<field name="type">search</field>
64
<field name="arch" type="xml">
65
<search string="Accruals Management">
67
<filter name="draft" icon="terp-check" string="Draft"
68
domain="[('state', '=', 'draft')]"/>
69
<separator orientation="vertical"/>
55
<button name="button_analytic_distribution" string="Analytical Distribution" type="object"
56
icon="terp-stock_symbol-selection" context="context"/>
57
<field name="expense_account_id"/>
58
<field name="accrual_account_id"/>
59
<field name="accrual_amount"/>
60
<field name="currency_id"/>
61
<field name="functional_amount"/>
62
<field name="functional_currency_id"/>
68
<record id="view_msf_accrual_line_search" model="ir.ui.view">
69
<field name="name">msf.accrual.line.search</field>
70
<field name="model">msf.accrual.line</field>
71
<field name="type">search</field>
72
<field name="arch" type="xml">
73
<search string="Accruals Management">
75
<filter name="draft" icon="terp-check" string="Draft"
76
domain="[('state', '=', 'draft')]"/>
77
<separator orientation="vertical"/>
70
78
<field name="period_id"/>
71
<field name="expense_account_id"/>
72
<field name="accrual_account_id"/>
78
<record id="action_msf_accrual_line_tree" model="ir.actions.act_window">
79
<field name="name">Accruals Management</field>
80
<field name="res_model">msf.accrual.line</field>
81
<field name="view_type">form</field>
82
<field name="view_mode">tree,form</field>
79
<field name="expense_account_id"/>
80
<field name="accrual_account_id"/>
86
<record id="action_msf_accrual_line_tree" model="ir.actions.act_window">
87
<field name="name">Accruals Management</field>
88
<field name="res_model">msf.accrual.line</field>
89
<field name="view_type">form</field>
90
<field name="view_mode">tree,form</field>
83
91
<field name="context">{'search_default_draft':1}</field>
86
<menuitem action="action_msf_accrual_line_tree" id="menu_action_msf_accrual_line_tree" parent="account.menu_finance_periodical_processing"/>
94
<menuitem action="action_msf_accrual_line_tree" id="menu_action_msf_accrual_line_tree"
95
parent="account.menu_finance_periodical_processing"/>