summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-06-10 09:24:25 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-06-10 09:24:25 +0700
commit5c76eb43188de9a09380dc43dcc19120b6ebfc84 (patch)
tree3a4a047136552921231580fc58fffcebd4dd4381
parente577c31c748d66b102362af35a33984b9b28edd4 (diff)
add kanban to manufactures
-rwxr-xr-xindoteknik_custom/views/x_manufactures.xml40
1 files changed, 39 insertions, 1 deletions
diff --git a/indoteknik_custom/views/x_manufactures.xml b/indoteknik_custom/views/x_manufactures.xml
index 01e90a1e..02061251 100755
--- a/indoteknik_custom/views/x_manufactures.xml
+++ b/indoteknik_custom/views/x_manufactures.xml
@@ -3,7 +3,7 @@
<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">tree,form</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!
@@ -11,6 +11,44 @@
</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>