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([
|
||||
('draft', 'new'),
|
||||
('approval', 'Submmited To MGT'),
|
||||
('approval', 'Submitted To MGT'),
|
||||
('approved', 'Approved By MGT'),
|
||||
('logistics_approval', 'Validated By Logistic'),
|
||||
('logistics_approved', 'validated by logistic'),
|
||||
('credit_approval', 'Validated By CC'),
|
||||
('logistics_approval', 'Validated By LC'),
|
||||
('logistics_approved', 'validated By LC'),
|
||||
('credit_approval', 'Submitted By CC'),
|
||||
('sent', 'Quotation Sent'),
|
||||
('sale', 'Sales Order'),
|
||||
('done', 'Locked'),
|
||||
|
||||
@@ -5,24 +5,17 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<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">
|
||||
<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_managment_reject" groups = "sales_team.group_sale_manager" string="Rejected By MGT" type="object" attrs="{'invisible': [('state', 'not in', ['approval'])]}" class="btn-primary"/>
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="reset" string="Reset" type="object" attrs="{'invisible': [('state', 'not in', ['reject'])]}" class="btn-primary"/>
|
||||
</xpath>
|
||||
</xpath>
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="reset" string="Reset" type="object" attrs="{'invisible': [('state', 'not in', ['reject'])]}" class="btn-primary"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//button[@name='action_quotation_send']" position="replace">
|
||||
<button name="action_quotation_send" string="Send by Email" type="object" states="approved" class="btn-primary"/>
|
||||
@@ -34,11 +27,16 @@
|
||||
|
||||
|
||||
<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 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"/>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user