diff options
Diffstat (limited to 'indoteknik_custom/views')
| -rw-r--r-- | indoteknik_custom/views/down_payment.xml | 45 | ||||
| -rw-r--r-- | indoteknik_custom/views/down_payment_realization.xml | 69 |
2 files changed, 101 insertions, 13 deletions
diff --git a/indoteknik_custom/views/down_payment.xml b/indoteknik_custom/views/down_payment.xml index f418b932..3830154f 100644 --- a/indoteknik_custom/views/down_payment.xml +++ b/indoteknik_custom/views/down_payment.xml @@ -11,10 +11,14 @@ string="Realisasi" class="btn-primary" attrs="{}"/> + <button name="action_draft" + string="Reset to Draft" + attrs="{'invisible': [('status', '!=', 'reject')]}" + type="object"/> <button name="action_reject" type="object" string="Reject" - attrs="{}"/> + attrs="{'invisible': [('status', 'in', ['approved','reject'])]}"/> <button name="action_confirm_payment" type="object" string="Konfirmasi Pembayaran" @@ -34,11 +38,11 @@ </h1> <group col="2"> <group string=""> - <field name="applicant_name" colspan="2"/> - <field name="nominal" colspan="2"/> - <field name="bank_name" colspan="2"/> - <field name="account_name" colspan="2"/> - <field name="bank_account" colspan="2"/> + <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')]}"/> </group> <group string="" col="2"> @@ -46,13 +50,14 @@ <field name="departement_type"/> <field name="status_pay_down_payment" readonly="1"/> <field name="create_date" readonly="1"/> + <field name="detail_note" attrs="{'readonly': [('status', '=', 'approved')]}"/> </group> </group> - - <group string=""> - <field name="detail_note"/> - </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> @@ -66,8 +71,15 @@ <field name="applicant_name"/> <field name="nominal"/> <field name="departement_type" optional='hide'/> - <field name="status"/> - <field name="status_pay_down_payment"/> + <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"/> </tree> </field> </record> @@ -78,7 +90,14 @@ <field name="view_mode">tree,form</field> </record> - <menuitem id="menu_down_payment" + <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" diff --git a/indoteknik_custom/views/down_payment_realization.xml b/indoteknik_custom/views/down_payment_realization.xml new file mode 100644 index 00000000..ab8034c6 --- /dev/null +++ b/indoteknik_custom/views/down_payment_realization.xml @@ -0,0 +1,69 @@ +<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"> + <sheet> + <h1> + <field name="title" class="oe_title"/> + </h1> + + <group col="2"> + <group> + <field name="pum_id" readonly="1"/> + <field name="goals" required="1"/> + <field name="related" required="1"/> + </group> + <group> + <field name="note_approval" required="1"/> + </group> + </group> + + <notebook> + <page string="Rincian Pemberian"> + <field name="pemberian_line_ids" nolabel="1"> + <tree editable="bottom"> + <field name="date"/> + <field name="description"/> + <field name="value" sum="Total Pemberian"/> + </tree> + </field> + </page> + + <page string="Rincian Penggunaan"> + <field name="penggunaan_line_ids" nolabel="1"> + <tree editable="bottom"> + <field name="date"/> + <field name="description"/> + <field name="nominal" sum="Total Penggunaan"/> + <field name="attachment"/> + </tree> + </field> + </page> + </notebook> + + <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> |
