def load_data(self, ):
     """\brief load data into selected account
     """
     account = self.account_control.get_value()
     if account == None:
         show_error(u'You need to select account to load data into', self.window)
         return False
     loader = open_ru_loader()
     try:
         loader.load(self._parent._parent.get_model(),
                     open_ru_source(self.window.get_filename(),
                                    self.account_control.get_value(), # account id
                                    self.repo.get_active(), # load repo deals
                                    self.accounts.get_active())) # load account IO
         return True
     except Exception as e:
         show_and_print_error(e, self.window)
         return False
Example #2
0
 def load_data_into_account(self, account_id):
     source = open_ru_source(self.filename, account_id, True, True)
     loader = open_ru_loader()
     loader.load(self.model, source)