summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/account_move.xml
blob: c5f9580c2898ab621961fa0ee0973e1c07ee5a61 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <data>
        <record id="account_move_form_inherit" model="ir.ui.view">
            <field name="name">Account Move</field>
            <field name="model">account.move</field>
            <field name="inherit_id" ref="account.view_move_form"/>
            <field name="arch" type="xml">
                <xpath expr="//div[@name='journal_div']" position="after">
                    <field name="reklas_misc_id"
                        string="Journal Entries Reklas"
                        attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"
                        readonly="1"/>
                </xpath>
                <button name="action_register_payment" position="after">
                    <button name="indoteknik_custom.action_view_invoice_reklas" string="Reklas"
                        type="action" class="btn-primary"  attrs="{'invisible': [('state', '!=', 'posted')]}"/>
                </button>
                <field name="invoice_date" position="after">
                    <field name="payment_schedule" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"/>
                </field>
                <field name="to_check" position="after">
                    <field name="bills_efaktur_exporter" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}" readonly="1"/>
                    <field name="bills_date_efaktur" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}" readonly="1"/>
                    <field name="bills_efaktur_document" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}" widget="pdf_viewer"/>
                    <field name="bills_invoice_exporter" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}" readonly="1"/>
                    <field name="bills_date_invoice" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}" readonly="1"/>
                    <field name="bills_invoice_document" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}" widget="pdf_viewer"/>
                </field>
                <field name="payment_reference" position="after">
                    <field name="date_completed" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
                    <field name="payment_date" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice'), ('payment_date', '=', False)]}"/>
                    <field name="partial_payment" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice'), ('payment_state', '!=', 'partial')]}"/>
                    <field name="reklas_id" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
                </field>
                <field name="invoice_date" position="after">
                    <field name="sale_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
                    <!-- <field name="purchase_order_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"/> -->
                </field>
                <field name="ref" position="after">
                    <field name="sale_id" readonly="1" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', True)]}"/>
                    <field name="refund_id" readonly="1" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', False)]}"/>
                    <field name="refund_so_links" readonly="1" widget="html" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', False)]}"/>
                    <field name="has_refund_so" invisible="1"/>
                </field>
                <field name="reklas_misc_id" position="after">
                    <field name="purchase_order_id" context="{'form_view_ref': 'purchase.purchase_order_form'}" options="{'no_create': True}"/>
                    <field name="bill_id" readonly="1"/>
                </field>
                <field name="partner_shipping_id" position="before">
                    <field name="real_invoice_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
                    <field name="address_invoice" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
                </field>
                <field name="efaktur_document" position="before">
                    <field name="no_faktur_pajak" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"/>
                    <field name="date_efaktur_upload" readonly="1"/>
                </field>
                <field name="efaktur_document" position="attributes">
                    <attribute name="widget">pdf_viewer</attribute>
                </field>
                <field name="invoice_user_id" position="after">
                    <field name="payment_difficulty" widget="badge"
                        decoration-info="payment_difficulty == 'normal'"
                        decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
                        decoration-danger="payment_difficulty == 'bermasalah'"/>
                    <field name="internal_notes_contact" readonly="1"/>
                    <field name="invoice_origin"/>
                    <field name="date_kirim_tukar_faktur"/>
                    <field name="shipper_faktur_id"/>
                    <field name="resi_tukar_faktur"/>
                    <field name="date_terima_tukar_faktur"/>
                    <field name="due_extension"/>
                    <field name="counter"/>
                    <field name="nomor_kwitansi"/>
                    <field name="down_payment"/>
                </field>
                <field name="website_id" position="after">
                    <field name="customer_promise_date"/>
                    <button name="action_sync_promise_date"
                        string="Sync Janji Bayar ke Invoice Lain"
                        type="object"
                        class="btn-primary"
                        help="Sync Janji Bayar Customer ke Invoices dengan jumlah Due Date yang sama"/>
                    
                </field>
                <field name="to_check" position="after">
                    <field name="already_paid"/>
                    <field name="so_shipping_paid_by"/>
                    <field name="so_shipping_covered_by"/>
                    <field name="so_delivery_amt"/>
                    <field name="flag_delivery_amt"/>
                    <field name="length_of_payment"/>
                </field>
                <field name="amount_untaxed" position="after">
                    <field name="other_subtotal" invisible="1"/>
                </field>
                <notebook position="inside">
                    <page string="Due Extension" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}">
                        <field name="due_line">
                            <tree>
                                <field name="due_id"/>
                                <field name="due_description"/>
                                <field name="due_day_extension"/>
                                <field name="due_approval_status"/>
                            </tree>
                        </field>
                    </page>
                </notebook>
            </field>
        </record>

        <record id="account_move_tree_inherit" model="ir.ui.view">
            <field name="name">Account Move</field>
            <field name="model">account.move</field>
            <field name="inherit_id" ref="account.view_out_invoice_tree"/>
            <field name="arch" type="xml">
                <field name="invoice_date_due" position="attributes">
                    <attribute name="widget">badge</attribute>
                    <attribute name="decoration-danger">invoice_day_to_due &lt; 0</attribute>
                </field>
                <field name="invoice_date_due" position="after">
                    <field name="new_due_date" optional="hide"/>
                    <field name="is_efaktur_exported" optional="hide"/>
                    <field name="invoice_day_to_due" attrs="{'invisible': [['payment_state', 'in', ('paid', 'in_payment', 'reversed')]]}" optional="hide"/>
                    <field name="new_invoice_day_to_due" attrs="{'invisible': [['payment_state', 'in', ('paid', 'in_payment', 'reversed')]]}" optional="hide"/>
                    <field name="length_of_payment" optional="hide"/>
                    <field name="mark_upload_efaktur" optional="hide" widget="badge" 
                    decoration-danger="mark_upload_efaktur == 'belum_upload'"  
                    decoration-success="mark_upload_efaktur == 'sudah_upload'" />
                    <field name="due_extension" optional="hide"/>
                    <field name="payment_difficulty" widget="badge"
                        decoration-info="payment_difficulty == 'normal'"
                        decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
                        decoration-danger="payment_difficulty == 'bermasalah'"
                        optional="hide"/>
                </field>
                <field name="payment_state" position="after">
                    <field name="invoice_payment_term_id" optional="hide"/>
                    <field name="date_kirim_tukar_faktur" optional="hide"/>
                    <field name="shipper_faktur_id" optional="hide"/>
                    <field name="resi_tukar_faktur" optional="hide"/>
                    <field name="date_terima_tukar_faktur" optional="hide"/>
                    <field name="payment_info" optional="hide" widget="html"/>
                    <field name="customer_promise_date" optional="hide"/>
                </field>
            </field>
        </record>

        <record id="account_move_in_invoice_tree_inherit" model="ir.ui.view">
            <field name="name">Account Move</field>
            <field name="model">account.move</field>
            <field name="inherit_id" ref="account.view_in_invoice_tree"/>
            <field name="arch" type="xml">
                <field name="invoice_date_due" position="after">
                    <field name="bill_day_to_due" string="Due Date" widget="remaining_days"/>
                    <field name="is_efaktur_uploaded" optional="hide"/>
                    <field name="is_invoice_uploaded" optional="hide"/>
                    <field name="invoice_date"/>
                    <field name="invoice_date_due"/>
                </field>

                <field name="invoice_date_due" position="attributes">
                    <attribute name="invisible">1</attribute>
                </field>
            </field>
        </record>

        <record id="account_move_inherit_purchase_inherit" model="ir.ui.view">
            <field name="name">Account Move</field>
            <field name="model">account.move</field>
            <field name="inherit_id" ref="purchase.view_move_form_inherit_purchase"/>
            <field name="arch" type="xml">
                <field name="purchase_line_id" position="attributes">
                    <attribute name="invisible">0</attribute>
                    <attribute name="optional">hide</attribute>
                    <attribute name="attrs">
                        {'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}
                    </attribute>
                </field>
                <field name="product_id" position="before">
                    <field name="line_no" optional="hide"/>
                </field>
                <field name="invoice_incoterm_id" position="after">
                    <field name="date_terima_tukar_faktur"/>
                </field>
            </field>
        </record>

        <record id="account_move_multi_update_ir_actions_server" model="ir.actions.server">
            <field name="name">Multi Update</field>
            <field name="model_id" ref="account.model_account_move"/>
            <field name="binding_model_id" ref="account.model_account_move"/>
            <field name="state">code</field>
            <field name="code">action = records.open_form_multi_update()</field>
        </record>
        
        <record id="account_move_multi_update_bills_ir_actions_server" model="ir.actions.server">
            <field name="name">Update Terima Faktur Bills</field>
            <field name="model_id" ref="account.model_account_move"/>
            <field name="binding_model_id" ref="account.model_account_move"/>
            <field name="state">code</field>
            <field name="code">action = records.open_form_multi_update_bills()</field>
        </record>

        <record id="account_move_multi_create_reklas_ir_actions_server" model="ir.actions.server">
            <field name="name">Create Reklas Penjualan</field>
            <field name="model_id" ref="account.model_account_move"/>
            <field name="binding_model_id" ref="account.model_account_move"/>
            <field name="state">code</field>
            <field name="code">action = records.open_form_multi_create_reklas_penjualan()</field>
        </record>

         <record id="action_export_faktur" model="ir.actions.server">
            <field name="name">Export Faktur ke XML</field>
            <field name="model_id" ref="account.model_account_move" />
            <field name="binding_model_id" ref="account.model_account_move" />
            <field name="state">code</field>
            <field name="code">action = records.export_faktur_to_xml()</field>
        </record>

        <record id="view_sync_promise_date_wizard_form" model="ir.ui.view">
            <field name="name">sync.promise.date.wizard.form</field>
            <field name="model">sync.promise.date.wizard</field>
            <field name="arch" type="xml">
                <form string="Sync Janji Bayar">
                    <group>
                        <field name="invoice_id" readonly="1"/>
                        <field name="promise_date" readonly="1"/>
                    </group>
                    <field name="line_ids">
                        <tree create="false" delete="false" editable="bottom">
                            <field name="sync_check"/>
                            <field name="invoice_name" readonly="1"/>
                            <field name="invoice_date_due" readonly="1"/>
                            <field name="invoice_day_to_due" readonly="1"/>
                            <field name="new_invoice_day_to_due" readonly="1"/>
                            <field name="date_terima_tukar_faktur" readonly="1"/>
                            <field name="amount_total" readonly="1"/>
                        </tree>
                    </field>

                    <button name="action_check_all" string="Check All" type="object" class="btn-secondary"/>
                    <button name="action_uncheck_all" string="Uncheck All" type="object" class="btn-secondary"/>
                    
                    <footer>
                        <button name="action_confirm" string="Konfirmasi Sync" type="object" class="btn-primary"/>
                        <button string="Batal" class="btn-secondary" special="cancel"/>
                    </footer>
                </form>
            </field>
        </record>
    </data>
</odoo>