From 9c22236a4094404bfadc48f6645cc65752a40280 Mon Sep 17 00:00:00 2001 From: Stepan Savelyev Date: Tue, 14 Jan 2020 09:47:03 +0500 Subject: [PATCH] [IMP] use one print document form instead of two different for contract and annex because they are the same --- models/res_partner_contract.py | 2 +- models/res_partner_contract_annex.py | 2 +- wizard/res_partner_contract_wizard.xml | 46 +++----------------------- 3 files changed, 6 insertions(+), 44 deletions(-) diff --git a/models/res_partner_contract.py b/models/res_partner_contract.py index 6a42735..621f2b9 100644 --- a/models/res_partner_contract.py +++ b/models/res_partner_contract.py @@ -92,7 +92,7 @@ class PartnerContract(models.Model): @api.multi def action_print_form(self): view = self.env.ref( - "{}.res_partner_wizard_print_contract_view".format(MODULE_NAME) + "{}.res_partner_wizard_print_document_view".format(MODULE_NAME) ) return { "name": _("Print Form of Contract"), diff --git a/models/res_partner_contract_annex.py b/models/res_partner_contract_annex.py index d416506..87b4b77 100644 --- a/models/res_partner_contract_annex.py +++ b/models/res_partner_contract_annex.py @@ -59,7 +59,7 @@ class ContractOrderAnnex(models.Model): @api.multi def action_print_form(self): view = self.env.ref( - "{}.res_partner_wizard_print_annex_view".format(MODULE_NAME) + "{}.res_partner_wizard_print_document_view".format(MODULE_NAME) ) return { "name": _("Print Form of Contract Annex"), diff --git a/wizard/res_partner_contract_wizard.xml b/wizard/res_partner_contract_wizard.xml index 73340b2..2890da8 100644 --- a/wizard/res_partner_contract_wizard.xml +++ b/wizard/res_partner_contract_wizard.xml @@ -1,8 +1,8 @@ - - Print Contract + + Generate Document res.partner.contract.wizard @@ -21,46 +21,8 @@