~openerp-commiter/openobject-addons/trunk-extra-addons

« back to all changes in this revision

Viewing changes to dm/dm_print_offer_graph.py

  • Committer: Fabian Semal
  • Date: 2008-10-15 16:23:11 UTC
  • mto: (3288.4.2 account_india)
  • mto: This revision was merged to the branch mainline in revision 3294.
  • Revision ID: fabian@tinyerp.com-20081015162311-r4zgbkr6f3m9b2it
Added PO for Customes File
Added 'days' in transition delays
Fixed price progression bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    import pydot
38
38
    offer_obj = pooler.get_pool(cr.dbname).get('dm.offer')
39
39
    offer = offer_obj.browse(cr, uid, offer_id)[0]
40
 
    print "Offer : ",offer
41
 
    print "Offer step_ids : ",offer.step_ids
42
40
    nodes = {}
43
41
    for step in offer.step_ids:
44
42
        args = {}
45
43
        args['label'] = step.type
46
 
        print "DEBUG Graph",step.id
47
 
        print "Step type :",step.type
48
 
        print "args : ",args
49
44
        graph.add_node(pydot.Node(step.id, **args))
50
45
 
51
46
    for step in offer.step_ids:
52
47
        for transition in step.outgoing_transition_ids:
53
48
            trargs = {
54
 
                'label': transition.condition + ' - ' + transition.media_id.name  + '\\n' + str(transition.delay)
 
49
                'label': transition.condition + ' - ' + transition.media_id.name  + '\\n' + str(transition.delay) + ' days'
55
50
            }
56
51
            if step.split_mode=='and':
57
52
                trargs['arrowtail']='box'