summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/sourcing.xml
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/views/sourcing.xml')
-rw-r--r--indoteknik_custom/views/sourcing.xml51
1 files changed, 43 insertions, 8 deletions
diff --git a/indoteknik_custom/views/sourcing.xml b/indoteknik_custom/views/sourcing.xml
index 3965c62f..f7e04f04 100644
--- a/indoteknik_custom/views/sourcing.xml
+++ b/indoteknik_custom/views/sourcing.xml
@@ -70,7 +70,7 @@
type="object"
class="btn-primary"
groups="indoteknik_custom.group_role_merchandiser"
- attrs="{'invisible': [('is_creator_same_user', '=', False)]}"/>
+ attrs="{'invisible': ['|', ('is_creator_same_user', '=', False), ('state', 'in', ['done', 'cancel'])]}"/>
<button name="action_confirm_approval"
string="Approve"
@@ -93,6 +93,13 @@
groups="indoteknik_custom.group_role_merchandiser"
attrs="{'invisible': [('can_approve_takeover', '=', False)]}"/>
+ <button name="action_convert_all_lines"
+ string="Convert Lines"
+ type="object"
+ class="btn-success"
+ groups="indoteknik_custom.group_role_merchandiser"
+ attrs="{'invisible': [('can_convert_to_product', '=', False)]}"/>
+
<button name="action_reject_takeover"
string="Reject Takeover"
type="object"
@@ -106,6 +113,15 @@
</header>
<sheet>
+ <div class="oe_button_box" name="button_box">
+ <button name="action_open_converted_products"
+ type="object"
+ class="oe_stat_button"
+ icon="fa-cubes"
+ attrs="{'invisible': [('converted_product_count', '=', 0)]}">
+ <field name="converted_product_count" widget="statinfo" string="Products"/>
+ </button>
+ </div>
<widget name="web_ribbon"
title="COMPLETE"
bg_color="bg-success"
@@ -128,7 +144,7 @@
<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"/>
+ <field name="can_convert_to_product" invisible="1"/>
</group>
<group>
<field name="create_uid" readonly="1" widget="many2one_avatar_user"/>
@@ -151,7 +167,7 @@
<!-- MD EDIT -->
<page string="MD Lines" groups="indoteknik_custom.group_role_merchandiser">
<field name="line_md_edit_ids">
- <tree editable="bottom"
+ <tree
decoration-success="state in ('done', 'convert')"
decoration-danger="state=='cancel'"
decoration-warning="state=='sourcing'">
@@ -163,17 +179,36 @@
<field name="vendor_id"/>
<field name="tax_id"/>
<field name="subtotal"/>
- <field name="product_category"/>
- <field name="product_type"/>
- <field name="product_class"/>
<field name="state"/>
- <field name="reason" attrs="{'invisible': [('state', '!=', 'cancel')]}"/>
- <button name="action_convert_to_product"
+ <field name="sla"/>
+ <button name="action_convert_to_product"
string="Convert"
type="object"
icon="fa-exchange"
attrs="{'invisible': [('state', '!=', 'done')]}"/>
</tree>
+ <form string="MD Line">
+ <group>
+ <group>
+ <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" readonly="1"/>
+ <field name="sla"/>
+ </group>
+ <group>
+ <field name="product_category"/>
+ <field name="product_type"/>
+ <field name="product_class" widget="many2many_tags"/>
+ <field name="state"/>
+ <field name="reason" attrs="{'invisible': [('state', '!=', 'cancel')]}"/>
+ </group>
+ </group>
+ </form>
</field>
</page>