diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-06-13 17:19:28 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-06-13 17:19:28 +0700 |
| commit | d2c05ac97f195e196605d91088d6f76d9312e528 (patch) | |
| tree | 6968bce8655a77298efaf36f84169ac5bf9b09e3 /indoteknik_custom/views/tukar_guling.xml | |
| parent | 860abd78b0474279f851378f0b6507fe71fd76be (diff) | |
<miqdad> match with meet
Diffstat (limited to 'indoteknik_custom/views/tukar_guling.xml')
| -rw-r--r-- | indoteknik_custom/views/tukar_guling.xml | 149 |
1 files changed, 108 insertions, 41 deletions
diff --git a/indoteknik_custom/views/tukar_guling.xml b/indoteknik_custom/views/tukar_guling.xml index 34f2fa48..8fffcbb0 100644 --- a/indoteknik_custom/views/tukar_guling.xml +++ b/indoteknik_custom/views/tukar_guling.xml @@ -1,50 +1,117 @@ <?xml version="1.0" encoding="UTF-8" ?> <odoo> - <record id="action_pengajuan_tukar_guling" model="ir.actions.act_window"> - <field name="name">Pengajuan Tukar Guling</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">tukar.guling</field> - <field name="view_mode">tree,form</field> - </record> + <data> + <!-- Action --> + <record id="action_pengajuan_tukar_guling" model="ir.actions.act_window"> + <field name="name">Pengajuan Tukar Guling</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">tukar.guling</field> + <field name="view_mode">tree,form</field> + </record> - <menuitem - id="menu_pengajuan_tukar_guling" - name="Pengajuan Tukar Guling" - parent="stock.menu_warehouse_report" - sequence="3" - action="action_pengajuan_tukar_guling" - /> + <!-- Menu --> + <menuitem + id="menu_pengajuan_tukar_guling" + name="Pengajuan Tukar Guling" + parent="stock.menu_warehouse_report" + sequence="3" + action="action_pengajuan_tukar_guling" + /> - <record id="seq_tukar_guling" model="ir.sequence"> - <field name="name">Pengajuan Tukar Guling</field> - <field name="code">tukar.guling</field> - <field name="prefix">PTG/</field> - <field name="padding">5</field> - <field name="number_next">1</field> - <field name="number_increment">1</field> - <field name="company_id" eval="False"/> - </record> + <!-- Sequence --> + <record id="seq_tukar_guling" model="ir.sequence"> + <field name="name">Pengajuan Tukar Guling</field> + <field name="code">tukar.guling</field> + <field name="prefix">PTG/</field> + <field name="padding">5</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + <field name="company_id" eval="False"/> + </record> - <record id="pengajuan_tukar_guling_tree" model="ir.ui.view"> - <field name="name">pengajuan.tukar.guling.tree</field> - <field name="model">tukar.guling</field> - <field name="arch" type="xml"> - <tree create="1" default_order="create_date desc"> + <!-- Tree View --> + <record id="pengajuan_tukar_guling_tree" model="ir.ui.view"> + <field name="name">pengajuan.tukar.guling.tree</field> + <field name="model">tukar.guling</field> + <field name="arch" type="xml"> + <tree create="1" delete="1" default_order="create_date desc"> <field name="name"/> <field name="date"/> - </tree> - </field> - </record> + <field name="out_num" string="BU/Out"/> + <field name="ba_num" string="Nomor BA"/> + <field name="return_type" string="Return Type"/> + <field name="state" widget="badge" + decoration-info="state in ('draft', 'waiting')" + decoration-success="state == 'done'" + decoration-muted="state == 'cancel'" + /> + </tree> + </field> + </record> - <record id="pengajuan_tukar_guling_form" model="ir.ui.view"> - <field name="name">pengajuan.tukar.guling.form</field> - <field name="model">tukar.guling</field> - <field name="arch" type="xml"> - <form> - <group> - <field name="name" widget="text"/> - </group> - </form> - </field> - </record> + <!-- Form View --> + <record id="pengajuan_tukar_guling_form" model="ir.ui.view"> + <field name="name">pengajuan.tukar.guling.form</field> + <field name="model">tukar.guling</field> + <field name="arch" type="xml"> + <form> + <header> + <button name="action_submit" string="Submit" type="object" + class="btn-primary" + attrs="{'invisible': [('state', '!=', 'draft')]}"/> + <button name="action_approve" string="Approve" type="object" + class="btn-primary" + attrs="{'invisible': [('state', '!=', 'waiting')]}"/> + <button name="action_cancel" string="Cancel" type="object" + class="btn-secondary" + attrs="{'invisible': [('state', 'in', ('done', 'cancel'))]}" + confirm="Are you sure you want to cancel this record?"/> + <button name="action_draft" string="Set to Draft" type="object" + class="btn-secondary" + attrs="{'invisible': [('state', '!=', 'cancel')]}" + confirm="Are you sure you want to reset this record to draft?"/> + <field name="state" widget="statusbar" + statusbar_visible="draft,waiting,done,cancel"/> + </header> + <sheet> + <div class="oe_title"> + <h1> + <field name="name" readonly="1" class="oe_inline"/> + </h1> + <hr/> + </div> + <group> + <group> + <field name="date" string="Date" readonly="1"/> + <field name="out_num" string="BU/Out"/> + <field name="ba_num" string="Nomor BA"/> + </group> + <group> + <field name="return_type"/> + <field name="notes"/> + <field name="state" readonly="1"/> + </group> + </group> + + <!-- Product Lines --> + <notebook> + <page string="Product Lines" name="product_lines"> + <field name="line_ids"> + <tree string="Product Lines" editable="bottom"> + <field name="sequence" widget="handle"/> + <field name="product_id" required="1" + options="{'no_create': True, 'no_create_edit': True}"/> + <field name="name" force_save="1"/> + <field name="product_uom_qty" string="Quantity"/> + <field name="product_uom" string="UoM" + options="{'no_create': True, 'no_create_edit': True}"/> + </tree> + </field> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + </data> </odoo>
\ No newline at end of file |
