summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/stock_picking.xml
blob: 99f0d7c0b971b1ee186db757ff0828fe15f1dcdd (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
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <data>
        <record id="stock_picking_tree_view_inherit" model="ir.ui.view">
            <field name="name">Stock Picking</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.vpicktree"/>
            <field name="arch" type="xml">
                <field name="json_popover" position="after">
                    <field name="date_done" optional="hide"/>
                    <field name="date_doc_kirim" optional="hide"/>
                    <field name="driver_departure_date" optional="hide"/>
                    <field name="driver_arrival_date" optional="hide"/>
                    <field name="note_logistic" optional="hide"/>
                </field>
            </field>
        </record>

        <record id="stock_picking_form_view_inherit" model="ir.ui.view">
            <field name="name">Stock Picking</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.view_picking_form"/>
            <field name="arch" type="xml">
                <button name="action_confirm" position="before">
                    <button name="ask_approval"
                            string="Ask Approval"
                            type="object"
                            attrs="{'invisible': [('is_internal_use', '=', False)]}"
                    />
                    <button name="ask_receipt_approval"
                            string="Received"
                            type="object"
                            attrs="{'invisible': ['|', ('state', 'in', ['done']), ('approval_receipt_status', '=', 'pengajuan1')]}"
                    />
                    <button name="ask_return_approval"
                            string="Ask Return/Acc"
                            type="object"
                            attrs="{'invisible': ['|', ('state', 'in', ['draft', 'cancel', 'assigned']), ('approval_return_status', '=', 'pengajuan1')]}"
                    />
                    <button name="action_create_invoice_from_mr"
                            string="Create Bill"
                            type="object"
                            attrs="{'invisible': ['|', ('state', '!=', 'done'), ('name', 'ilike', 'out')]}"
                    />
                </button>
                <field name="backorder_id" position="after">
                    <field name="summary_qty_detail"/>
                    <field name="count_line_detail"/>
                </field>
                <field name="partner_id" position="after">
                    <field name="real_shipping_id"/>
                </field>
                <field name="origin" position="after">
                    <field name="date_doc_kirim"/>
                    <field name="summary_qty_operation"/>
                    <field name="count_line_operation"/>
                    <field name="account_id"
                           attrs="{
                           'readonly': [['state', 'in', ['done', 'cancel']]],
                           'invisible': [['is_internal_use', '=', False]],
                           'required': [['is_internal_use', '=', True]]
                           }"
                    />
                </field>
                <field name="group_id" position="before">
                    <field name="is_internal_use"
                           string="Internal Use"
                           type="object"
                           attrs="{'readonly': True}"
                           force_save="1"
                    />
                    <field name="approval_status"/>
                    <field name="approval_receipt_status"/>
                    <field name="approval_return_status"/>
                </field>
                <field name="product_id" position="before">
                    <field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
                </field>
                <page name="note" position="after">
                    <page string="E-Faktur" name="efaktur" attrs="{'invisible': [['is_internal_use', '=', False]]}">
                        <group>
                            <group>
                                <field name="efaktur_id" domain="[('is_used','=',False)]"/>
                                <field name="is_efaktur_exported"/>
                                <field name="date_efaktur_exported"/>
                            </group>
                        </group>
                    </page>
                    <page string="Delivery" name="delivery_order">
                        <group>
                            <group>
                                <field name="note_logistic"/>
                                <field name="driver_departure_date"/>
                                <field name="driver_arrival_date"/>
                                <field name="delivery_tracking_no"/>
                                <field name="driver_id"/>
                                <field name="picking_code" attrs="{'invisible': [['picking_code', '=', False]]}"/>
                                <field name="picking_code" string="Picking code (akan digenerate ketika sudah di-validate)" attrs="{'invisible': [['picking_code', '!=', False]]}"/>
                            </group>
                        </group>
                    </page>
                </page>
                
            </field>
        </record>
    </data>
</odoo>