Merge lp:~gergagabriel/stoq/bug4091 into lp:~stoq-dev/stoq/master-old

Proposed by Gabriel Gerga
Status: Merged
Merged at revision: 1613
Proposed branch: lp:~gergagabriel/stoq/bug4091
Merge into: lp:~stoq-dev/stoq/master-old
Diff against target: 27 lines (+6/-2)
1 file modified
stoq/gui/sales/sales.py (+6/-2)
To merge this branch: bzr merge lp:~gergagabriel/stoq/bug4091
Reviewer Review Type Date Requested Status
Ronaldo Maia Approve
Review via email: mp+29820@code.launchpad.net

Description of the change

Resolvendo bu 4091
Adicionada mensagem de confirmacao de cotacao

To post a comment you must log in.
Revision history for this message
Ronaldo Maia (romaia) wrote :

O código está ok. Vc agora pode aplicar as mudanças fazendo assim:

Na raiz do seu código do stoq, do mesmo jeito que fez um push para a arvore lp:~.../stoq/bug4091, pode fazer o push para o lp:stoq, ou seja:

bzr push lp:stoq

E isso irá aplicar suas mudanças no código principal.

review: Approve
Revision history for this message
George Kussumoto (georgeyk) wrote :

A idéia está certa, mas veja, se o usuário cancelar, ficará uma transação aberta.
Recomendo vc passar o trecho que adicionou antes da linha trans = ...

lp:~gergagabriel/stoq/bug4091 updated
1613. By Gabriel Gerga

Exibir confirmacao antes de criar uma transacao

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stoq/gui/sales/sales.py'
--- stoq/gui/sales/sales.py 2009-10-15 20:58:15 +0000
+++ stoq/gui/sales/sales.py 2010-07-13 19:30:57 +0000
@@ -51,7 +51,7 @@
51from stoqlib.gui.wizards.salequotewizard import SaleQuoteWizard51from stoqlib.gui.wizards.salequotewizard import SaleQuoteWizard
52from stoqlib.lib.invoice import SaleInvoice, print_sale_invoice52from stoqlib.lib.invoice import SaleInvoice, print_sale_invoice
53from stoqlib.lib.validators import format_quantity53from stoqlib.lib.validators import format_quantity
54from stoqlib.lib.message import info54from stoqlib.lib.message import info, yesno
5555
56from stoq.gui.application import SearchableAppWindow56from stoq.gui.application import SearchableAppWindow
5757
@@ -271,9 +271,13 @@
271 return model271 return model
272272
273 def on_cancel_menu__activate(self, action):273 def on_cancel_menu__activate(self, action):
274 if yesno(
275 _('The selected quote will be cancelled.'),
276 gtk.RESPONSE_NO, _(u"Don't Cancel"), _(u"Cancel quote")):
277 return
274 trans = new_transaction()278 trans = new_transaction()
275 sale_view = self._klist.get_selected()279 sale_view = self._klist.get_selected()
276 sale = trans.get(sale_view.sale)280 sale = trans.get(sale_view.sale)
277 sale.cancel()281 sale.cancel()
278 finish_transaction(trans, True)282 finish_transaction(trans, True)
279 self.search.refresh()283 self.search.refresh()

Subscribers

People subscribed via source and target branches