fix Quickreport start from Editor when object not yet committed
Fixes #10048
This commit is contained in:
parent
12577cdfac
commit
c759ee31eb
@ -309,7 +309,7 @@ class EditPrimary(ManagedWindow, DbGUIElement, metaclass=abc.ABCMeta):
|
|||||||
if self.QR_CATEGORY > -1 :
|
if self.QR_CATEGORY > -1 :
|
||||||
(ui_qr, reportactions) = create_quickreport_menu(self.QR_CATEGORY,
|
(ui_qr, reportactions) = create_quickreport_menu(self.QR_CATEGORY,
|
||||||
self.dbstate, self.uistate,
|
self.dbstate, self.uistate,
|
||||||
self.obj.get_handle())
|
self.obj, track=self.track)
|
||||||
self.report_action = Gtk.ActionGroup(name="/PersonReport")
|
self.report_action = Gtk.ActionGroup(name="/PersonReport")
|
||||||
self.report_action.add_actions(reportactions)
|
self.report_action.add_actions(reportactions)
|
||||||
self.report_action.set_visible(True)
|
self.report_action.set_visible(True)
|
||||||
|
@ -117,7 +117,8 @@ def create_web_connect_menu(dbstate, uistate, nav_group, handle):
|
|||||||
retval.extend(actions)
|
retval.extend(actions)
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
def create_quickreport_menu(category,dbstate,uistate, handle) :
|
|
||||||
|
def create_quickreport_menu(category, dbstate, uistate, handle, track=[]):
|
||||||
""" This functions querries the registered quick reports with
|
""" This functions querries the registered quick reports with
|
||||||
quick_report_list of _PluginMgr.py
|
quick_report_list of _PluginMgr.py
|
||||||
It collects the reports of the requested category, which must be one of
|
It collects the reports of the requested category, which must be one of
|
||||||
@ -154,14 +155,16 @@ def create_quickreport_menu(category,dbstate,uistate, handle) :
|
|||||||
new_key = pdata.id.replace(' ', '-')
|
new_key = pdata.id.replace(' ', '-')
|
||||||
ofile.write('<menuitem action="%s"/>' % new_key)
|
ofile.write('<menuitem action="%s"/>' % new_key)
|
||||||
actions.append((new_key, None, pdata.name, None, None,
|
actions.append((new_key, None, pdata.name, None, None,
|
||||||
make_quick_report_callback(pdata, category,
|
make_quick_report_callback(pdata, category, dbstate,
|
||||||
dbstate, uistate, handle)))
|
uistate, handle, track=track)))
|
||||||
ofile.write('</menu>')
|
ofile.write('</menu>')
|
||||||
|
|
||||||
return (ofile.getvalue(), actions)
|
return (ofile.getvalue(), actions)
|
||||||
|
|
||||||
def make_quick_report_callback(pdata, category, dbstate, uistate, handle):
|
def make_quick_report_callback(pdata, category, dbstate, uistate, handle,
|
||||||
return lambda x: run_report(dbstate, uistate, category, handle, pdata)
|
track=[]):
|
||||||
|
return lambda x: run_report(dbstate, uistate, category, handle, pdata,
|
||||||
|
track=track)
|
||||||
|
|
||||||
def get_quick_report_list(qv_category=None):
|
def get_quick_report_list(qv_category=None):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user