summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/sourcing.xml
diff options
context:
space:
mode:
authorHafidBuroiroh <hafidburoiroh09@gmail.com>2026-03-10 10:46:23 +0700
committerHafidBuroiroh <hafidburoiroh09@gmail.com>2026-03-10 10:46:23 +0700
commitf58fe20f96995228651a5a1a09c8c17a23e13838 (patch)
treedc6700fe931d229523c478ac6f290b3e45ae871c /indoteknik_custom/views/sourcing.xml
parentd91af3da1edea3c6b8074726e5306ea42a7c0a4b (diff)
<hafid> final change request
Diffstat (limited to 'indoteknik_custom/views/sourcing.xml')
-rw-r--r--indoteknik_custom/views/sourcing.xml46
1 files changed, 26 insertions, 20 deletions
diff --git a/indoteknik_custom/views/sourcing.xml b/indoteknik_custom/views/sourcing.xml
index ebdbaaf7..006817cf 100644
--- a/indoteknik_custom/views/sourcing.xml
+++ b/indoteknik_custom/views/sourcing.xml
@@ -420,9 +420,9 @@
<field name="arch" type="xml">
<tree string="Sourcing Job Order"
decoration-warning="state=='sourcing'"
- decoration-success="state== 'done'"
+ decoration-success="state== 'approve'"
decoration-danger="state=='cancel'"
- decoration-info="state in ('sent','approve')">
+ decoration-info="state == 'sent'">
<field name="order_id" />
<field name="md_person_ids" widget="many2one_avatar_user"/>
<field name="show_salesperson" widget="many2one_avatar_user"/>
@@ -508,7 +508,7 @@
<field name="name">sourcing.job.order.line.form</field>
<field name="model">sourcing.job.order.line</field>
<field name="arch" type="xml">
- <form string="Sourcing Job">
+ <form string="Sourcing Job" create="0">
<header>
<button name="action_take"
string="Take"
@@ -577,7 +577,7 @@
<widget name="web_ribbon"
title="COMPLETE"
bg_color="bg-success"
- attrs="{'invisible': [('state', '!=', 'done')]}"/>
+ attrs="{'invisible': [('state', '!=', 'approve')]}"/>
<widget name="web_ribbon"
title="CANCEL"
@@ -593,20 +593,20 @@
<field name="is_given" invisible="1"/>
<field name="is_receiver" invisible="1"/>
<field name="md_person_ids" widget="many2one_avatar_user" readonly="1"/>
- <field name="brand_id" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="product_id" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="descriptions_md" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="code" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="product_name_md" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="price" required="1" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
+ <field name="brand_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="product_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="descriptions_md" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="code" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="product_name_md" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="price" required="1" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
<field name="now_price" force_save="1" readonly="1"/>
<field name="last_updated_price" force_save="1"/>
- <field name="vendor_id" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="tax_id" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="subtotal" readonly="1" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="product_category" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="product_type" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
- <field name="product_class" widget="many2many_tags" attrs="{'readonly': [('state', 'in', ['cancel', 'approve'])]}"/>
+ <field name="vendor_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="tax_id" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="subtotal" readonly="1" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="product_category" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="product_type" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
+ <field name="product_class" widget="many2many_tags" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
</group>
<group>
@@ -645,7 +645,7 @@
<notebook>
<page string="Cancel Reason" attrs="{'invisible': [('state', 'in', ['approve'])]}">
<group>
- <field name="reason"/>
+ <field name="reason" attrs="{'readonly': [('state', 'in', ['sent', 'cancel', 'approve'])]}"/>
</group>
</page>
</notebook>
@@ -700,6 +700,7 @@
<field name="product_name"/>
<field name="brand"/>
<field name="so_id"/>
+ <field name="show_salesperson"/>
<filter name="filter_sent"
string="Sent"
@@ -711,6 +712,10 @@
context="{'group_by':'so_id'}"/>
</group>
+ <filter name="filter_my_line"
+ string="My Line"
+ domain="[('show_salesperson','=',uid)]"/>
+
</search>
</field>
</record>
@@ -753,6 +758,7 @@
<field name="binding_model_id" ref="model_sourcing_job_order_line"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
+ <field name="groups_id" eval="[(4, ref('indoteknik_custom.group_role_sales'))]"/>
<field name="code">
records.action_multi_approve()
</field>
@@ -761,16 +767,16 @@
<record id="action_sourcing_line_approval" model="ir.actions.act_window">
<field name="name">Approval Sourcing Line</field>
<field name="res_model">sourcing.job.order.line</field>
- <field name="view_mode">tree</field>
- <field name="view_id" ref="view_sjo_line_approval_tree"/>
+ <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_sjo_line_approval_search"/>
+ <field name="domain">[('state','in',('sent','approve'))]</field>
<field name="context">
{
'search_default_filter_sent': 1,
+ 'search_default_filter_my_line': 1,
'search_default_group_so': 1
}
</field>
- <field name="groups_id" eval="[(4, ref('indoteknik_custom.group_role_sales'))]"/>
</record>
<menuitem id="menu_sourcing_line_approval"