From b6bf341ff226d4b4bbcf9748f99173a70f81d0e3 Mon Sep 17 00:00:00 2001 From: Edgar Rivero Date: Mon, 21 Mar 2016 16:22:09 +0000 Subject: [PATCH] [REF] It is allowed to place draft state withholdings vat --- l10n_ve_withholding_iva/model/wh_iva.py | 10 ++++++++++ l10n_ve_withholding_iva/view/wh_iva_view.xml | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/l10n_ve_withholding_iva/model/wh_iva.py b/l10n_ve_withholding_iva/model/wh_iva.py index d5a7a0670..245794d28 100644 --- a/l10n_ve_withholding_iva/model/wh_iva.py +++ b/l10n_ve_withholding_iva/model/wh_iva.py @@ -415,6 +415,16 @@ def cancel_move(self): move.unlink() return True + @api.multi + def action_cancel_draft(self): + """Restarting the workflow withholding vat. + The state is placed in draft. + """ + self.write({'state': 'draft'}) + self.delete_workflow() + self.create_workflow() + return True + @api.model def _get_valid_wh(self, amount_ret, amount, wh_iva_rate, offset=0.5): diff --git a/l10n_ve_withholding_iva/view/wh_iva_view.xml b/l10n_ve_withholding_iva/view/wh_iva_view.xml index c55e7ba68..16e055231 100644 --- a/l10n_ve_withholding_iva/view/wh_iva_view.xml +++ b/l10n_ve_withholding_iva/view/wh_iva_view.xml @@ -152,7 +152,7 @@