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

Proposed by Gabriel Gerga
Status: Merged
Merged at revision: 1623
Proposed branch: lp:~gergagabriel/stoq/bug4192
Merge into: lp:~stoq-dev/stoq/master-old
Diff against target: 32 lines (+8/-0)
1 file modified
stoq/gui/receivable/receivable.py (+8/-0)
To merge this branch: bzr merge lp:~gergagabriel/stoq/bug4192
Reviewer Review Type Date Requested Status
Ronaldo Maia Approve
Review via email: mp+37311@code.launchpad.net

Description of the change

In Receivable:

Bug:
Error when renegotiating payments and no message was appears for user.

Resolution:
Added warning message when renegotiating payments with till opened prior days.

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

certinho. pode aplicar.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stoq/gui/receivable/receivable.py'
--- stoq/gui/receivable/receivable.py 2010-05-12 17:26:08 +0000
+++ stoq/gui/receivable/receivable.py 2010-10-01 20:08:48 +0000
@@ -42,6 +42,8 @@
42from stoqlib.domain.payment.payment import Payment42from stoqlib.domain.payment.payment import Payment
43from stoqlib.domain.payment.views import InPaymentView43from stoqlib.domain.payment.views import InPaymentView
44from stoqlib.domain.sale import SaleView44from stoqlib.domain.sale import SaleView
45from stoqlib.domain.till import Till
46from stoqlib.exceptions import TillError
45from stoqlib.reporting.payment import ReceivablePaymentReport47from stoqlib.reporting.payment import ReceivablePaymentReport
46from stoqlib.reporting.receival_receipt import ReceivalReceipt48from stoqlib.reporting.receival_receipt import ReceivalReceipt
47from stoqlib.gui.printing import print_report49from stoqlib.gui.printing import print_report
@@ -58,6 +60,7 @@
58from stoqlib.gui.search.paymentsearch import InPaymentBillCheckSearch60from stoqlib.gui.search.paymentsearch import InPaymentBillCheckSearch
59from stoqlib.gui.slaves.installmentslave import SaleInstallmentConfirmationSlave61from stoqlib.gui.slaves.installmentslave import SaleInstallmentConfirmationSlave
60from stoqlib.gui.wizards.renegotiationwizard import PaymentRenegotiationWizard62from stoqlib.gui.wizards.renegotiationwizard import PaymentRenegotiationWizard
63from stoqlib.lib.message import warning
6164
62from stoq.gui.application import SearchableAppWindow65from stoq.gui.application import SearchableAppWindow
6366
@@ -414,6 +417,11 @@
414 self._run_bill_check_search()417 self._run_bill_check_search()
415418
416 def on_Renegotiate__activate(self, action):419 def on_Renegotiate__activate(self, action):
420 try:
421 Till.get_current(self.conn)
422 except TillError, e:
423 warning(str(e))
424 return
417 receivable_views = self.results.get_selected_rows()425 receivable_views = self.results.get_selected_rows()
418 trans = new_transaction()426 trans = new_transaction()
419 groups = list(set([trans.get(v.group) for v in receivable_views]))427 groups = list(set([trans.get(v.group) for v in receivable_views]))

Subscribers

People subscribed via source and target branches