diff options
Diffstat (limited to 'indoteknik_custom/views')
| -rw-r--r-- | indoteknik_custom/views/down_payment.xml | 204 | ||||
| -rw-r--r-- | indoteknik_custom/views/down_payment_realization.xml | 164 | ||||
| -rw-r--r-- | indoteknik_custom/views/ir_sequence.xml | 10 | ||||
| -rw-r--r-- | indoteknik_custom/views/mail_template_pum.xml | 80 |
4 files changed, 458 insertions, 0 deletions
diff --git a/indoteknik_custom/views/down_payment.xml b/indoteknik_custom/views/down_payment.xml new file mode 100644 index 00000000..754297b1 --- /dev/null +++ b/indoteknik_custom/views/down_payment.xml @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<odoo> + <record id="view_form_down_payment" model="ir.ui.view"> + <field name="name">down.payment.form</field> + <field name="model">down.payment</field> + <field name="arch" type="xml"> + <form string="Pengajuan Uang Muka (PUM)"> + <header> + <button name="action_realisasi_pum" + type="object" + string="Realisasi" + class="btn-primary" + attrs="{'invisible': [('status', 'not in', 'approved')]}"/> + <button name="action_draft" + string="Reset to Draft" + attrs="{'invisible': [('status', '!=', 'reject')]}" + type="object"/> + <button name="action_reject" + type="object" + string="Reject" + class="btn-danger" + attrs="{'invisible': [('status', 'in', ['approved','reject','draft'])]}"/> + <button name="action_confirm_payment" + type="object" + string="Konfirmasi Pembayaran" + attrs="{'invisible': [('status', '=', 'reject')]}"/> + <button name="action_approval_check" + type="object" + string="Checking/Approval" + attrs="{'invisible': [('status', '=', 'reject')]}"/> + <button name="action_ap_only" + type="object" + string="AP Only" + attrs="{'invisible': [('status', '=', 'reject')]}"/> + <field name="status" widget="statusbar" + statusbar_visible="draft,pengajuan1,pengajuan2,pengajuan3,approved" + statusbar_colors='{"reject":"red"}' + readonly="1"/> + </header> + <sheet> + <div class="oe_button_box" name="button_box"> + <field name="is_cab_visible" invisible="1"/> + <button type="object" + name="action_view_journal_uangmuka" + class="oe_stat_button" + icon="fa-book" + attrs="{'invisible': [('is_cab_visible', '=', False)]}" + style="width: 200px;"> + <field name="move_id" widget="statinfo" string="Journal Uang Muka"/> + <span class="o_stat_text"> + <t t-esc="record.move_id.name"/> + </span> + </button> + </div> + <div class="oe_title"> + <h1> + <field name="number" readonly="1"/> + </h1> + </div> + <group col="2"> + <group string=""> + <field name="applicant_name" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/> + <field name="nominal" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/> + <field name="bank_name" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/> + <field name="account_name" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/> + <field name="bank_account" colspan="2" attrs="{'readonly': [('status', '=', 'approved')]}"/> + <!-- <field name="move_id" readonly="1"/> --> + <hr/> + <field name="user_id" readonly="1"/> + <field name="partner_id" readonly="1"/> + <field name="departement_type"/> + <field name="status_pay_down_payment" + readonly="1" + decoration-success="status_pay_down_payment == 'payment'" + decoration-danger="status_pay_down_payment == 'pending'" + widget="badge"/> + <field name="create_date" readonly="1"/> + <field name="date_back_to_office"/> + <field name="estimated_return_date" readonly="1" widget="badge"/> + <field name="days_remaining" readonly="1" widget="badge"/> + <field name="approved_by" readonly="1"/> + <field name="detail_note" attrs="{'readonly': [('status', '=', 'approved')]}"/> + <field name="reason_reject" attrs="{'invisible': [('status', '!=', 'reject')], 'readonly': True}"/> + </group> + + <group> + <field name="attachment_type" attrs="{'readonly': [('status', '=', 'approved')]}"/> + + <field name="attachment_file_pdf" filename="attachment_filename" + widget="pdf_viewer" + attrs="{'invisible': [('attachment_type', '!=', 'pdf')], 'readonly': [('status', '=', 'approved')]}"/> + + <field name="attachment_file_image" filename="attachment_filename" + widget="image" + attrs="{'invisible': [('attachment_type', '!=', 'image')], 'readonly': [('status', '=', 'approved')]}" + style="max-width:250px; max-height:250px; object-fit:contain;"/> + <br/> + </group> + + </group> + </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="view_tree_down_payment" model="ir.ui.view"> + <field name="name">down.payment.tree</field> + <field name="model">down.payment</field> + <field name="arch" type="xml"> + <tree> + <field name="number"/> + <field name="user_id" optional='hide'/> + <field name="applicant_name"/> + <field name="nominal"/> + <field name="departement_type" optional='hide'/> + <field name="days_remaining" readonly="1" widget="badge"/> + <field name="status" + readonly="1" + decoration-success="status == 'approved'" + widget="badge" optional="show"/> + <field name="status_pay_down_payment" + readonly="1" + decoration-success="status_pay_down_payment == 'payment'" + decoration-danger="status_pay_down_payment == 'pending'" + widget="badge"/> + <field name="estimated_return_date" optional="hide" widget="badge" /> + </tree> + </field> + </record> + <record id="action_down_payment" model="ir.actions.act_window"> + <field name="name">Pengajuan Uang Muka (Down Payment)</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">down.payment</field> + <field name="view_mode">tree,form</field> + </record> + + <menuitem id="menu_down_payment_acct" + name="Pengajuan Uang Muka (Down Payment)" + parent="account.menu_finance_entries" + sequence="114" + action="action_down_payment" + /> + + <menuitem id="menu_down_payment_sales" + name="Pengajuan Uang Muka (Down Payment)" + parent="sale.product_menu_catalog" + sequence="101" + action="action_down_payment" + /> + + <!-- view form untuk popup CAB AP Only --> + <record id="view_down_payment_ap_only_form" model="ir.ui.view"> + <field name="name">down.payment.ap.only.form</field> + <field name="model">down.payment.ap.only</field> + <field name="arch" type="xml"> + <form string="Create CAB AP Only"> + <group> + <field name="nominal"/> + <field name="account_id"/> + </group> + <footer> + <button name="action_create_cab" type="object" string="Create CAB" class="btn-primary"/> + <button string="Cancel" class="btn-secondary" special="cancel"/> + </footer> + </form> + </field> + </record> + + <record id="action_down_payment_cab_ap_only" model="ir.actions.act_window"> + <field name="name">Create CAB AP Only</field> + <field name="res_model">down.payment.ap.only</field> + <field name="view_mode">form</field> + <field name="view_id" ref="view_down_payment_ap_only_form"/> + <field name="target">new</field> + </record> + + + <record id="view_reject_reason_downpayment_form" model="ir.ui.view"> + <field name="name">reject.reason.downpayment.form</field> + <field name="model">reject.reason.downpayment</field> + <field name="arch" type="xml"> + <form string="Alasan Penolakan PUM"> + <group> + <field name="reason_reject"/> + </group> + <footer> + <button name="confirm_reject" type="object" string="Tolak" class="btn-danger"/> + <button string="Batal" class="btn-secondary" special="cancel"/> + </footer> + </form> + </field> + </record> + + <record id="action_down_payment_reject" model="ir.actions.act_window"> + <field name="name">Tolak Pengajuan PUM</field> + <field name="res_model">reject.reason.downpayment</field> + <field name="view_mode">form</field> + <field name="target">new</field> + </record> + +</odoo>
\ No newline at end of file diff --git a/indoteknik_custom/views/down_payment_realization.xml b/indoteknik_custom/views/down_payment_realization.xml new file mode 100644 index 00000000..b24727e6 --- /dev/null +++ b/indoteknik_custom/views/down_payment_realization.xml @@ -0,0 +1,164 @@ +<odoo> + <record id="view_form_realization_down_payment" model="ir.ui.view"> + <field name="name">realization.down.payment.form</field> + <field name="model">realization.down.payment</field> + <field name="arch" type="xml"> + <form string="Realisasi Uang Muka"> + <header> + <button name="action_validation" + type="object" + string="Validasi" + class="btn-primary"/> + <button name="action_approval_check" + type="object" + string="Checking/Approval" + attrs="{}"/> + <button name="action_cab" + type="object" + string="AP Only"/> + <field name="status" widget="statusbar" + statusbar_visible="pengajuan1,pengajuan2,pengajuan3,approved" + statusbar_colors='{"reject":"red"}' + readonly="1"/> + </header> + <sheet> + <div class="oe_button_box" name="button_box"> + <field name="is_cab_visible" invisible="1"/> + <button type="object" + name="action_view_journal_uangmuka" + class="oe_stat_button" + icon="fa-book" + attrs="{'invisible': [('is_cab_visible', '=', False)]}" + style="width: 200px;"> + <field name="move_id" widget="statinfo" string="Journal Entries"/> + <span class="o_stat_text"> + <t t-esc="record.move_misc_id.name"/> + </span> + </button> + </div> + <div class="oe_title"> + <h1> + <field name="name" readonly="1"/> + </h1> + </div> + <group col="2"> + <group> + <field name="pum_id" readonly="1"/> + <field name="title" required="1"/> + <field name="goals" required="1"/> + <field name="related" required="1"/> + <field name="approved_by" readonly="1"/> + <field name="done_status" + decoration-success="done_status == 'done_realized'" + decoration-danger="done_status == 'remaining'" + widget="badge" readonly="1"/> + <field name="note_approval" required="1"/> + <field name="lot_of_attachment"/> + </group> + <group attrs="{'invisible': [('lot_of_attachment', '!=', 'one_for_all_line')]}"> + <field name="attachment_type" attrs="{'readonly': [('status', '=', 'approved')]}"/> + + <field name="attachment_file_pdf" filename="attachment_filename" + widget="pdf_viewer" + attrs="{'invisible': [('attachment_type', '!=', 'pdf')], 'readonly': [('status', '=', 'approved')]}"/> + + <field name="attachment_file_image" filename="attachment_filename" + widget="image" + attrs="{'invisible': [('attachment_type', '!=', 'image')], 'readonly': [('status', '=', 'approved')]}" + style="max-width:250px; max-height:250px; object-fit:contain;"/> + <br/> + </group> + </group> + + <notebook> + <page string="Rincian Pemberian"> + <field name="pemberian_line_ids" nolabel="1"> + <tree editable="false" create="false" delete="false"> + <field name="date" readonly="1"/> + <field name="description" readonly="1"/> + <field name="value" sum="Total Pemberian" readonly="1"/> + </tree> + </field> + </page> + + <page string="Rincian Penggunaan"> + <field name="penggunaan_line_ids" nolabel="1"> + <tree> + <field name="date"/> + <field name="description"/> + <field name="nominal" sum="Total Penggunaan"/> + <field name="done_attachment"/> + </tree> + + <form> + <group> + <field name="lot_of_attachment" invisible="1"/> + <field name="date"/> + <field name="account_id"/> + <field name="description"/> + <field name="nominal"/> + <field name="attachment_type" + attrs="{ + 'invisible': [('lot_of_attachment', '=', 'one_for_all_line')] + }"/> + <field name="attachment_file_pdf" + filename="attachment_filename_pdf" + widget="pdf_viewer" + attrs="{ + 'invisible': [ + '|', + ('lot_of_attachment', '=', 'one_for_all_line'), + ('attachment_type', '!=', 'pdf') + ] + }"/> + <field name="attachment_file_image" + filename="attachment_filename_image" + widget="image" + attrs="{ + 'invisible': [ + '|', + ('lot_of_attachment', '=', 'one_for_all_line'), + ('attachment_type', '!=', 'image') + ] + }" + style="max-width:250px; max-height:250px; object-fit:contain;"/> + + <field name="done_attachment"/> + </group> + </form> + </field> + </page> + </notebook> + + <div style="text-align:right;"> + <button name="action_toggle_check_attachment" + type="object" + string="Check/Uncheck All Line Use PUM" + class="btn-secondary"/> + </div> + + <group col="2"> + <group class="oe_subtotal_footer oe_right"> + <field name="currency_id" invisible="1"/> + <field name="grand_total" readonly="1" widget="monetary" options="{'currency_field': 'currency_id'}"/> + <field name="grand_total_use" readonly="1" widget="monetary" options="{'currency_field': 'currency_id'}"/> + <field name="value_down_payment" readonly="1" widget="monetary" options="{'currency_field': 'currency_id'}" style="font-weight: bold;"/> + <field name="remaining_value" readonly="1" widget="monetary" options="{'currency_field': 'currency_id'}"/> + </group> + </group> + </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="action_realization_down_payment" model="ir.actions.act_window"> + <field name="name">Realisasi PUM</field> + <field name="res_model">realization.down.payment</field> + <field name="view_mode">tree,form</field> + </record> +</odoo> diff --git a/indoteknik_custom/views/ir_sequence.xml b/indoteknik_custom/views/ir_sequence.xml index 4915e4c5..372750f7 100644 --- a/indoteknik_custom/views/ir_sequence.xml +++ b/indoteknik_custom/views/ir_sequence.xml @@ -219,6 +219,16 @@ <field name="number_increment">1</field> </record> + <record id="sequence_down_payment" model="ir.sequence"> + <field name="name">Down Payment Sequence</field> + <field name="code">down.payment</field> + <field name="prefix">PUM/%(year)s/%(month)s/</field> + <field name="padding">4</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + <field name="active">True</field> + </record> + <record id="seq_refund_sale_order" model="ir.sequence"> <field name="name">Refund Sale Order</field> <field name="code">refund.sale.order</field> diff --git a/indoteknik_custom/views/mail_template_pum.xml b/indoteknik_custom/views/mail_template_pum.xml new file mode 100644 index 00000000..2863741e --- /dev/null +++ b/indoteknik_custom/views/mail_template_pum.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="0"> + + <!-- Template: Reminder Realisasi Hari Ini --> + <record id="mail_template_pum_reminder_today" model="mail.template"> + <field name="name">Reminder PUM: Hari Ini</field> + <field name="model_id" ref="indoteknik_custom.model_down_payment"/> + <field name="subject">Reminder Realisasi PUM - ${object.number}</field> + <field name="email_from">${object.email_ap}</field> + <field name="email_to">andrifebriyadiputra@gmail.com</field> + <!-- <field name="email_to">${object.email_user}</field> --> + <field name="body_html" type="html"> + <div> + <p><b>Dengan Hormat Bpk/Ibu ${object.user_id.display_name},</b></p> + + <p> + Berikut terlampir pengajuan PUM <b>${object.number}</b> sebesar + <b>${format_amount(object.nominal, object.currency_id)}</b> dari PT. INDOTEKNIK DOTCOM GEMILANG + pada tanggal ${format_date(object.create_date, 'd MMMM yyyy')}.<br/> + Tolong segera realisasikan PUM tersebut. dengan menyertakan dokumen asli untuk mendukung realisasi PUM tersebut + <b>maksimal 7 hari dari sekarang</b>.<br/> + Terima Kasih + </p> + + <br/><br/> + + <p><b>Best Regards,</b></p> + + <br/> + <p><b> + Dept. Finance<br/> + PT. INDOTEKNIK DOTCOM GEMILANG<br/> + <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2135765" alt="Indoteknik" style="max-width: 18%; height: auto;"></img><br/> + </b></p> + <p><i>Email ini dikirim otomatis, abaikan bila sudah melakukan realisasi.</i></p> + </div> + </field> + <field name="auto_delete" eval="True"/> + </record> + + <!-- Template: Reminder Realisasi H-2 --> + <record id="mail_template_pum_reminder_h_2" model="mail.template"> + <field name="name">Reminder PUM: H-2</field> + <field name="model_id" ref="indoteknik_custom.model_down_payment"/> + <field name="subject">Reminder Realisasi PUM (H-2) - ${object.number}</field> + <field name="email_from">${object.email_ap}</field> + <field name="email_to">andrifebriyadiputra@gmail.com</field> + <!-- <field name="email_to">${object.email_user}</field> --> + <field name="body_html" type="html"> + <div> + <p><b>Dengan Hormat Bpk/Ibu ${object.user_id.display_name},</b></p> + + <p> + Berikut terlampir pengajuan PUM <b>${object.number}</b> sebesar + <b>${format_amount(object.nominal, object.currency_id)}</b> dari PT. INDOTEKNIK DOTCOM GEMILANG + pada tanggal ${format_date(object.create_date, 'd MMMM yyyy')}.<br/> + Tolong segera realisasikan PUM tersebut. dengan menyertakan dokumen asli untuk mendukung realisasi PUM tersebut + <b>batas waktu tersisa 2 hari lagi</b>.<br/> + Terima Kasih + </p> + + <br/><br/> + + <p><b>Best Regards,</b></p> + + <br/> + <p><b> + Dept. Finance<br/> + PT. INDOTEKNIK DOTCOM GEMILANG<br/> + <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2135765" alt="Indoteknik" style="max-width: 18%; height: auto;"></img><br/> + </b></p> + <p><i>Email ini dikirim otomatis, abaikan bila sudah melakukan realisasi.</i></p> + </div> + </field> + <field name="auto_delete" eval="True"/> + </record> + + </data> +</odoo> |
