diff options
| author | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2025-10-24 11:24:58 +0700 |
|---|---|---|
| committer | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2025-10-24 11:24:58 +0700 |
| commit | f4a1e2917d550eb205e33b058f07e7edbf8029c8 (patch) | |
| tree | 757cef98c3c94ce7327fff3bbadd06a269f4fa88 /indoteknik_custom/views | |
| parent | 51ebcf6f9b57c61efabb9e4e0b4fc8d5bc058512 (diff) | |
<hafid> sjo half
Diffstat (limited to 'indoteknik_custom/views')
| -rw-r--r-- | indoteknik_custom/views/ir_sequence.xml | 9 | ||||
| -rw-r--r-- | indoteknik_custom/views/sourcing.xml | 182 |
2 files changed, 190 insertions, 1 deletions
diff --git a/indoteknik_custom/views/ir_sequence.xml b/indoteknik_custom/views/ir_sequence.xml index 4b8fec53..5ea7324b 100644 --- a/indoteknik_custom/views/ir_sequence.xml +++ b/indoteknik_custom/views/ir_sequence.xml @@ -218,7 +218,14 @@ <field name="number_next">1</field> <field name="number_increment">1</field> </record> - + <record id="seq_sourcing_job_order" model="ir.sequence"> + <field name="name">Sourcing Job Order</field> + <field name="code">sourcing.job.order</field> + <field name="prefix">SJO/%(year)s/</field> + <field name="padding">4</field> + <field name="number_next_actual">1</field> + <field name="number_increment">1</field> + </record> <record id="seq_refund_sale_order" model="ir.sequence"> <field name="name">Refund Sales Order</field> <field name="code">refund.sale.order</field> diff --git a/indoteknik_custom/views/sourcing.xml b/indoteknik_custom/views/sourcing.xml index e69de29b..f9f8f386 100644 --- a/indoteknik_custom/views/sourcing.xml +++ b/indoteknik_custom/views/sourcing.xml @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="UTF-8"?> +<odoo> + <record id="view_sourcing_job_order_tree" model="ir.ui.view"> + <field name="name">sourcing.job.order.tree</field> + <field name="model">sourcing.job.order</field> + <field name="arch" type="xml"> + <tree string="Sourcing Job Orders" + decoration-success="state=='done'" + decoration-danger="state=='cancel'" + decoration-warning="state=='taken'"> + <field name="name"/> + <!-- <field name="leads_id"/> --> + <field name="user_id" widget="many2one_avatar_user"/> + <field name="state" widget="badge"/> + <field name="create_date"/> + </tree> + </field> + </record> + + <record id="view_sourcing_job_order_form" model="ir.ui.view"> + <field name="name">sourcing.job.order.form</field> + <field name="model">sourcing.job.order</field> + <field name="arch" type="xml"> + <form string="Sourcing Job Order"> + <header> + <button name="action_take" + string="Take" + type="object" + class="btn-primary" + icon="fa-hand-paper-o" + groups="indoteknik_custom.group_role_merchandiser" + attrs="{'invisible': [('state', '!=', 'draft')]}"/> + + <button name="action_cancel" + string="Cancel" + type="object" + class="btn-secondary" + icon="fa-times" + groups="indoteknik_custom.group_role_merchandiser" + attrs="{'invisible': [('state', 'in', ['cancel', 'done'])]}"/> + <button name="action_request_takeover" + string="Request Takeover" + type="object" + class="btn-primary" + groups="indoteknik_custom.group_role_merchandiser" + attrs="{'invisible': [('can_request_takeover', '=', False)]}"/> + + <button name="action_approve_takeover" + string="Approve Takeover" + type="object" + class="btn-success" + groups="indoteknik_custom.group_role_merchandiser" + attrs="{'invisible': [('can_approve_takeover', '=', False)]}"/> + + <button name="action_reject_takeover" + string="Reject Takeover" + type="object" + class="btn-danger" + groups="indoteknik_custom.group_role_merchandiser" + attrs="{'invisible': [('can_approve_takeover', '=', False)]}"/> + + <field name="state" widget="statusbar" + statusbar_visible="draft,taken,done,cancel" + statusbar_colors='{"draft": "blue", "taken": "orange", "done": "green", "cancel": "red"}'/> + </header> + + <sheet> + <h1> + <field name="name" readonly="1"/> + </h1> + + <group> + <group> + <!-- <field name="leads_id"/> --> + <field name="eta_sales"/> + <field name="takeover_request" invisible="1"/> + <field name="can_request_takeover" invisible="1"/> + <field name="can_approve_takeover" invisible="1"/> + <field name="has_price_in_lines" invisible="1"/> + <field name="sla_product" groups="indoteknik_custom.group_role_merchandiser"/> + </group> + <group> + <field name="create_uid" readonly="1" widget="many2one_avatar_user"/> + <field name="user_id" readonly="1" widget="many2one_avatar_user"/> + </group> + </group> + + <notebook> + <page string="Product Line" groups="indoteknik_custom.group_role_sales" attrs="{'invisible': [('has_price_in_lines', '=', True)]}"> + <field name="line_sales_input_ids"> + <tree editable="bottom"> + <field name="product_name"/> + <field name="descriptions"/> + <field name="quantity"/> + </tree> + </field> + </page> + + <!-- MD EDIT --> + <page string="MD Lines" groups="indoteknik_custom.group_role_merchandiser"> + <field name="line_md_edit_ids"> + <tree editable="bottom"> + <field name="code"/> + <field name="product_name"/> + <field name="descriptions"/> + <field name="quantity"/> + <field name="price"/> + <field name="vendor_id"/> + <field name="tax_id"/> + <field name="subtotal"/> + </tree> + </field> + </page> + + <!-- SALES VIEW --> + <page string="Product Line" groups="indoteknik_custom.group_role_sales" attrs="{'invisible': [('has_price_in_lines', '=', False)]}"> + <field name="line_sales_view_ids"> + <tree> + <field name="code" readonly="1"/> + <field name="product_name" readonly="1"/> + <field name="descriptions" readonly="1"/> + <field name="quantity" readonly="1"/> + <field name="price" readonly="1"/> + <field name="vendor_id" readonly="1"/> + <field name="tax_id" readonly="1"/> + <field name="subtotal" readonly="1"/> + </tree> + </field> + </page> + + <page string="Documents"> + <field name="product_assets" widget="pdf_viewer"/> + </page> + + <page string="Cancel Reason" attrs="{'invisible': [('state', 'in', ['done'])]}"> + <group> + <field name="cancel_reason"/> + </group> + </page> + </notebook> + </sheet> + <div class="oe_chatter"> + <field name="message_follower_ids" widget="mail_followers"/> + <field name="message_ids" widget="mail_thread"/> + <field name="activity_ids" widget="mail_activity"/> + </div> + </form> + </field> + </record> + + <record id="action_sourcing_job_order_multi_take" model="ir.actions.server"> + <field name="name">Take Selected Jobs</field> + <field name="model_id" ref="model_sourcing_job_order"/> + <field name="binding_model_id" ref="model_sourcing_job_order"/> + <field name="binding_type">action</field> + <field name="state">code</field> + <field name="code">action = records.action_multi_take()</field> + <field name="groups_id" eval="[(4, ref('indoteknik_custom.group_role_merchandiser'))]"/> + </record> + + <record id="action_sourcing_job_order" model="ir.actions.act_window"> + <field name="name">Sourcing Job Orders</field> + <field name="res_model">sourcing.job.order</field> + <field name="view_mode">tree,form</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Buat Sourcing Job Order baru di sini ✨ + </p> + </field> + </record> + + <menuitem id="menu_md_root" + name="MD" + parent="crm.crm_menu_root" + sequence="80"/> + + <menuitem id="menu_sourcing_job_order" + name="Sourcing Job Order" + parent="menu_md_root" + action="action_sourcing_job_order" + sequence="90"/> +</odoo> |
