예제 #1
0
    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()
예제 #2
0
 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()
예제 #3
0
 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()