[POS-commit] r7436 - in stoqlib/trunk/stoqlib/gui: editors search
romaia at async.com.br
romaia at async.com.br
Mon Feb 18 19:53:14 BRT 2008
Author: romaia
Date: Mon Feb 18 19:53:14 2008
New Revision: 7436
Log:
Bug 3390 - Ao tentar criar um novo perfil de usuário nada acontece
Modified:
stoqlib/trunk/stoqlib/gui/editors/profileeditor.py
stoqlib/trunk/stoqlib/gui/search/profilesearch.py
Modified: stoqlib/trunk/stoqlib/gui/editors/profileeditor.py
==============================================================================
--- stoqlib/trunk/stoqlib/gui/editors/profileeditor.py (original)
+++ stoqlib/trunk/stoqlib/gui/editors/profileeditor.py Mon Feb 18 19:53:14 2008
@@ -54,7 +54,7 @@
#
def create_model(self, conn):
- return UserProfile(name='', connection=conn)
+ return UserProfile.create_profile_template(conn, u'', False)
def setup_proxies(self):
self.proxy = self.add_proxy(self.model,
@@ -85,12 +85,9 @@
self.applications_vbox.pack_start(box, False)
- if self.edit_mode:
- if not name in settings:
- raise AssertionError("Unknown application: %s" % name)
- model = settings[name]
- else:
- model = None
+ if not name in settings:
+ raise AssertionError("Unknown application: %s" % name)
+ model = settings[name]
setattr(self, name, button)
self.add_proxy(model, [name])
Modified: stoqlib/trunk/stoqlib/gui/search/profilesearch.py
==============================================================================
--- stoqlib/trunk/stoqlib/gui/search/profilesearch.py (original)
+++ stoqlib/trunk/stoqlib/gui/search/profilesearch.py Mon Feb 18 19:53:14 2008
@@ -31,7 +31,6 @@
from stoqlib.gui.base.search import SearchEditor
from stoqlib.domain.profile import UserProfile
from stoqlib.gui.editors.profileeditor import UserProfileEditor
-from stoqlib.gui.base.dialogs import run_dialog
_ = stoqlib_gettext
@@ -57,6 +56,3 @@
def get_columns(self):
return [Column('name', _('Profile'), data_type=str, sorted=True)]
-
- def run_editor(self, obj):
- return run_dialog(self.editor_class, self, self.conn, obj)
More information about the POS-commit
mailing list