summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/x_manufactures.xml
blob: b52fe795ec88a2dde31e7c82e07e4cf70978ba06 (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
<odoo>
    <data>
        <record id="x_manufactures_action" model="ir.actions.act_window">
            <field name="name">Manufacture</field>
            <field name="res_model">x_manufactures</field>
            <field name="view_mode">kanban,tree,form</field>  <!-- Tambahkan kanban di sini -->
            <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                    Add Manufactures!
                </p>
            </field>
        </record>

        <record id="x_manufactures_kanban" model="ir.ui.view">
            <field name="name">Manufactures Kanban</field>
            <field name="model">x_manufactures</field>
            <field name="arch" type="xml">
                <kanban default_group_by="x_manufacture_level">
                    <field name="id"/> <!-- Tambahkan ini -->
                    <field name="x_name"/>
                    <field name="x_logo_manufacture"/>
                    <field name="x_manufacture_level"/>
                    <templates>
                        <t t-name="kanban-box">
                            <div class="oe_kanban_global_click">
                                <div class="o_kanban_image">
                                    <img t-if="record.x_logo_manufacture.raw_value" 
                                         t-att-src="kanban_image('x_manufactures', 'x_logo_manufacture', record.id.raw_value)" 
                                         alt="Logo" class="img-fluid" width="64" height="64"/>
                                    <img t-else="" 
                                         src="/web/static/src/img/placeholder.png" 
                                         alt="No Logo" class="img-fluid" width="64" height="64"/>
                                </div>
                                <div class="o_kanban_details">
                                    <strong><field name="x_name"/></strong>
                                    <div>
                                        <span class="badge badge-secondary">
                                            <field name="x_manufacture_level"/>
                                        </span>
                                    </div>
                                    <div t-if="record.x_short_desc.raw_value">
                                        <small><field name="x_short_desc"/></small>
                                    </div>
                                </div>
                            </div>
                        </t>
                    </templates>
                </kanban>
            </field>
        </record>

        <record id="x_manufactures_tree" model="ir.ui.view">
            <field name="name">Manufactures</field>
            <field name="model">x_manufactures</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="sequence" string="Seq"/>
                    <field name="x_name"/>
                    <field name="x_negara_asal"/>
                    <field name="x_short_desc"/>
                    <field name="x_manufacture_level"/>
                    <field name="x_manufacture_service_center"/>
                    <field name="cache_reset_status"/>
                    <field name="parent_id"/>
                    <field name="override_vendor_id" optional="hide"/>
                    <field name="user_id" optional="hide"/>
                </tree>
            </field>
        </record>

        <record id="x_manufactures_form" model="ir.ui.view">
            <field name="name">Manufactures</field>
            <field name="model">x_manufactures</field>
            <field name="arch" type="xml">
                <form>
                    <sheet string="Manufactures" modifiers="{}">
                        <div class="oe_button_box" name="button_box"/>
                        <group>
                            <group>
                                <field name="x_name"/>
                                <field name="sequence"/>
                                <field name="x_negara_asal"/>
                                <field name="x_short_desc"/>
                                <field name="x_manufacture_level"/>
                                <field name="cashback_percent" widget="percentage"/>
                                <field name="x_produk_aksesoris_sparepart"/>
                                <field name="cache_reset_status"/>
                                <field name="parent_id"/>
                                <field name="category_ids" widget="many2many_tags"/>
                                <field name="user_id"/>
                            </group>
                            <group>
                                <field name="x_logo_manufacture" widget="image"/>
                                <field name="image_promotion_1" widget="image" width="80" />
                                <field name="image_promotion_2" widget="image" width="80" />
                                <field name="vendor_ids" widget="many2many_tags"/>
                                <field name="override_vendor_id" />
                            </group>
                        </group>
                        <notebook>
                            <page string="Description">
                                <field name="x_description"/>
                            </page>
                            <page string="Relasi Produk">
                                <field name="x_manufacture_product" widget="section_and_note_one2many" mode="tree,kanban">
                                    <tree string="Products" editable="bottom">
                                        <field name="default_code"/>
                                        <field name="name"/>
                                        <field name="create_date"/>
                                        <field name="solr_flag"/>
                                        <field name="product_rating"/>
                                    </tree>
                                </field>
                            </page>
                            <page string="Relasi Banner">
                                <field name="x_manufactures_banners"/>
                            </page>
                            <page string="Relasi Service Center">
                                <field name="x_manufacture_service_center"/>
                            </page>
                        </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="ir_actions_server_x_manufactures_sync_to_solr" model="ir.actions.server">
            <field name="name">Sync to solr</field>
            <field name="model_id" ref="indoteknik_custom.model_x_manufactures"/>
            <field name="binding_model_id" ref="indoteknik_custom.model_x_manufactures"/>
            <field name="state">code</field>
            <field name="code">model.action_sync_to_solr()</field>
        </record>

        <menuitem id="x_manufactures_sale"
                  name="Manufactures"
                  parent="sale.product_menu_catalog"
                  sequence="3"
                  action="x_manufactures_action"/>
    </data>
</odoo>