def init(db, Class, String, **kw): keyword = Class \ ( db, "keyword" , name = String (indexme = 'no') , description = String (indexme = 'no') ) keyword.setkey("name")
def init (db, Class, Boolean, Number, String, Link, Multilink, ** kw) : export = {} docstat = Class \ ( db, "doc_issue_status" , name = String (indexme = 'no') , description = String (indexme = 'no') , order = Number () , transitions = Multilink ("doc_issue_status") , nosy = Multilink ("user") , need_msg = Boolean () , may_change_state_to = Multilink ("status") ) docstat.setkey ("name") class DI_Optional_Doc_Issue_Class (kw ['Optional_Doc_Issue_Class']) : """ extends the normal Optional_Doc_Issue_Class with doc_issue_status """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( doc_issue_status = Link ("doc_issue_status") ) self.__super.__init__ (db, classname, ** properties) # end def __init__ # end class DI_Optional_Doc_Issue_Class export ['Optional_Doc_Issue_Class'] = DI_Optional_Doc_Issue_Class return export
def init(db, Class, String, Date, **kw): job_log = Class \ ( db, "job_log" , job_key = String (indexme = 'no') , timestamp = Date () , comment = String (indexme = 'no') ) job_log.setkey("job_key") job_log.setlabelprop("job_key")
def init(db, Class, String, **kw): umts = Class \ ( db, ''"email" , server = String () , sender = String () , user_name = String () , password = String () ) umts.setkey('' "server")
def init(db, Class, String, Date, Link, Multilink, Number, **kw): client = Class \ ( db , ''"legalclient" , lastname = String () , firstname = String () , born = Date () , first_date = Date () , last_date = Date () , messages = Multilink ("msg") ) client.setlabelprop("lastname")
def init \ ( db , Class , String , Date , Link , Boolean , Number , ** kw ) : umts = Class \ ( db, ''"umts" , tty = String () , pin = String () ) umts.setkey (''"tty")
def init \ ( db , Class , Superseder_Issue_Class , Ext_Mixin , String , Date , Link , Multilink , Number , Boolean , ** kw ) : stat = Class \ ( db, "status" , name = String (indexme = 'no') , description = String (indexme = 'no') , transitions = Multilink ("status") , order = Number () , relaxed = Boolean () ) stat.setkey ("name") prio = Class \ ( db , ''"prio" , name = String () , order = Number () ) prio.setkey ("name") Superseder_Issue_Class \ ( db, "issue" , keywords = Multilink ("keyword", do_journal = 'no') , priority = Link ("prio", do_journal = 'no') , status = Link ("status", do_journal = 'no') , closed = Date () )
def init \ ( db , Class , Ext_Class , String , Date , Link , Multilink , Boolean , Number , ** kw ) : do_index = "no" export = {} currency = Class \ ( db, ''"currency" , name = String () , description = String () ) currency.setkey (''"name") class Invoice_Class (Ext_Class) : """ Create an invoice class that should be extended in later definitions -- either as a simple invoice for abo or more complex for ERP. """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( invoice_no = String () , amount = Number () , currency = Link ("currency") , balance_open = Number () , amount_payed = Number () , open = Boolean () , n_sent = Number () , last_sent = Date () , send_it = Boolean () , payment = Multilink ("payment") , letters = Multilink ("letter") ) self.__super.__init__ (db, classname, ** properties) self.setkey (''"invoice_no") # end def __init__ # end class Invoice_Class export.update (dict (Invoice_Class = Invoice_Class)) # The invoice_level number decides for which invoice level we use # which template. invoice_template = Class \ ( db, ''"invoice_template" , tmplate = Link ("tmplate") , invoice_level = Number () , interval = Number () , name = String () ) invoice_template.setkey (''"name") payment = Class \ ( db, ''"payment" , invoice = Link ("invoice") , amount = Number () , date_payed = Date () , receipt_no = String () ) payment.setkey (''"receipt_no") return export
def init \ ( db , Class , Full_Issue_Class , IT_Issue_Baseclass , Superseder_Issue_Class , Boolean , Date , Link , Multilink , Number , String , ** kw ) : it_category = Class \ ( db , ''"it_category" , name = String () , description = String () , valid = Boolean () , nosy = Multilink ("user") , responsible = Link ("user") ) it_category.setkey ("name") # Sort of ITIL main process # If log_template is non-empty we log with the given template to # syslog. it_request_type = Class \ ( db, ''"it_request_type" , name = String () , order = Number () , log_template = String () , close_immediately = Boolean () , title_regex = String () ) it_request_type.setkey ('name') IT_Issue_Baseclass \ ( db , ''"it_issue" , status = Link ("it_issue_status", do_journal='no') , it_prio = Link ("it_prio", do_journal='no') , category = Link ("it_category", do_journal='no') , stakeholder = Link ("user", do_journal='no' , msg_header_property = 'username' ) , deadline = Date () , it_project = Link ("it_project") , confidential = Boolean () , it_request_type = Link ("it_request_type") , int_prio = Link ("it_int_prio") ) it_issue_status = Class \ ( db , ''"it_issue_status" , name = String () , description = String () , transitions = Multilink ("it_issue_status") , order = Number () , relaxed = Boolean () ) it_issue_status.setkey ("name") it_prio = Class \ ( db , ''"it_prio" , name = String () , order = Number () , must_change = Boolean () , default = Boolean () ) it_prio.setkey ("name") it_int_prio = Class \ ( db , ''"it_int_prio" , name = String () , order = Number () ) it_int_prio.setkey ("name") Full_Issue_Class \ ( db , ''"it_project" , status = Link ("it_project_status", do_journal = 'no') , it_prio = Link ("it_prio", do_journal = 'no') , category = Link ("it_category", do_journal = 'no') , stakeholder = Link ("user", do_journal = 'no' , msg_header_property = 'username' ) , deadline = Date () , confidential = Boolean () ) it_project_status = Class \ ( db , ''"it_project_status" , name = String () , description = String () , transitions = Multilink ("it_project_status") , order = Number () ) it_project_status.setkey ("name")
def init \ ( db , Class , String , Date , Link , Multilink , Boolean , Number , Department_Class , Location_Class , Organisation_Class , Time_Project_Status_Class , SAP_CC_Class , ** kw ) : export = {} cost_center = Class \ ( db , ''"cost_center" , name = String () , description = String () , status = Link ("cost_center_status") , cost_center_group = Link ("cost_center_group") ) cost_center.setkey ("name") cost_center_group = Class \ ( db , ''"cost_center_group" , name = String () , description = String () , responsible = Link ("user") , active = Boolean () ) cost_center_group.setkey ("name") cost_center_status = Class \ ( db , ''"cost_center_status" , name = String () , description = String () , active = Boolean () ) cost_center_status.setkey ("name") daily_record = Class \ ( db , ''"daily_record" , user = Link ("user", do_journal = "no") , date = Date (offset = 0) , status = Link ( "daily_record_status" , do_journal = "no" ) , required_overtime = Boolean () , weekend_allowed = Boolean () , time_record = Multilink ("time_record", do_journal = "no") , tr_duration_ok = Number () ) daily_record.setlabelprop ('date') daily_record_freeze = Class \ ( db , ''"daily_record_freeze" , user = Link ("user", do_journal = "no") , date = Date (offset = 0) , frozen = Boolean () , achieved_hours = Number () , balance = Number () , validity_date = Date () , week_balance = Number () , month_balance = Number () , month_validity_date = Date (offset = 0) ) daily_record_freeze.setlabelprop ('date') overtime_correction = Class \ ( db , ''"overtime_correction" , user = Link ("user", do_journal = "no") , date = Date (offset = 0) , value = Number () , comment = String () ) overtime_correction.setlabelprop ('date') daily_record_status = Class \ ( db , ''"daily_record_status" , name = String () , description = String () ) daily_record_status.setkey ("name") public_holiday = Class \ ( db , ''"public_holiday" , name = String () , description = String () , date = Date (offset = 0) , locations = Multilink ("location") , is_half = Boolean () ) summary_report = Class \ ( db , ''"summary_report" , date = Date (offset = 0) , user = Link ("user") , department = Link ("department") , supervisor = Link ("user") , org_location = Link ("org_location") , organisation = Link ("organisation") , time_wp = Link ("time_wp") , time_wp_group = Link ("time_wp_group") , cost_center = Link ("cost_center") , cost_center_group = Link ("cost_center_group") , time_project = Link ("time_project") , summary_type = Link ("summary_type") , summary = Boolean () , status = Link ("daily_record_status") , show_empty = Boolean () , show_all_users = Boolean () , planned_effort = Number () , show_missing = Boolean () , all_in = Boolean () , op_project = Boolean () , reporting_group = Link ("reporting_group") , product_family = Link ("product_family") , project_type = Link ("project_type") , sap_cc = Link ("sap_cc") , time_wp_summary_no = Link ("time_wp_summary_no") ) reporting_group = Class \ ( db , ''"reporting_group" , name = String () , description = String () , responsible = Link ("user") ) reporting_group.setkey ("name") product_family = Class \ ( db , ''"product_family" , name = String () , description = String () , responsible = Link ("user") ) product_family.setkey ("name") project_type = Class \ ( db , ''"project_type" , name = String () , order = Number () ) project_type.setkey ("name") summary_type = Class \ ( db , ''"summary_type" , name = String () , is_staff = Boolean () , order = Number () ) summary_type.setkey ("name") time_activity = Class \ ( db , ''"time_activity" , name = String () , description = String () , travel = Boolean () ) time_activity.setkey ("name") time_report = Class \ ( db , ''"time_report" , file = Link ("file") , time_project = Link ("time_project") , last_updated = Date () ) class Time_Project_Class (kw ['Time_Project_Class']) : """Add attributes to existing Time_Project_Class class.""" def __init__ (self, db, classname, ** properties) : self.update_properties \ ( approval_hr = Boolean () , approval_required = Boolean () , is_public_holiday = Boolean () , is_special_leave = Boolean () , is_vacation = Boolean () , max_hours = Number () , nosy = Multilink ("user") , no_overtime = Boolean () , no_overtime_day = Boolean () , overtime_reduction = Boolean () , planned_effort = Number () , product_family = Multilink ("product_family") , project_type = Link ("project_type") , reporting_group = Multilink ("reporting_group") , work_location = Link ("work_location") , cost_center = Link ("cost_center") , only_hours = Boolean () , op_project = Boolean () ) self.__super.__init__ (db, classname, ** properties) # end def __init__ # end class Time_Project_Class Time_Project_Class (db, ''"time_project") Time_Project_Status_Class (db, ''"time_project_status") SAP_CC_Class (db, ''"sap_cc") time_record = Class \ ( db , ''"time_record" , daily_record = Link ("daily_record", do_journal = "no") , start = String (indexme = "no") , end = String (indexme = "no") , start_generated = Boolean () , end_generated = Boolean () , duration = Number () , tr_duration = Number () , wp = Link ("time_wp", do_journal = "no") , time_activity = Link ("time_activity", do_journal = "no") , work_location = Link ("work_location", do_journal = "no") , comment = String (indexme = "no") , dist = Number () ) time_wp = Class \ ( db , ''"time_wp" , name = String () , wp_no = String () , description = String () , responsible = Link ("user") , project = Link ("time_project") , time_start = Date (offset = 0) , time_end = Date (offset = 0) , planned_effort = Number () , bookers = Multilink ("user") , durations_allowed = Boolean () , cost_center = Link ("cost_center") , travel = Boolean () , is_public = Boolean () , has_expiration_date = Boolean () , time_wp_summary_no = Link ("time_wp_summary_no") , epic_key = String () ) time_wp_summary_no = Class \ ( db, ''"time_wp_summary_no" , name = String () , order = Number () ) time_wp_summary_no.setkey ("name") time_wp_group = Class \ ( db , ''"time_wp_group" , name = String () , description = String () , wps = Multilink ("time_wp") ) time_wp_group.setkey ("name") overtime_period = Class \ ( db , ''"overtime_period" , name = String () , order = Number () , weekly = Boolean () , months = Number () , required_overtime = Boolean () ) overtime_period.setkey ("name") vac_aliq = Class \ ( db , ''"vac_aliq" , name = String () ) vac_aliq.setkey ("name") ud = Class \ ( db , ''"user_dynamic" , user = Link ("user") , valid_from = Date (offset = 0) , valid_to = Date (offset = 0) , booking_allowed = Boolean () , travel_full = Boolean () , durations_allowed = Boolean () , weekend_allowed = Boolean () , vacation_yearly = Number () , vacation_month = Number () , vacation_day = Number () , contract_type = Link ('contract_type', do_journal = "no") , daily_worktime = Number () , weekly_hours = Number () , supp_weekly_hours = Number () , supp_per_period = Number () , hours_mon = Number () , hours_tue = Number () , hours_wed = Number () , hours_thu = Number () , hours_fri = Number () , hours_sat = Number () , hours_sun = Number () , org_location = Link ("org_location", do_journal = "no") , department = Link ("department", do_journal = "no") , all_in = Boolean () , additional_hours = Number () , overtime_period = Link ( "overtime_period" , do_journal = "no" ) , sap_cc = Link ("sap_cc") , max_flexitime = Number () , vac_aliq = Link ("vac_aliq", do_journal = "no") ) leave_status = Class \ ( db , ''"leave_status" , name = String () , order = Number () , transitions = Multilink ("leave_status") ) leave_status.setkey ("name") contract_type = Class \ ( db , ''"contract_type" , name = String () , order = Number () , description = String () ) leave_submission = Class \ ( db , ''"leave_submission" , user = Link ("user") , first_day = Date (offset = 0) , last_day = Date (offset = 0) , status = Link ("leave_status") , time_wp = Link ("time_wp") , comment = String () , comment_cancel = String () , approval_hr = Boolean () # only for queries ) # Remaining vacation starting with given date if absolute is True, # Interpreted as relative correction if absolute = False, relative # to last vacation. Note that to start vacation reporting at least # one starting vacation_correction record with absolute = True must # exist. Vacation reporting is started with that date. Note that # the date does *not* belong to the computation, to start reporting # with 2014-01-01 a vacation_correction record with exactly that # date must exist and the carry-over from the last year is in # 'days'. vacation_correction = Class \ ( db , ''"vacation_correction" , user = Link ("user") , date = Date (offset = 0) , absolute = Boolean () , days = Number () , contract_type = Link ('contract_type') , comment = String () ) # Only for reporting mask, no records will ever be created vacation_report = Class \ ( db , ''"vacation_report" , user = Link ("user") , supervisor = Link ("user") , department = Link ("department") , organisation = Link ("organisation") , org_location = Link ("org_location") , time_project = Link ("time_project") , date = Date (offset = 0) , additional_submitted = String () , approved_submissions = String () , flexi_time = String () , flexi_sub = String () , flexi_max = String () , flexi_rem = String () , special_leave = String () , special_sub = String () , show_obsolete = Boolean () ) absence_type = Class \ ( db , ''"absence_type" , code = String () , description = String () , cssclass = String () ) absence_type.setkey ("code") absence = Class \ ( db , ''"absence" , absence_type = Link ("absence_type") , first_day = Date (offset = 0) , last_day = Date (offset = 0) , user = Link ("user") ) # Only for queries timesheet = Class \ ( db , ''"timesheet" , first_day = Date (offset = 0) , last_day = Date (offset = 0) , user = Link ("user") , department = Link ("department") , supervisor = Link ("user") ) work_location = Class \ ( db , ''"work_location" , code = String () , description = String () ) work_location.setkey ("code") class User_Class (kw ['User_Class']) : """ add some attrs to user class """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( timing_info = Boolean () ) kw ['User_Class'].__init__ (self, db, classname, ** properties) # end def __init__ # end class User_Class export.update (dict (User_Class = User_Class)) class Org_Location_Class (kw ['Org_Location_Class']) : """ Add some attributes needed for time tracker """ def __init__ (self, db, classname, ** properties) : ancestor = kw ['Org_Location_Class'] self.update_properties \ ( vacation_legal_year = Boolean () , vacation_yearly = Number () , do_leave_process = Boolean () , vac_aliq = Link ("vac_aliq") ) ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Org_Location_Class export.update (dict (Org_Location_Class = Org_Location_Class)) Org_Location_Class (db, ''"org_location") # Some classes defined elsewhere which are required (and possibly # extended in several other include files) Department_Class (db, ''"department") Location_Class (db, ''"location") Organisation_Class (db, ''"organisation") return export
def init \ ( db , Class , Ext_Class , Min_Issue_Class , String , Date , Link , Multilink , Boolean , Number , ** kw ) : do_index = "yes" export = {} class Address_Class (Min_Issue_Class) : """ Create address class with default attributes, may be extended by other definitions. """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( street = String (indexme = do_index) , country = String (indexme = "no") , postalcode = String (indexme = "no") , city = String (indexme = do_index) , adr_type = Multilink ("adr_type") , valid = Link ("valid") , lookalike_city = String (indexme = do_index) , lookalike_street = String (indexme = do_index) ) self.__super.__init__ (db, classname, ** properties) self.setlabelprop ('country') # end def __init__ # end class Address_Class export.update (dict (Address_Class = Address_Class)) adr_type = Class \ ( db, ''"adr_type" , code = String () , description = String () , typecat = Link ("adr_type_cat") ) adr_type.setkey ("code") adr_type_cat = Class \ ( db, ''"adr_type_cat" , code = String () , description = String () , type_valid = Boolean () ) adr_type_cat.setkey (''"code") # Define codes for (in)valid addresses, e.g., "verstorben" valid = Class \ ( db, ''"valid" , name = String () , description = String () ) valid.setkey (''"name") return export
def init \ ( db , Class , String , Date , Link , Multilink , Boolean , Number , Min_Issue_Class , Nosy_Issue_Class , Address_Class , Letter_Class , ** kw ) : do_index = "no" export = {} bank_account = Class \ ( db, ''"bank_account" , bank = String () , description = String () , act_number = String () , bank_code = String () , iban = String () , bic = String () ) cust_supp = Nosy_Issue_Class \ ( db, ''"cust_supp" , name = String () , lookalike_name = String () , description = String () , tax_id = String () , pharma_ref = Link ("pharma_ref") , bank_account = Multilink ("bank_account") , currency = Link ("currency") , invoice_dispatch = Link ("invoice_dispatch") , dispatch_type = Link ("dispatch_type") # customer-specific: , customer_status = Link ("customer_status") , customer_group = Link ("customer_group") , customer_type = Multilink ("customer_type") , attendant = Link ("user") , credit_limit = Number () , discount_group = Link ("discount_group") , invoice_text = String () , sales_conditions = Link ("sales_conditions") # supplier-specific: , supplier_status = Link ("supplier_status") , supplier_group = Link ("supplier_group") , order_text = String () ) cust_supp.setkey (''"name") customer_type = Class \ ( db, ''"customer_type" , code = String () , description = String () ) customer_type.setkey ("code") customer_group = Class \ ( db, ''"customer_group" , name = String () , description = String () , discount_group = Link ("discount_group") ) customer_group.setkey ("name") customer_status = Class \ ( db, ''"customer_status" , name = String () , description = String () , order = Number () , valid = Boolean () , display = Boolean () ) customer_status.setkey ("name") discount_group = Class \ ( db, ''"discount_group" , name = String () , description = String () , currency = Link ("currency") , group_discount = Multilink ("group_discount") , overall_discount = Multilink ("overall_discount") ) discount_group.setkey ("name") dispatch_type = Class \ ( db, ''"dispatch_type" , name = String () , description = String () ) dispatch_type.setkey ("name") group_discount = Class \ ( db, ''"group_discount" , product_group = Link ("product_group") , discount = Number () ) invoice_dispatch = Class \ ( db, ''"invoice_dispatch" , name = String () , description = String () ) invoice_dispatch.setkey ("name") measuring_unit = Class \ ( db, ''"measuring_unit" , name = String () , description = String () ) measuring_unit.setkey ("name") overall_discount = Class \ ( db, ''"overall_discount" , price = Number () , discount = Number () ) packaging_unit = Class \ ( db, ''"packaging_unit" , name = String () , description = String () ) packaging_unit.setkey ("name") # Pharmareferenzbezirk pharma_ref = Class \ ( db, ''"pharma_ref" , name = String () , description = String () ) pharma_ref.setkey ("name") proceeds_group = Class \ ( db, ''"proceeds_group" , name = String () , description = String () ) proceeds_group.setkey ("name") product = Min_Issue_Class \ ( db, ''"product" , name = String () , description = String () , status = Link ("product_status") , product_group = Link ("product_group") , measuring_unit = Link ("measuring_unit") , packaging_unit = Link ("packaging_unit") , minimum_inventory = Number () , shelf_life_code = Link ("shelf_life_code") , proceeds_group = Link ("proceeds_group") , use_lot = Boolean () , product_price = Multilink ("product_price") ) product.setkey ("name") product_group = Class \ ( db, ''"product_group" , name = String () , description = String () ) product_group.setkey ("name") product_price = Class \ ( db, ''"product_price" , price = Number () , vat_percent = Number () , currency = Link ("currency") ) product_status = Class \ ( db, ''"product_status" , name = String () , description = String () , order = Number () , valid = Boolean () ) product_status.setkey ("name") sales_conditions = Class \ ( db, ''"sales_conditions" , name = String () , description = String () , discount_percent = Number () , discount_days = Number () , payment_days = Number () ) shelf_life_code = Class \ ( db, ''"shelf_life_code" , name = String () , description = String () , shelf_life = Number () ) shelf_life_code.setkey ("name") storage = Class \ ( db, ''"storage" , name = String () , description = String () , storage_locations = Multilink ("storage_location") ) storage.setkey ("name") storage_location = Class \ ( db, ''"stock" , name = String () , description = String () , storage = Link ("storage") ) stocked_product = Class \ ( db, ''"stocked_product" , product = Link ("product") , storage_location = Link ("storage_location") , on_stock = Number () , lot = String () # Wareneingang # Verfall # Quarantänestatus ) supplier_group = Class \ ( db, ''"supplier_group" , name = String () , description = String () ) supplier_group.setkey ("name") supplier_status = Class \ ( db, ''"supplier_status" , name = String () , description = String () , order = Number () , valid = Boolean () , display = Boolean () ) supplier_status.setkey ("name") Address_Class \ ( db, ''"address" ) Letter_Class \ ( db, ''"letter" ) return export
def init \ ( db , Class , Person_Class , Invoice_Class , Letter_Class , String , Date , Link , Multilink , Boolean , Number , ** kw ) : abo = Class \ ( db, ''"abo" , begin = Date (offset = 0) , end = Date (offset = 0) , aboprice = Link ('abo_price') , payer = Link ('address') , subscriber = Link ('address') , amount = Number () , messages = Multilink ("msg") , invoices = Multilink ("invoice") ) abo.setlabelprop (''"aboprice") abo_price = Class \ ( db, ''"abo_price" , abotype = Link ('abo_type') , currency = Link ('currency') , amount = Number () , name = String () , invoice_template = Multilink ('invoice_template') , invoice_group = Link ('invoice_group') , valid = Boolean () ) abo_price.setkey (''"name") abo_type = Class \ ( db, ''"abo_type" , name = String () , description = String () , period = Number () # subscription period in months , order = Number () , adr_type = Link ('adr_type') ) abo_type.setkey (''"name") Person_Class \ ( db, ''"address" , abos = Multilink ("abo") , payed_abos = Multilink ("abo") , invoices = Multilink ("invoice") ) Invoice_Class \ ( db, ''"invoice" , period_start = Date (offset = 0) , period_end = Date (offset = 0) , payer = Link ("address") , subscriber = Link ("address") , abo = Link ("abo") , invoice_group = Link ("invoice_group", do_journal='no') ) invoice_group = Class \ ( db, ''"invoice_group" , name = String () , description = String () ) invoice_group.setkey (''"name") # Add invoice link -- this is optional, not every letter is related # to an invoice. Letter_Class \ ( db, ''"letter" , invoice = Link ("invoice") )
def init \ ( db , Class , Person_Class , Full_Issue_Class , Superseder_Issue_Class , Boolean , String , Date , Link , Multilink , Number , ** kw ) : business_unit = Class \ ( db , ''"business_unit" , name = String () , valid = Boolean () ) business_unit.setkey ("name") customer = Person_Class \ ( db , ''"customer" , name = String () , is_valid = Boolean () , nosy = Multilink ("user") , nosygroups = Multilink ("mailgroup") , maildomain = String () , fromaddress = String () , rmafrom = String () , suppclaimfrom = String () , confidential = Boolean () , responsible = Link ("user") , business_unit = Link ("business_unit") , is_customer = Boolean () , is_supplier = Boolean () , customer_code = String () ) customer.setkey ("name") customer_agreement = Class \ ( db , ''"customer_agreement" , customer = Link ("customer") , product = Link ("product", try_id_parsing='no') , description = String () ) customer_agreement.setlabelprop ("customer") customer_agreement.setorderprop ("description") mailgroup = Class \ ( db , ''"mailgroup" , name = String () , nosy = Multilink ("user") , default_nosy = Boolean () ) mailgroup.setkey ("name") product = Class \ ( db , ''"product" , name = String () , description = String () , product_family = Link ("prodcat") , product_use_case = Link ("prodcat") , product_line = Link ("prodcat") , business_unit = Link ("business_unit") , sap_material = String () , is_series = Boolean () , valid = Boolean () ) product.setkey ("sap_material") sup_warranty = Class \ ( db , ''"sup_warranty" , name = String () , order = Number () ) sup_classification = Class \ ( db , ''"sup_classification" , name = String () , valid = Boolean () , description = String () , sup_warranty = Link ('sup_warranty') , examples = String () ) sup_classification.setkey ("name") sup_execution = Class \ ( db , ''"sup_execution" , name = String () , order = Number () ) sup_execution.setkey ("name") sup_prio = Class \ ( db , ''"sup_prio" , name = String () , order = Number () ) sup_prio.setkey ("name") sup_status = Class \ ( db , ''"sup_status" , name = String () , description = String () , transitions = Multilink ("sup_status") , order = Number () , relaxed = Boolean () ) sup_status.setkey ("name") sup_type = Class \ ( db , ''"sup_type" , name = String () , order = Number () ) sup_type.setkey ("name") analysis_result = Class \ ( db , ''"analysis_result" , name = String () , description = String () ) analysis_result.setkey ("name") return_type = Class \ ( db , ''"return_type" , name = String () , order = Number () ) return_type.setkey ("name") Superseder_Issue_Class \ ( db , ''"support" , category = Link ("category", do_journal='no') , closed = Date () , satisfied = Date () , first_reply = Date () , set_first_reply = Boolean () # only used for setting above , analysis_start = Date () , analysis_end = Date () , goods_received = Date () , goods_sent = Date () , confidential = Boolean () , numeric_effort = Number () , prio = Link ("sup_prio", do_journal='no') , release = String () , status = Link ("sup_status", do_journal='no') , serial_number = String () , related_issues = Multilink ("issue") , related_support = Multilink ("support") , customer = Link ("customer", do_journal='no') , emails = Multilink ("contact", do_journal='no') , cc_emails = Multilink ("contact", do_journal='no') , send_to_customer = Boolean () , classification = Link ("sup_classification", do_journal='no') , cc = String () , bcc = String () , type = Link ("sup_type") , execution = Link ("sup_execution") , number_effected = Number () , warranty = Boolean () , lot = String () , product = Link ("product", try_id_parsing='no') , prodcat = Link ("prodcat") , external_ref = String () , sap_ref = String () , analysis_result = Link ("analysis_result", do_journal='no') , return_type = Link ("return_type", do_journal='no') , business_unit = Link ("business_unit") )
def init \ ( db , Class , Ext_Class , String , Password , Date , Link , Multilink , Boolean , Number , ** kw ) : export = {} Org_Ancestor = kw ['Organisation_Class'] class Organisation_Class (Org_Ancestor) : """ Add some attributes to organisation """ def __init__ (self, db, classname, ** properties) : # mail_domain gets automatically appended to the users mail # address upon creation of a new user. self.update_properties \ ( mail_domain = String () , messages = Multilink ("msg") ) Org_Ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Organisation_Class export.update (dict (Organisation_Class = Organisation_Class)) Dep_Ancestor = kw ['Department_Class'] class Department_Class (Dep_Ancestor) : """ Add some attributes to department """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( messages = Multilink ("msg") , valid_from = Date () , valid_to = Date () ) Dep_Ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Department_Class export.update (dict (Department_Class = Department_Class)) Loc_Ancestor = kw ['Location_Class'] class Location_Class (Loc_Ancestor) : """ Add some attributes to Location """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( address = String () , domain_part = String () , room_prefix = String () ) Loc_Ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Location_Class export.update (dict (Location_Class = Location_Class)) Olo_Ancestor = kw ['Org_Location_Class'] class Org_Location_Class (Olo_Ancestor) : """ Add some attributes to Org_Location_Class """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( phone = String () ) Olo_Ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Org_Location_Class export.update (dict (Org_Location_Class = Org_Location_Class)) User_Ancestor = kw.get ('User_Class', Ext_Class) class User_Class (User_Ancestor) : """ create the user class with some default attributes """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( firstname = String () , lastname = String () , subst_active = Boolean () , room = Link ("room") , job_description = String () , pictures = Multilink ("file") , lunch_start = String () , lunch_duration = Number () , tt_lines = Number () , sex = Link ("sex") ) User_Ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class User_Class export.update (dict (User_Class = User_Class)) class Room_Class (Ext_Class) : """ Create room class with default attributes, may be extended by other definitions. """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( name = String () , location = Link ("location") , description = String () ) self.__super.__init__ (db, classname, ** properties) self.setkey (''"name") # end def __init__ # end class Room_Class export.update (dict (Room_Class = Room_Class)) sex = Class \ ( db , ''"sex" , name = String () ) sex.setkey ("name") return export
def init \ ( db , Class , String , Date , Link , Boolean , Number , ** kw ) : transceiver = Class \ ( db, ''"transceiver" , tty = String () , name = String () , sint = Number () , sint_pending = Boolean () , mint = Number () , mint_pending = Boolean () ) transceiver.setkey (''"name") device_group = Class \ ( db, ''"device_group" , name = String () , description = String () , order = Number () ) device_group.setlabelprop (''"name") device = Class \ ( db, ''"device" , transceiver = Link ("transceiver") , adr = String () , dev = String () , cls = String () , name = String () , surrogate = String () , device_group = Link ("device_group") , sint = Number () , sint_pending = Boolean () , mint = Number () , mint_pending = Boolean () , gapint = Number () , rec = Link ("logstyle") , version = String () , order = Number () ) device.setkey (''"surrogate") device.setorderprop (''"surrogate") sensor = Class \ ( db, ''"sensor" , device = Link ("device") , adr = String () , type = String () , name = String () , surrogate = String () , almin = Number () , almax = Number () , unit = String () , do_logging = Boolean () , is_actuator = Boolean () , is_app_sensor = Boolean () , order = Number () ) sensor.setkey (''"surrogate") sensor.setorderprop (''"surrogate") logstyle = Class \ ( db, ''"logstyle" , name = String () , description = String () , order = Number () ) logstyle.setkey (''"name") measurement = Class \ ( db, ''"measurement" , sensor = Link ("sensor", do_journal = "no") , val = Number () , date = Date () ) alarm = Class \ ( db, ''"alarm" , sensor = Link ("sensor", do_journal = "no") , val = Number () , last_triggered = Date () , timeout = Number () , is_lower = Boolean () )
def init \ ( db , Class , Date , String , Link , Multilink , Boolean , Number , ** kw ) : export = {} class User_Class (kw ['User_Class']) : """ add some default attributes to User_Class """ def __init__ (self, db, classname, ** properties) : ancestor = kw ['User_Class'] self.update_properties \ ( is_lotus_user = Boolean () , sync_with_ldap = Boolean () , group = Link ("group") , secondary_groups = Multilink ("group") , uid = Number () # , home_directory = String () # , login_shell = String () # , samba_home_drive = String () # , samba_home_path = String () # , samba_kickoff_time = Date () # , samba_lm_password = String () # , samba_logon_script = String () # , samba_nt_password = String () # , samba_profile_path = String () # , samba_pwd_can_change = Date () # , samba_pwd_last_set = Date () # , samba_pwd_must_change = Date () # , user_password = String () , shadow_last_change = Date () , shadow_min = Number () , shadow_max = Number () , shadow_warning = Number () , shadow_inactive = Number () , shadow_expire = Date () , shadow_used = Boolean () ) ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class User_Class export.update (dict (User_Class = User_Class)) alias = Class \ ( db , ''"alias" , name = String () , description = String () , alias_to_alias = Multilink ("alias") , alias_to_user = Multilink ("user") , use_in_ln = Boolean () , org_location = Link ("org_location") ) dns_record_type = Class \ ( db , ''"dns_record_type" , name = String () , description = String () ) dns_record_type.setkey ("name") group = Class \ ( db , ''"group" , name = String () , description = String () , gid = Number () , org_location = Link ("org_location") ) group.setkey ("name") ip_subnet = Class \ ( db , ''"ip_subnet" , ip = String () , netmask = Number () , org_location = Link ("org_location") , routers = Multilink ("machine_name") , dns_servers = Multilink ("machine_name") , dhcp_range = String () , default_lease_time = Number () , max_lease_time = Number () ) ip_subnet.setlabelprop ('ip') class Location_Class (kw ['Location_Class']) : """ add some default attributes to Location_Class """ def __init__ (self, db, classname, ** properties) : ancestor = kw ['Location_Class'] self.update_properties (domain_part = String ()) ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Location_Class export.update (dict (Location_Class = Location_Class)) machine = Class \ ( db , ''"machine" , inventory_no = String () , link_field = String () , description = String () , owner = Link ("user") , operating_system = Multilink ("operating_system") ) machine.setkey ("inventory_no") # This should really be two separate classes. But roundup does not allow # subclassing for this -- we need machine_name pointers in other records # that can either be an A-Record or a CNAME. This is currently not # possible with two classes. # Another solution would be something that can either point to an # A-Record or to a CNAME. Maybe call this machine_name, too. But that # would get really complicated. machine_name = Class \ ( db , ''"machine_name" , name = String () , network_address = Multilink ("network_address") , machine_name = Multilink ("machine_name") , do_reverse_mapping = Boolean () , dns_record_type = Link ("dns_record_type") ) machine_name.setkey ("name") network_address = Class \ ( db , ''"network_address" , ip = String () , org_location = Link ("org_location") , use_dhcp = Boolean () , network_interface = Link ("network_interface") ) network_address.setkey ("ip") network_interface = Class \ ( db , ''"network_interface" , mac = String () , card_type = String () , description = String () , machine = Link ("machine") ) network_interface.setkey ("mac") operating_system = Class \ ( db , ''"operating_system" , name_version = String () , description = String () ) operating_system.setkey ("name_version") class Org_Location_Class (kw ['Org_Location_Class']) : """ add some default attributes to Org_Location_Class """ def __init__ (self, db, classname, ** properties) : ancestor = kw ['Org_Location_Class'] self.update_properties \ ( smb_domain = Link ("smb_domain") , dhcp_server = Link ("machine_name") , domino_dn = String () ) ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Org_Location_Class export.update (dict (Org_Location_Class = Org_Location_Class)) class Organisation_Class (kw ['Organisation_Class']) : """ add some default attributes to Organisation_Class """ def __init__ (self, db, classname, ** properties) : ancestor = kw ['Organisation_Class'] self.update_properties (domain_part = String ()) ancestor.__init__ (self, db, classname, ** properties) # end def __init__ # end class Organisation_Class export.update (dict (Organisation_Class = Organisation_Class)) smb_domain = Class \ ( db , ''"smb_domain" , name = String () , description = String () , sid = String () , pdc = Link ("machine") , uid_range = String () , private_gid_range = String () , machine_uid_range = String () , gid_range = String () , machine_group = Number () , last_uid = Number () , last_gid = Number () , last_machine_uid = Number () , org_location = Link ("org_location") , netbios_ns = Multilink ("machine_name") , netbios_dd = Multilink ("machine_name") , netbios_nodetype = String () ) smb_domain.setkey ("name") smb_machine = Class \ ( db , ''"smb_machine" , name = String () , machine_uid = Number () , smb_domain = Link ("smb_domain") , machine_name = Link ("machine_name") ) smb_machine.setkey ("name") return export
def init \ ( db , Class , String , Date , Link , Multilink , Boolean , Number , Integer , ** kw ) : export = {} antenna = Class \ ( db, ''"antenna" , name = String () , order = Number () ) antenna.setkey (''"name") continent = Class \ ( db, ''"continent" , code = String () , name = String () ) continent.setkey (''"code") # Entities may have multiple cq and itu zones but we provide them # here only if unique. dxcc_entity = Class \ ( db, ''"dxcc_entity" , code = String () , name = String () , continent = Multilink ("continent") , cq_zone = Integer () , itu_zone = Integer () ) dxcc_entity.setkey (''"code") dxcc_entity.setlabelprop ('name') ham_call = Class \ ( db, ''"ham_call" , call = String () , name = String () , qth = String () , gridsquare = String () , iota = String () , eqsl_nickname = String () ) ham_call.setkey (''"name") ham_mode = Class \ ( db, ''"ham_mode" , name = String () , order = Number () , adif_mode = String () , adif_submode = String () ) ham_mode.setkey (''"name") ham_band = Class \ ( db, ''"ham_band" , name = String () , order = Number () ) ham_band.setkey (''"name") qsl_type = Class \ ( db, ''"qsl_type" , name = String () , order = Number () , code = Number () ) qsl_type.setkey (''"name") qsl_status = Class \ ( db, ''"qsl_status" , name = String () , code = Number () ) qsl_status.setkey (''"name") qsl_status.setorderprop (''"code") qsl = Class \ ( db, ''"qsl" , qsl_type = Link ("qsl_type", do_journal = "no") , qso = Link ("qso") , date_recv = Date () , date_sent = Date () ) qso = Class \ ( db, ''"qso" , freq = String (indexme = "no") , tx_pwr = String () , call = String () , mode = Link ("ham_mode", do_journal = "no") , name = String () , qso_start = Date () , qso_end = Date () , rst_rcvd = String (indexme = "no") , rst_sent = String (indexme = "no") , band = Link ("ham_band", do_journal = "no") , qth = String () , gridsquare = String () , country = String () , state = String () , owner = Link ("ham_call", do_journal = "no") , messages = Multilink ("msg") , antenna = Link ("antenna", do_journal = "no") , swl = Link ("qso") , qsl_via = String () , qso2 = Link ("qso") , wont_qsl_via = Multilink ("qsl_type", do_journal = "no") , qsl_r_status = Link ("qsl_status", do_journal = "no") , qsl_s_status = Link ("qsl_status", do_journal = "no") , no_qsl_status = Link ("qsl_status", do_journal = "no") , reject = Boolean () , cq_zone = Integer () , itu_zone = Integer () , iota = String () , german_dok = String () , dxcc_entity = Link ("dxcc_entity") ) qso.setlabelprop ('call') class User_Class (kw ['User_Class']) : """ add some attrs to user class """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( call = Multilink ("ham_call") ) kw ['User_Class'].__init__ (self, db, classname, ** properties) # end def __init__ # end class User_Class export.update (dict (User_Class = User_Class)) return export
def init \ ( db , Category_Class , Class , Ext_Mixin , Optional_Doc_Issue_Class , String , Date , Link , Multilink , Number , Boolean , ** kw ) : area = Class \ ( db, "area" , name = String (indexme = 'no') , description = String (indexme = 'no') ) area.setkey ("name") prodcat = Class \ ( db, "prodcat" , name = String (indexme = 'no') , valid = Boolean () , level = Number () ) prodcat.setlabelprop ("name") category = Category_Class \ ( db, "category" , name = String (indexme = 'no') , description = String (indexme = 'no') , responsible = Link ("user") , nosy = Multilink ("user") , valid = Boolean () , cert_sw = Boolean () , default_part_of = Link ("issue") , prodcat = Link ("prodcat") ) category.setkey ("name") kind = Class \ ( db, "kind" , name = String (indexme = 'no') , description = String (indexme = 'no') , simple = Boolean () ) kind.setkey ("name") stat = Class \ ( db, "status" , name = String (indexme = 'no') , description = String (indexme = 'no') , order = String (indexme = 'no') , transitions = Multilink ("status_transition") , simple_transitions = Multilink ("status_transition") ) stat.setkey ("name") trans = Class \ ( db, "status_transition" , target = Link ("status") , require_resp_change = Boolean () , require_msg = Boolean () , name = String (indexme = 'no') ) trans.setkey ("name") sev = Class \ ( db, "severity" , name = String (indexme = 'no') , abbreviation = String (indexme = 'no') , order = Number () ) sev.setkey ("name") msg_keyword = Class \ ( db, "msg_keyword" , name = String (indexme = 'no') , description = String (indexme = 'no') ) msg_keyword.setkey("name") safety_level = Class \ ( db, "safety_level" , name = String (indexme = 'no') , description = String (indexme = 'no') ) safety_level.setkey("name") test_level = Class \ ( db, "test_level" , name = String (indexme = 'no') , description = String (indexme = 'no') ) test_level.setkey("name") Optional_Doc_Issue_Class \ ( db, "issue" , keywords = Multilink ("keyword", do_journal = 'no') , priority = Number () , effective_prio = Number () , status = Link ("status", do_journal = 'no') , closed = Date () , release = String () , fixed_in = String () , files_affected = String () , category = Link ("category", do_journal = 'no') , kind = Link ("kind", do_journal = 'no') , area = Link ("area", do_journal = 'no') , depends = Multilink ("issue") , needs = Multilink ("issue") , numeric_effort = Number () , effort_hours = Number () , deadline = Date () , earliest_start = Date () , planned_begin = Date () , planned_end = Date () , cur_est_begin = Date () # current estimate , cur_est_end = Date () # current estimate , composed_of = Multilink ("issue") # should be read only , part_of = Link ( "issue" , msg_header_property = 'id' ) # should change composed_of , severity = Link ("severity", do_journal = 'no') , maturity_index = Number () , confidential = Boolean () , safety_level = Link ("safety_level") , test_level = Link ("test_level") ) Cls = kw ['Msg_Class'] class Issue_Msg_Class (Cls) : """ extends the normal FileClass with some attributes for message """ def __init__ (self, db, classname, ** properties) : self.update_properties \ ( keywords = Multilink ("msg_keyword", do_journal = 'no') , subject = String (indexme = 'no') ) self.__super.__init__ (db, classname, ** properties) # end def __init__ # end class Issue_Msg_Class return dict (Msg_Class = Issue_Msg_Class)