Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
uri = None
session = None
# link options to KVP
use_trading_accounts = kvp_attribute("options/Accounts/Use Trading Accounts",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't',
default=False)
use_split_action_field = kvp_attribute("options/Accounts/Use Split Action Field for Number",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't' if v else 'f',
default=False)
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
use_split_action_field = kvp_attribute("options/Accounts/Use Split Action Field for Number",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't' if v else 'f',
default=False)
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
self.root_template = root_template
def __unirepr__(self):
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
self.root_template = root_template
def __unirepr__(self):
return "Book<{}>".format(self.uri)
_control_mode = None
@property
def control_mode(self):
if self._control_mode is None:
self._control_mode = []
return self._control_mode
to_gnc=lambda v: 't' if v else 'f',
default=False)
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
self.root_template = root_template
def __unirepr__(self):
return "Book<{}>".format(self.uri)
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
self.root_template = root_template
def __unirepr__(self):
return "Book<{}>".format(self.uri)
_control_mode = None
@property
def control_mode(self):
if self._control_mode is None:
use_trading_accounts = kvp_attribute("options/Accounts/Use Trading Accounts",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't',
default=False)
use_split_action_field = kvp_attribute("options/Accounts/Use Split Action Field for Number",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't' if v else 'f',
default=False)
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
root_template_guid = Column('root_template_guid', VARCHAR(length=32),
ForeignKey('accounts.guid'), nullable=False)
# relation definitions
root_account = relation('Account',
# back_populates='root_book',
foreign_keys=[root_account_guid],
)
root_template = relation('Account',
foreign_keys=[root_template_guid])
uri = None
session = None
# link options to KVP
use_trading_accounts = kvp_attribute("options/Accounts/Use Trading Accounts",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't',
default=False)
use_split_action_field = kvp_attribute("options/Accounts/Use Split Action Field for Number",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't' if v else 'f',
default=False)
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
to_gnc=lambda v: 't',
default=False)
use_split_action_field = kvp_attribute("options/Accounts/Use Split Action Field for Number",
from_gnc=lambda v: v == 't',
to_gnc=lambda v: 't' if v else 'f',
default=False)
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
RO_threshold_day = kvp_attribute("options/Accounts/Day Threshold for Read-Only Transactions (red line)",
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
self.root_template = root_template
def __unirepr__(self):
return "Book<{}>".format(self.uri)
_control_mode = None
from_gnc=lambda v: int(v),
to_gnc=lambda v: float(v),
default=0)
counter_customer = kvp_attribute("counters/gncCustomer", default=0)
counter_vendor = kvp_attribute("counters/gncVendor", default=0)
counter_employee = kvp_attribute("counters/gncEmployee", default=0)
counter_invoice = kvp_attribute("counters/gncInvoice", default=0)
counter_job = kvp_attribute("counters/gncJob", default=0)
counter_bill = kvp_attribute("counters/gncBill", default=0)
counter_exp_voucher = kvp_attribute("counters/gncExpVoucher", default=0)
counter_order = kvp_attribute("counters/gncOrder", default=0)
business_company_phone = kvp_attribute("options/Business/Company Phone Number", default="")
business_company_email = kvp_attribute("options/Business/Company Email Address", default="")
business_company_contact = kvp_attribute("options/Business/Company Contact Person", default="")
business_company_ID = kvp_attribute("options/Business/Company ID", default="")
business_company_name = kvp_attribute("options/Business/Company Name", default="")
business_company_address = kvp_attribute("options/Business/Company Address", default="")
business_company_website = kvp_attribute("options/Business/Company Website URL", default="")
def __init__(self, root_account=None, root_template=None):
self.root_account = root_account
self.root_template = root_template
def __unirepr__(self):
return "Book<{}>".format(self.uri)
_control_mode = None
@property
def control_mode(self):