~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to sale_override/sale_workflow.xml

  • Committer: chloups208
  • Date: 2011-09-07 12:58:12 UTC
  • mto: (307.2.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: chloups208@chloups208-laptop-20110907125812-dsb1jt93ae6bgfe2
[UF-390]pro forma invoice + shipment object refactoring + pack family object refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8" ?>
2
 
<openerp>
3
 
    <data>
4
 
    
5
 
        <record id="act_sale_loan" model="workflow.activity">
6
 
            <field name="wkf_id" ref="sale.wkf_sale"/>
7
 
            <field name="name">loan</field>
8
 
            <field name="kind">subflow</field>
9
 
            <field name="subflow_id" search="[('osv','=','purchase.order')]" type="int"/>
10
 
            <field name="action">action_purchase_order_create()</field>
11
 
        </record>
12
 
        <record id="act_sale_loan_done" model="workflow.activity">
13
 
            <field name="wkf_id" ref="sale.wkf_sale" />
14
 
            <field name="name">loan_done</field>
15
 
        </record>
16
 
 
17
 
        <record id="act_sale_order_validated" model="workflow.activity">
18
 
            <field name="wkf_id" ref="sale.wkf_sale" />
19
 
            <field name="name">order_validated</field>
20
 
            <field name="kind">function</field>
21
 
            <field name="action">wkf_validated()</field>
22
 
        </record>
23
 
 
24
 
        <record id="trans_draft_validated" model="workflow.transition">
25
 
            <field name="act_from" ref="sale.act_draft" />
26
 
            <field name="act_to" ref="act_sale_order_validated" />
27
 
            <field name="signal">order_validated</field>
28
 
        </record>
29
 
 
30
 
        <record id="trans_draft_cancel" model="workflow.transition">
31
 
            <field name="act_from" ref="act_sale_order_validated"/>
32
 
            <field name="act_to" ref="sale.act_cancel"/>
33
 
            <field name="signal">cancel</field>
34
 
        </record>
35
 
 
36
 
        <record id="trans_sale_router_loan" model="workflow.transition">
37
 
            <field name="act_from" ref="sale.act_router" />
38
 
            <field name="act_to" ref="act_sale_loan" />
39
 
            <field name="condition">order_type=='loan' and not loan_id and not is_a_counterpart</field>
40
 
        </record>
41
 
        <record id="trans_sale_router_loan_done" model="workflow.transition">
42
 
            <field name="act_from" ref="sale.act_router" />
43
 
            <field name="act_to" ref="act_sale_loan_done" />
44
 
            <field name="condition">order_type!='loan' or loan_id or is_a_counterpart</field>
45
 
        </record>
46
 
        <record id="trans_sale_loan_done" model="workflow.transition">
47
 
            <field name="act_from" ref="act_sale_loan"/>
48
 
            <field name="act_to" ref="act_sale_loan_done"/>
49
 
            <field name="signal">subflow.done</field>
50
 
        </record>
51
 
        <record id="trans_sale_loand_done_end" model="workflow.transition">
52
 
            <field name="act_from" ref="act_sale_loan_done" />
53
 
            <field name="act_to" ref="sale.act_done" />
54
 
        </record>
55
 
        <record id="sale.trans_router_wait_invoice_shipping" model="workflow.transition">
56
 
            <field name="act_from" ref="sale.act_wait_invoice"/>
57
 
            <field name="act_to" ref="sale.act_invoice_end"/>
58
 
            <field name="condition">(order_policy=='picking') or order_type!='regular' or (order_type=='regular' and partner_id.partner_type=='internal')</field>
59
 
        </record>
60
 
 
61
 
        <!--<record id="sale.act_ship_corrected" model="workflow.activity">
62
 
            <field name="wkf_id" ref="sale.wkf_sale" />
63
 
            <field name="name">ship_corrected</field>
64
 
            <field name="kind">function</field>
65
 
            <field name="action">sale_except_correction()</field>
66
 
        </record>
67
 
 
68
 
        <record id="sale.trans_ship_except_ship_end" model="workflow.transition">
69
 
            <field name="act_from" ref="sale.act_ship_except" />
70
 
            <field name="act_to" ref="sale.act_ship_corrected" />-->
71
 
            <!--<field name="signal">ship_corrected</field>-->
72
 
            <!--            <field name="signal" eval="False" />
73
 
        </record>
74
 
 
75
 
        <record id="sale.trans_ship_corrected_ship_end" model="workflow.transition">
76
 
            <field name="act_from" ref="sale.act_ship_corrected" />
77
 
            <field name="act_to" ref="sale.act_ship" />
78
 
        </record>-->
79
 
        
80
 
        <!-- SPLIT STEP -->
81
 
        
82
 
        <record id="act_sale_order_split" model="workflow.activity">
83
 
            <field name="wkf_id" ref="sale.wkf_sale" />
84
 
            <field name="name">order_split</field>
85
 
            <field name="kind">function</field>
86
 
            <field name="action">wkf_split()</field>
87
 
        </record>
88
 
        
89
 
        <record id="trans_validated_split" model="workflow.transition">
90
 
            <field name="act_from" ref="act_sale_order_validated" />
91
 
            <field name="act_to" ref="act_sale_order_split" />
92
 
            <field name="signal">order_confirm</field>
93
 
            <field name="condition">split_type_sale_order == 'original_sale_order' and not from_yml_test</field>
94
 
        </record>
95
 
        
96
 
        <!-- new DONE STEP -->
97
 
        
98
 
        <record id="act_sale_order_split_done" model="workflow.activity">
99
 
            <field name="wkf_id" ref="sale.wkf_sale" />
100
 
            <field name="flow_stop">True</field>
101
 
            <field name="name">split_done</field>
102
 
            <field name="kind">function</field>
103
 
            <field name="action">wkf_split_done()</field>
104
 
        </record>
105
 
        
106
 
        <record id="trans_split_split_done" model="workflow.transition">
107
 
            <field name="act_from" ref="act_sale_order_split" />
108
 
            <field name="act_to" ref="act_sale_order_split_done" />
109
 
            <field name="condition">True</field>
110
 
        </record>
111
 
        
112
 
        <!-- SHIP_PROCUREMENT STEP -->
113
 
        
114
 
        <record id="act_sale_order_ship_procurement" model="workflow.activity">
115
 
            <field name="wkf_id" ref="sale.wkf_sale" />
116
 
            <field name="name">ship_procurement</field>
117
 
            <field name="kind">function</field>
118
 
            <field name="action">action_ship_proc_create()</field>
119
 
        </record>
120
 
        
121
 
        <record id="trans_validated_ship_procurement" model="workflow.transition">
122
 
            <field name="act_from" ref="act_sale_order_validated" />
123
 
            <field name="act_to" ref="act_sale_order_ship_procurement" />
124
 
            <field name="signal">order_confirm</field>
125
 
            <field name="condition">split_type_sale_order != 'original_sale_order' or from_yml_test</field>
126
 
        </record>
127
 
        
128
 
        <record id="trans_ship_procurement_router" model="workflow.transition">
129
 
            <field name="act_from" ref="act_sale_order_ship_procurement"/>
130
 
            <field name="act_to" ref="sale.act_router"/>
131
 
            <field name="condition">test_lines()</field>
132
 
        </record>
133
 
        
134
 
        <!-- MODIFY Transition so ship_procurement is always reached. yml backward compatibility, so procurement orders are created -->
135
 
        
136
 
        <record id="sale.trans_draft_router" model="workflow.transition">
137
 
            <field name="act_from" ref="sale.act_draft"/>
138
 
            <field name="act_to" ref="act_sale_order_ship_procurement"/>
139
 
            <field name="signal">order_confirm</field>
140
 
        </record>
141
 
 
142
 
    </data>
143
 
</openerp>