/[debconf-data]/penta/frontaccounting_sync.py
ViewVC logotype

Diff of /penta/frontaccounting_sync.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1447 by jimmy, Wed Jun 16 00:22:27 2010 UTC revision 1449 by jimmy, Wed Jun 16 01:01:08 2010 UTC
# Line 5  import re Line 5  import re
5  import sys  import sys
6  import dc_objs  import dc_objs
7  from BeautifulSoup import BeautifulSoup  from BeautifulSoup import BeautifulSoup
8    from ClientForm import compress_text
9    
10  FRONTACCOUNTING_URL = "https://debconf10.kaplowitz.org/account"  FRONTACCOUNTING_URL = "https://debconf10.kaplowitz.org/account"
11  HTTP_USERNAME = "XXXXXX"  HTTP_USERNAME = "XXXXXX"
# Line 81  for P in People: Line 82  for P in People:
82          br.follow_link(text="Add and Manage Customers")          br.follow_link(text="Add and Manage Customers")
83    
84          br.select_form(nr=0)          br.select_form(nr=0)
85          br["CustName"] = br["cust_ref"] = P.name          br["CustName"] = compress_text(P.name[0:40])
86          br["email"] = P.email          br["cust_ref"] = compress_text(P.name[0:30])
87            br["email"] = compress_text(P.email)
88          br["notes"] = "person_id: %d" % P.person_id          br["notes"] = "person_id: %d" % P.person_id
89          br.set_value_by_label([CAT_MAPPINGS[P.participant_category]], name="sales_type")          br.set_value_by_label([CAT_MAPPINGS[P.participant_category]], name="sales_type")
90          br.set_value_by_label(["Net 30"], name="payment_terms")          br.set_value_by_label(["Net 30"], name="payment_terms")
# Line 94  for P in People: Line 96  for P in People:
96          br.follow_link(text="Customer Branches")          br.follow_link(text="Customer Branches")
97          clean_html(br)          clean_html(br)
98          br.select_form(nr=0)          br.select_form(nr=0)
99          ajax_select(br, [P.name], name="customer_id") #XXX NAME          ajax_select(br, [compress_text(P.name[0:30]]), name="customer_id")
100          ajax_submit(br, name="ADD_ITEM")          ajax_submit(br, name="ADD_ITEM")
101    
102  # This part isn't working  # This part isn't working

Legend:
Removed from v.1447  
changed lines
  Added in v.1449

  ViewVC Help
Powered by ViewVC 1.1.5