[UPD] odex_takaful
This commit is contained in:
parent
f55681a17d
commit
f49328b776
|
|
@ -257,6 +257,16 @@ class DonationExtensionHistory(models.Model):
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def action_cancel_invoice(self):
|
||||||
|
self.ensure_one()
|
||||||
|
|
||||||
|
self.sudo().invoice_id.button_draft()
|
||||||
|
self.sudo().invoice_id.button_cancel()
|
||||||
|
|
||||||
|
self.write({
|
||||||
|
'state': 'cancel'
|
||||||
|
})
|
||||||
|
|
||||||
def action_print_extension_receipt(self):
|
def action_print_extension_receipt(self):
|
||||||
"""Print the extension receipt PDF report."""
|
"""Print the extension receipt PDF report."""
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
<header>
|
<header>
|
||||||
<field name="state" widget="statusbar" statusbar_visible="active,paid,cancel" />
|
<field name="state" widget="statusbar" statusbar_visible="active,paid,cancel" />
|
||||||
<button string="Pay" name="action_pay_invoice" type="object" class="oe_highlight" states="active"/>
|
<button string="Pay" name="action_pay_invoice" type="object" class="oe_highlight" states="active"/>
|
||||||
|
<button string="Cancel" name="action_cancel_invoice" type="object" states="active"/>
|
||||||
<button
|
<button
|
||||||
name="action_print_extension_receipt"
|
name="action_print_extension_receipt"
|
||||||
type="object"
|
type="object"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue