summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/account_check_printing/account_payment.py4
-rw-r--r--addons/account_check_printing/views/account_payment_view.xml3
2 files changed, 6 insertions, 1 deletions
diff --git a/addons/account_check_printing/account_payment.py b/addons/account_check_printing/account_payment.py
index 61edba92e69..68850f7c206 100644
--- a/addons/account_check_printing/account_payment.py
+++ b/addons/account_check_printing/account_payment.py
@@ -126,6 +126,10 @@ class account_payment(models.Model):
return self.do_print_checks()
@api.multi
+ def unmark_sent(self):
+ self.write({'state': 'posted'})
+
+ @api.multi
def do_print_checks(self):
""" This method is a hook for l10n_xx_check_printing modules to implement actual check printing capabilities """
raise UserError(_("There is no check layout configured.\nMake sure the proper check printing module is installed"
diff --git a/addons/account_check_printing/views/account_payment_view.xml b/addons/account_check_printing/views/account_payment_view.xml
index 449cbd0ff9c..33fd221cda5 100644
--- a/addons/account_check_printing/views/account_payment_view.xml
+++ b/addons/account_check_printing/views/account_payment_view.xml
@@ -7,7 +7,8 @@
<field name="inherit_id" ref="account.view_account_payment_form" />
<field name="arch" type="xml">
<xpath expr="//button[@name='post']" position="before">
- <button name="print_checks" class="oe_highlight" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('state', 'not in', ('posted', 'sent'))]}" string="Print Check" type="object"/>
+ <button name="print_checks" class="oe_highlight" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('state', '!=', 'posted')]}" string="Print Check" type="object"/>
+ <button name="unmark_sent" attrs="{'invisible': ['|', ('payment_method_code', '!=', 'check_printing'), ('state', '!=', 'sent')]}" string="Unmark Sent" type="object"/>
</xpath>
<xpath expr="//div[@name='amount_div']" position="after">
<field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', '!=', 'check_printing')], 'readonly': [('state', '!=', 'draft')]}" groups="base.group_no_one"/>