summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/views')
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml11
-rw-r--r--indoteknik_custom/views/refund_sale_order.xml2
-rw-r--r--indoteknik_custom/views/report_logbook_sj.xml92
-rwxr-xr-xindoteknik_custom/views/sale_order.xml6
-rw-r--r--indoteknik_custom/views/sj_tele.xml15
-rw-r--r--indoteknik_custom/views/tukar_guling_po.xml2
6 files changed, 78 insertions, 50 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 821f3295..7feec934 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -99,6 +99,7 @@
<field name="total_delivery_amt" attrs="{'required': [('partner_id', 'in', [9688, 29712])]}"/>
<field name="product_bom_id" attrs="{'invisible': [('product_bom_id', '=', None)]}"/>
<field name="manufacturing_id" attrs="{'invisible': [('product_bom_id', '=', None)]}"/>
+ <field name="show_description" attrs="{'invisible': [('partner_id', 'not in', [5571, 35475, 38198, 88261,37905, 9688, 20625, 1371, 37902, 12119])]}" widget="boolean_toggle"/>
<!-- <field name="move_id" domain="[('move_type','=','entry')]" context="{'form_view_ref': 'account.view_move_form'}" options="{'no_create': True}"/> -->
</field>
<field name="amount_total" position="after">
@@ -112,6 +113,7 @@
</field>
<field name="product_id" position="before">
<field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
+ <field name="show_description" optional="hide" widget="boolean_toggle"/>
</field>
<field name="product_id" position="attributes">
<attribute name="options">{'no_create': True}</attribute>
@@ -181,19 +183,20 @@
</field>
<field name="order_line" position="attributes">
- <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute>
+ <!-- <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute> -->
+ <attribute name="attrs">{'readonly': [('has_active_invoice', '=', True)]}</attribute>
</field>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes">
- <attribute name="attrs">{'readonly': [], 'required': True}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='taxes_id']" position="attributes">
- <attribute name="attrs">{'readonly': []}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])]}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="attributes">
- <attribute name="attrs">{'required': True}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page[@name='purchase_delivery_invoice']" position="before">
diff --git a/indoteknik_custom/views/refund_sale_order.xml b/indoteknik_custom/views/refund_sale_order.xml
index 0c6cd371..51f3deab 100644
--- a/indoteknik_custom/views/refund_sale_order.xml
+++ b/indoteknik_custom/views/refund_sale_order.xml
@@ -92,7 +92,7 @@
</div>
<field name="show_approval_alert" invisible="1"/>
<div class="alert alert-info" role="alert"
- attrs="{'invisible': ['|', ('show_approval_alert', '=', False), ('status', 'in', ['reject', 'refund'])]}">
+ attrs="{'invisible': ['|', ('show_approval_alert', '=', False), '|', ('status', 'in', ['reject', 'refund']), ('refund_type', 'not in', ['retur_full', 'retur_sebagian'])]}">
⚠️ SO sudah melakukan retur barang. Silakan lanjutkan refund.
</div>
</xpath>
diff --git a/indoteknik_custom/views/report_logbook_sj.xml b/indoteknik_custom/views/report_logbook_sj.xml
index 94f6c2ab..46260cd5 100644
--- a/indoteknik_custom/views/report_logbook_sj.xml
+++ b/indoteknik_custom/views/report_logbook_sj.xml
@@ -12,15 +12,18 @@
<field name="date_approve"/>
<field name="approve_by_finance"/>
<field name="state"/>
+
</tree>
</field>
- </record>
+ </record>
<record id="report_logbook_sj_line_tree" model="ir.ui.view">
<field name="name">report.logbook.sj.line.tree</field>
<field name="model">report.logbook.sj.line</field>
<field name="arch" type="xml">
<tree editable="bottom">
+<!-- <field name="sequence" widget="handle"/>-->
+ <field name="line_num" string="No" readonly="1"/>
<field name="name"/>
<field name="driver_id"/>
<field name="departure_date"/>
@@ -42,50 +45,47 @@
<field name="arch" type="xml">
<form>
<header>
- <button name="approve"
- string="Validate"
- type="object"
- />
+ <button name="approve" string="Validate" type="object" />
</header>
<sheet string="Report logbook SJ">
- <div class="oe_button_box" name="button_box"/>
+ <div class="oe_button_box" name="button_box"/>
+ <group>
<group>
- <group>
- <field name="name" readonly="1"/>
- <field name="date" readonly="1"/>
- <field name="date_approve" readonly="1"/>
- </group>
- <group>
- <field name="approve_by_finance" readonly="1"/>
- <field name="state" readonly="1"/>
- <field name="created_by" readonly="1"/>
- <field name="approve_by" readonly="1"/>
- <field name="count_line" readonly="1"/>
- </group>
+ <field name="name" readonly="1"/>
+ <field name="date" readonly="1"/>
+ <field name="date_approve" readonly="1"/>
</group>
- <notebook>
- <page string="Line">
- <field name="report_logbook_sj_line"/>
- </page>
- </notebook>
- </sheet>
- <div class="oe_chatter">
- <field name="message_follower_ids" widget="mail_followers"/>
- <field name="message_ids" widget="mail_thread"/>
- </div>
+ <group>
+ <field name="approve_by_finance" readonly="1"/>
+ <field name="state" readonly="1"/>
+ <field name="created_by" readonly="1"/>
+ <field name="approve_by" readonly="1"/>
+ <field name="count_line" readonly="1"/>
+ </group>
+ </group>
+ <notebook>
+ <page string="Line">
+ <field name="report_logbook_sj_line"/>
+ </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>
<record id="report_logbook_sj_view_search" model="ir.ui.view">
- <field name="name">report.logbook.sj.search.view</field> <!-- Made the name more descriptive -->
- <field name="model">report.logbook.sj</field>
- <field name="arch" type="xml">
- <search string="Search Report">
- <field name="sj_number"/>
- </search>
- </field>
- </record>
+ <field name="name">report.logbook.sj.search.view</field> <!-- Made the name more descriptive -->
+ <field name="model">report.logbook.sj</field>
+ <field name="arch" type="xml">
+ <search string="Search Report">
+ <field name="sj_number"/>
+ </search>
+ </field>
+ </record>
<record id="report_logbook_sj_action" model="ir.actions.act_window">
<field name="name">Report Logbook SJ</field>
@@ -94,9 +94,19 @@
<field name="view_mode">tree,form</field>
</record>
- <menuitem id="menu_report_logbook_sj"
- name="Report Logbook SJ"
- action="report_logbook_sj_action"
- parent="account.menu_finance_reports"
- sequence="200"/>
+ <menuitem id="menu_report_logbook_sj" name="Report Logbook SJ" action="report_logbook_sj_action" parent="account.menu_finance_reports" sequence="200"/>
+
+ <data noupdate="1">
+ <record id="cron_daily_logbook_gap_to_telegram" model="ir.cron">
+ <field name="name">Daily Logbook SJ Gap → Telegram</field>
+ <field name="model_id" ref="model_report_logbook_sj"/>
+ <field name="state">code</field>
+ <field name="code">model.cron_daily_logbook_gap_to_telegram()</field>
+ <field name="interval_number">1</field>
+ <field name="interval_type">days</field>
+ <field name="numbercall">-1</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="active">False</field>
+ </record>
+ </data>
</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 44da3e13..8d56bbbd 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -297,9 +297,9 @@
<field name="note" optional="hide"/>
<field name="note_procurement" optional="hide"/>
<field name="vendor_subtotal" optional="hide"/>
- <field name="unreserved_percent" widget="percentpie" string="Unreserved"/>
- <field name="reserved_percent" widget="percentpie" string="Reserved"/>
- <field name="delivered_percent" widget="percentpie" string="Delivered"/>
+ <field name="unreserved_percent" widget="percentpie" string="Unreserved" optional="hide"/>
+ <field name="reserved_percent" widget="percentpie" string="Reserved" optional="hide"/>
+ <field name="delivered_percent" widget="percentpie" string="Delivered" optional="hide"/>
<field name="weight" optional="hide"/>
<field name="is_has_disc" string="Flash Sale Item?" readonly="1" optional="hide"/>
<field name="amount_voucher_disc" string="Voucher" readonly="1" optional="hide"/>
diff --git a/indoteknik_custom/views/sj_tele.xml b/indoteknik_custom/views/sj_tele.xml
new file mode 100644
index 00000000..cefcc968
--- /dev/null
+++ b/indoteknik_custom/views/sj_tele.xml
@@ -0,0 +1,15 @@
+<odoo>
+ <data noupdate="1">
+ <record id="woi" model="ir.cron">
+ <field name="name">SJ TELE</field>
+ <field name="model_id" ref="model_sj_tele"/>
+ <field name="state">code</field>
+ <field name="code">model.woi()</field>
+ <field name="interval_number">1</field>
+ <field name="interval_type">days</field>
+ <field name="numbercall">-1</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="active">False</field>
+ </record>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/tukar_guling_po.xml b/indoteknik_custom/views/tukar_guling_po.xml
index 548a209f..4a9ab25d 100644
--- a/indoteknik_custom/views/tukar_guling_po.xml
+++ b/indoteknik_custom/views/tukar_guling_po.xml
@@ -87,7 +87,7 @@
<!-- <field name="srt_num" readonly="1"/>-->
<field name="operations" string="Operations"
attrs="{
- 'required': [('return_type', 'in', ['revisi_po', 'tukar_guling'])]
+ 'required': [('return_type', 'in', ['retur_po', 'tukar_guling'])]
}"/>
<!-- <field name="origin" readonly="1"/>-->
<field name="origin_po" readonly="1"/>