summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/unpaid_invoice_view.xml
blob: 86b15a07b2fc0f75c23774ae898770652f325918 (plain)
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
<odoo>
    <!-- Tree view -->
    <record id="view_unpaid_invoice_tree" model="ir.ui.view">
        <field name="name">unpaid.invoice.view.tree</field>
        <field name="model">unpaid.invoice.view</field>
        <field name="arch" type="xml">
            <tree string="Unpaid Invoices Monitoring" create="false" delete="false" edit="false">
                <field name="partner_id"/>
                <field name="invoice_number"/>
                <field name="ref"/>
                <field name="invoice_date"/>
                <field name="date_kirim_tukar_faktur"/>
                <field name="date_terima_tukar_faktur"/>
                <field name="payment_term_id"/>
                <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due &lt; 0"/>
                <field name="invoice_day_to_due" widget="badge" decoration-danger="invoice_day_to_due &lt; 0" readonly="1"/>
                <field name="new_invoice_day_to_due" widget="badge" decoration-danger="invoice_day_to_due &lt; 0" readonly="1"/>
                <field name="amount_total" sum="Total Amount"/>
                <field name="amount_residual" sum="Sisa Amount"/>
                <field name="payment_state" widget="badge"
                    decoration-danger="payment_state == 'not_paid'"
                    decoration-warning="payment_state == 'partial'"/>
                <field name="invoice_user_id"/>
                <field name="payment_difficulty" widget="badge"
                    decoration-info="payment_difficulty == 'normal'"
                    decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
                    decoration-danger="payment_difficulty == 'bermasalah'"/>
            </tree>
        </field>
    </record>

    <!-- Form view -->
    <record id="view_unpaid_invoice_form" model="ir.ui.view">
        <field name="name">unpaid.invoice.view.form</field>
        <field name="model">unpaid.invoice.view</field>
        <field name="arch" type="xml">
            <form string="Unpaid Invoice Detail" create="false" edit="false" delete="false">
                <sheet>
                    <group>
                        <group>
                            <field name="partner_id"/>
                            <field name="invoice_id"/>
                            <field name="ref"/>
                            <field name="invoice_date"/>
                            <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due &lt; 0"/>
                            <field name="date_kirim_tukar_faktur"/>
                            <field name="date_terima_tukar_faktur"/>
                            <field name="payment_term_id"/>
                            <button name="action_create_surat_piutang"
                                type="object"
                                string="Create Surat Piutang"
                                class="oe_highlight"/>
                        </group>
                        <group>
                            <field name="sale_id"/>
                            <field name="invoice_user_id"/>
                            <field name="invoice_day_to_due"/>
                            <field name="new_invoice_day_to_due"/>
                            <field name="payment_state" widget="badge"
                                decoration-danger="payment_state == 'not_paid'"
                                decoration-warning="payment_state == 'partial'"/>
                            <field name="amount_total"/>
                            <field name="amount_residual"/>
                            <field name="payment_difficulty" widget="badge"
                                decoration-info="payment_difficulty == 'normal'"
                                decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
                                decoration-danger="payment_difficulty == 'bermasalah'"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_unpaid_invoice_search" model="ir.ui.view">
        <field name="name">unpaid.invoice.view.search</field>
        <field name="model">unpaid.invoice.view</field>
        <field name="arch" type="xml">
            <search string="Search Unpaid Invoices">
                <field name="partner_id"/>
                <field name="invoice_number"/>
                <separator/>
                <filter name="overdue" string="Overdue" domain="[('new_invoice_day_to_due', '&lt;', 0)]"/>
                <filter name="today" string="Today" domain="[('new_invoice_day_to_due', '=', 0)]"/>
                <filter name="due" string="Due" domain="[('new_invoice_day_to_due', '&lt;', 0)]"/>
                <separator/>
                <group expand="0" string="Group By">
                    <filter string="Partner" name="group_partner" context="{'group_by': 'partner_id'}"/>
                </group>
            </search>
        </field>
    </record>

    <!-- Action -->
    <record id="action_unpaid_invoice_view" model="ir.actions.act_window">
        <field name="name">Unpaid Invoices Monitoring</field>
        <field name="res_model">unpaid.invoice.view</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" ref="view_unpaid_invoice_tree"/>
        <field name="search_view_id" ref="view_unpaid_invoice_search"/>
    </record>

    <!-- Menu -->
    <menuitem id="menu_unpaid_invoice_root"
        name="Unpaid Invoices Monitoring"
        parent="account.menu_finance_receivables"
        action="action_unpaid_invoice_view"/>
</odoo>