-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpayment_selection.xml
More file actions
73 lines (67 loc) · 4.03 KB
/
Copy pathpayment_selection.xml
File metadata and controls
73 lines (67 loc) · 4.03 KB
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
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- the wizard which will launch the refresh -->
<record id="view_account_move_line_goodtopay" model="ir.ui.view">
<field name="name">account.move.line.goodtopay.form</field>
<field name="model">account.move.line.goodtopay</field>
<field name="arch" type="xml">
<form string="Mark as good to pay" version="7.0">
<group string="Are you sure?">
<field name="journal_id" />
<field name="generate_report" />
<field name="total_amount" readonly="1" />
<field name="nb_lines" readonly="1" />
<field name="context_saved" invisible="1" />
<field name="view_selection" on_change="onchange_view_selector(view_selection, partner_id, context_saved)"/>
<field name="partner_id" attrs="{'invisible': [('view_selection', '=', 'complete')]}" options="{'create': False, 'create_edit': False}" on_change="onchange_partner_id(partner_id, context_saved)"/>
</group>
<field name="line_ids" on_change="onchange_line_ids(view_selection, partner_id, line_ids, context_saved)"
domain="['|', ('reconcile_id', '=', False), ('reconcile_partial_id', '!=', False), ('account_id.type', 'in', ['payable','receivable']), ('state', '=', 'valid'), ('move_id.state', '=', 'posted')]">
<tree>
<field invisible="1" name="state"/>
<field invisible="1" name="reconcile_id" />
<field invisible="1" name="reconcile_partial_id" />
<field invisible="1" name="move_id" />
<field readonly="1" name="period_id" />
<field readonly="1" name="account_id" />
<field readonly="1" name="ref" />
<field readonly="1" name="name" />
<field readonly="1" name="date_maturity" />
<field readonly="1" name="debit"/>
<field readonly="1" name="credit"/>
<field readonly="1" name="debit_curr" />
<field readonly="1" name="credit_curr" />
<field readonly="1" name="currency_id" />
</tree>
</field>
<footer>
<button string="Validate" name="good_to_pay"
type="object" class="oe_highlight" />
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<!-- a simple action that pops a new wizard up for payment selection -->
<record id="action_mark_as_good_to_pay" model="ir.actions.act_window">
<field name="name">Mark as good to pay</field>
<field name="res_model">account.move.line.goodtopay</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_line_goodtopay" />
<field name="target">new</field>
</record>
<!-- contextual menu for account.move.line to make them as good to pay -->
<record id="value_contextual_action_payment_selection" model="ir.values">
<field name="model_id" ref="model_account_move_line" />
<field name="name">Mark as good to pay</field>
<field name="key2">client_action_multi</field>
<field name="value"
eval="'ir.actions.act_window,' + str(ref('action_mark_as_good_to_pay'))" />
<field name="key">action</field>
<field name="model">account.move.line</field>
</record>
</data>
</openerp>