| 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" |
| 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") |
| 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 |