[imp] display a warning in any case when cancelling the statement. the message changes if there are some unreconciled lines

This commit is contained in:
Leonardo Pistone
2014-02-18 10:47:26 +01:00
parent d665c74fb4
commit 2134ea7ee1
4 changed files with 29 additions and 20 deletions

View File

@@ -20,7 +20,7 @@
###############################################################################
"""Wizard to Cancel a Statement."""
from openerp.osv import orm
from openerp.osv import orm, fields
class wizard_cancel_statement(orm.TransientModel):
@@ -30,9 +30,14 @@ class wizard_cancel_statement(orm.TransientModel):
_name = "wizard.cancel.statement"
_description = "Cancel Statement"
_columns = {
'reconcile_warning': fields.boolean(
'Show reconcile warning',
help='This is a hidden field set with a default in the context '
'to choose between two different warning messages in the view.'
),
}
def unreconcile(self, cr, uid, ids, context=None):
def do_cancel_button(self, cr, uid, ids, context=None):
"""Proceed and cancel the statement, return Action.
This will delete the move.line and the reconciliation.