def _return_sale(self): if self.check_open_inventory(): return sale_view = self._check_selected() with api.new_store() as store: return_sale(self.get_toplevel(), store.fetch(sale_view.sale), store) if store.committed: self._update_total() self.refresh()
def _return_sale(self): from stoqlib.gui.slaves.saleslave import return_sale sale_view = self.klist.get_selected() with api.new_store() as store: retval = return_sale(self.get_toplevel(), store.fetch(sale_view.sale), store) if retval: self.refresh()