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