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
|
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<!-- Tree -->
<record id="view_gudang_service_tree" model="ir.ui.view">
<field name="name">gudang.serivice.tree</field>
<field name="model">gudang.service</field>
<field name="arch" type="xml">
<tree string="Monitoring Barang Service" decoration-danger="state in ('draft', 'received_from_cust')" decoration-warning="state in ('sent_to_vendor', 'received_from_vendor')"
decoration-success="state == 'delivered_to_cust'" decoration-muted="state == 'cancel'" >
<field name="name"/>
<field name="partner_id"/>
<field name="vendor_id"/>
<field name="origin"/>
<field name="schedule_date"/>
<field name="start_date" optional="hide"/>
<field name="remaining_date"/>
<field name="state" widget="badge" decoration-danger="state in ('draft', 'received_from_cust')" decoration-warning="state in ('sent_to_vendor', 'received_from_vendor')"
decoration-success="state == 'delivered_to_cust'" decoration-muted="state == 'cancel'" />
<field name="cancel_reason" optional="hide"/>
<field name="create_date" optional="hide"/>
</tree>
</field>
</record>
<!-- Form -->
<record id="view_gudang_service_form" model="ir.ui.view">
<field name="name">gudang.service.form</field>
<field name="model">gudang.service</field>
<field name="arch" type="xml">
<form>
<header>
<button name="action_submit" string="Proceed" type="object"
class="btn-primary"
attrs="{'invisible': [('state', 'in', ['cancel', 'done', 'received_from_vendor', 'delivered_to_cust'])]}"/>
<button name="action_done" string="Set Done" type="object"
class="btn-primary"
attrs="{'invisible': [('state', 'not in', ['received_from_vendor'])]}"/>
<button name="action_cancel" string="Cancel" type="object"
class="btn-secondary"
attrs="{'invisible': [('state', 'in', ['cancel', 'delivered_to_cust'])]}"/>
<button name="action_draft" string="Set to Backlog" type="object"
class="btn-secondary"
attrs="{'invisible': [('state', 'not in', ['cancel'])]}"/>
<field name="state" widget="statusbar" readonly="1"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name" readonly="1" class="oe_inline"/>
</h1>
</div>
<group>
<field name="origin" attrs="{'readonly': [('state', 'not in', ['draft'])]}"/>
<field name="partner_id"/>
<field name="vendor_id"/>
<field name="remaining_date"/>
<field name="schedule_date" attrs="{'readonly': [('state', 'not in', ['draft', 'reveived_from_cust'])]}"/>
<field name="start_date" readonly="1"/>
<field name="done_date" attrs="{'invisible': [('state', 'not in', ['delivered_to_cust'])]}"/>
<field name="create_uid"/>
<field name="cancel_reason"
attrs="{'invisible': [('state', 'in', ['delivered_to_cust', 'draft'])]}"/>
</group>
<notebook>
<page string="Product Lines" name="product_lines">
<field name="gudang_service_lines">
<tree string="Product Lines" editable="top" create="0" delete="1">
<field name="product_id"/>
<field name="quantity"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Action -->
<record id="action_gudang_service" model="ir.actions.act_window">
<field name="name">Monitoring Barang Service</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">gudang.service</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu -->
<menuitem
id="menu_gudang_service"
name="Monitoring Barang Service"
parent="indoteknik_custom.menu_monitoring_in_sale"
sequence="10"
action="action_gudang_service"
/>
</data>
<!-- Cron -->
<record id="ir_cron_gudang_service_logistik_notify" model="ir.cron">
<field name="name">Gudang Service Daily Notification</field>
<field name="model_id" ref="model_gudang_service"/>
<field name="state">code</field>
<field name="code">model.cron_notify_onprogress_gudang_service()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="active">False</field>
</record>
</odoo>
|