1
<?xml version="1.0" encoding="utf-8"?>
4
<record id="view_loan_append_form" model="ir.ui.view">
5
<field name="name">loan.append.form</field>
6
<field name="model">loan.append</field>
7
<field name="type">form</field>
8
<field name="arch" type="xml">
9
<form string="Append loan amount" version="7.0">
11
<button name="action_append_cancel" states="draft,confirmed" string="Cancel" icon="gtk-cancel" type="object"/>
12
<button name="action_confirm_append" states="draft" string="To Confirm" type="object" icon="STOCK_EDIT"/>
13
<button name="action_approve_append" states="confirmed" string="To Approve" icon="gtk-apply" type="object"/>
14
<button name="action_payment_append" states="approved" string="Config Payment" icon="gtk-paste-v" type="object"/>
15
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,approved,paid,done" statusbar_colors='{"cancel":"red","confirmed":"blue","approved":"blue"}' readonly="1"/>
17
<group col="4" colspan="4">
19
<field name="date_order"/>
20
<field name="contract_id" on_change="onchange_contract_id(contract_id,date_order)"/>
21
<field name="partner_id"/>
22
<field name="product_id"/>
23
<separator colspan="4"/>
24
<field name="validator"/>
25
<field name="date_approve"/>
26
<notebook colspan="4">
27
<page string="Loan information">
28
<group col="4" colspan="4">
29
<field name="amount"/>
30
<field name="payment_day"/>
31
<field name="end_of_month"/>
32
<field name="period"/>
33
<field name="interest"/>
34
<field name="balance"/>
35
<field name="installment_date"/>
36
<field name="close_date"/>
37
<field name="current_economist"/>
41
<page string="Graphic">
42
<group col="4" colspan="4">
43
<field name="schedule_type" on_change="onchange_schedule_type(schedule_type,interest,amount,period,balance)"/>
44
<field name="fixed_payment" attrs="{'invisible':[('schedule_type','in',['type5'])],'required':[('schedule_type','!=','type5')]}"/>
46
<group col="4" colspan="4">
47
<button string="Create graphic" name="calc_graphics" colspan="1" type="object" icon="gtk-execute" states="draft,confirmed"/>
48
<button string="Reset" name="reset_graphics" colspan="1" type="object" icon="STOCK_CLEAR" states="draft,confirmed"/>
49
<button string="Print" name="print_graphics" colspan="1" type="object" icon="gtk-print"/>
52
<field name="schedules" nolabel="1" colspan="4"/>
55
<field colspan="4" name="notes" nolabel="1"/>
60
<field name="payment_type" attrs="{'invisible':[('state','!=','approved')],'required':[('state','=','approved')]}"/>
61
<field name="cash_journal" on_change="onchange_journal(payment_type,cash_journal,product_id)"
62
attrs="{'invisible':[('payment_type','!=','cash')],'required':[('payment_type','=','cash')]}"/>
63
<field name="bank_journal" on_change="onchange_journal(payment_type,bank_journal,product_id)"
64
attrs="{'invisible':[('payment_type','!=','bank')],'required':[('payment_type','=','bank')]}"/>
70
<record id="view_loan_append_search" model="ir.ui.view">
71
<field name="name">loan.append.search</field>
72
<field name="model">loan.append</field>
73
<field name="type">search</field>
74
<field name="arch" type="xml">
75
<search string="Appended loan contract">
77
<filter icon="STOCK_JUSTIFY_LEFT" name="draft" string="Request" domain="[('state','=','draft')]"/>
78
<filter icon="STOCK_EDIT" string="Confirmed" domain="[('state','=','confirmed')]"/>
79
<filter icon="terp-check" string="Approved" domain="[('state','=','approved')]"/>
80
<filter icon="gtk-media-play" name="paid" string="Appended" domain="[('state','=','paid')]"/>
83
<field name="contract_id"/>
84
<field name="amount"/>
87
<group expand="0" string="Group By...">
88
<filter string="State" icon="terp-stage" domain="" context="{'group_by':'state'}"/>
89
<filter string="Partner" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'partner_id'}"/>
95
<record id="view_loan_append_tree" model="ir.ui.view">
96
<field name="name">loan.append.tree</field>
97
<field name="model">loan.append</field>
98
<field name="type">tree</field>
99
<field name="arch" type="xml">
100
<tree colors="black:state == 'draft';blue:state in ('confirmed','approved');gray:state == 'paid'" string="Append loan amount" toolbar="1">
102
<field name="date_order" />
103
<field name="contract_id" />
104
<field name="partner_id"/>
105
<field name="amount" sum="Total"/>
106
<field name="validator"/>
107
<field name="product_id"/>
108
<field name="state"/>
113
<record id="action_loan_append_tree" model="ir.actions.act_window">
114
<field name="name">Append loan amount</field>
115
<field name="type">ir.actions.act_window</field>
116
<field name="res_model">loan.append</field>
117
<field name="view_type">form</field>
118
<field name="context">{'search_default_paid': 1}</field>
119
<field name="search_view_id" ref="view_loan_append_search"/>