mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 18:29:08 +02:00
work on sales flow
This commit is contained in:
@@ -11,11 +11,11 @@ class sale_order(models.Model):
|
|||||||
|
|
||||||
state = fields.Selection([
|
state = fields.Selection([
|
||||||
('draft', 'new'),
|
('draft', 'new'),
|
||||||
('approval', 'Submmited To MGT'),
|
('approval', 'Submitted To MGT'),
|
||||||
('approved', 'Approved By MGT'),
|
('approved', 'Approved By MGT'),
|
||||||
('logistics_approval', 'Validated By Logistic'),
|
('logistics_approval', 'Validated By LC'),
|
||||||
('logistics_approved', 'validated by logistic'),
|
('logistics_approved', 'validated By LC'),
|
||||||
('credit_approval', 'Validated By CC'),
|
('credit_approval', 'Submitted By CC'),
|
||||||
('sent', 'Quotation Sent'),
|
('sent', 'Quotation Sent'),
|
||||||
('sale', 'Sales Order'),
|
('sale', 'Sales Order'),
|
||||||
('done', 'Locked'),
|
('done', 'Locked'),
|
||||||
|
|||||||
@@ -5,15 +5,8 @@
|
|||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<!-- <xpath expr="//button[@name='action_confirm'][2]" position="replace">-->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <button name="action_confirm" groups="MKS_Tradex_Backend_2.group_credit_controller" string="Sale Confirm" class="btn-primary" type="object" attrs="{'invisible': [('state', 'not in', ['sale'])]}"/>-->
|
|
||||||
<!-- </xpath>-->
|
|
||||||
|
|
||||||
<xpath expr="//button[@name='action_confirm'][2]" position="replace">
|
|
||||||
<button name="action_credit_approval" groups="MKS_Tradex_Backend_2.group_credit_controller" string="Validated By CC" class="btn-primary" type="object" attrs="{'invisible': [('state', 'not in', ['logistics_approval'])]}"/>
|
|
||||||
<button name="action_confirm" groups="MKS_Tradex_Backend_2.group_sale_logistics,MKS_Tradex_Backend_2.group_credit_controller" string="Create SO" class="btn-primary" type="object" attrs="{'invisible': [('state', 'not in', ['credit_approval'])]}"/>
|
|
||||||
</xpath>
|
|
||||||
|
|
||||||
<xpath expr="//button[@name='action_quotation_send']" position="after">
|
<xpath expr="//button[@name='action_quotation_send']" position="after">
|
||||||
<button name="action_manager_approval" groups = "sales_team.group_sale_manager" string="Approved By MGT" type="object" attrs="{'invisible': [('state', 'not in', ['approval'])]}" class="btn-primary"/>
|
<button name="action_manager_approval" groups = "sales_team.group_sale_manager" string="Approved By MGT" type="object" attrs="{'invisible': [('state', 'not in', ['approval'])]}" class="btn-primary"/>
|
||||||
@@ -34,11 +27,16 @@
|
|||||||
|
|
||||||
|
|
||||||
<xpath expr="//button[@name='action_confirm']" position="after">
|
<xpath expr="//button[@name='action_confirm']" position="after">
|
||||||
<button name="action_logistics_approval" groups="sales_team.group_sale_salesman" states="approved" type="object" string="Validated By Logistic"/>
|
<button name="action_logistics_approval" groups="sales_team.group_sale_salesman" states="approved" type="object" string="Validated By LC"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//button[@name='action_confirm']" position="after">
|
<!-- <xpath expr="//button[@name='action_confirm']" position="after">
|
||||||
<button name="action_logistics_approve" groups="MKS_Tradex_Backend_2.group_sale_logistics" states="logistics_approval" type="object" string="Confirm"/>
|
<button name="action_logistics_approve" groups="MKS_Tradex_Backend_2.group_sale_logistics" states="logistics_approval" type="object" string="Confirm"/>
|
||||||
|
</xpath> -->
|
||||||
|
<xpath expr="//button[@name='action_confirm'][2]" position="replace">
|
||||||
|
<button name="action_credit_approval" groups="MKS_Tradex_Backend_2.group_credit_controller" string="Submit To CC" class="btn-primary" type="object" attrs="{'invisible': [('state', 'not in', ['logistics_approval'])]}"/>
|
||||||
|
|
||||||
|
<button name="action_confirm" groups="MKS_Tradex_Backend_2.group_sale_logistics,MKS_Tradex_Backend_2.group_credit_controller" string="Create SO" class="btn-primary" type="object" attrs="{'invisible': [('state', 'not in', ['credit_approval'])]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user