[IMP] use one print document form instead of two different for contract and annex because they are the same
This commit is contained in:
parent
0627e36185
commit
9c22236a40
@ -92,7 +92,7 @@ class PartnerContract(models.Model):
|
|||||||
@api.multi
|
@api.multi
|
||||||
def action_print_form(self):
|
def action_print_form(self):
|
||||||
view = self.env.ref(
|
view = self.env.ref(
|
||||||
"{}.res_partner_wizard_print_contract_view".format(MODULE_NAME)
|
"{}.res_partner_wizard_print_document_view".format(MODULE_NAME)
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
"name": _("Print Form of Contract"),
|
"name": _("Print Form of Contract"),
|
||||||
|
@ -59,7 +59,7 @@ class ContractOrderAnnex(models.Model):
|
|||||||
@api.multi
|
@api.multi
|
||||||
def action_print_form(self):
|
def action_print_form(self):
|
||||||
view = self.env.ref(
|
view = self.env.ref(
|
||||||
"{}.res_partner_wizard_print_annex_view".format(MODULE_NAME)
|
"{}.res_partner_wizard_print_document_view".format(MODULE_NAME)
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
"name": _("Print Form of Contract Annex"),
|
"name": _("Print Form of Contract Annex"),
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="res_partner_wizard_print_contract_view" model="ir.ui.view">
|
<record id="res_partner_wizard_print_document_view" model="ir.ui.view">
|
||||||
<field name="name">Print Contract</field>
|
<field name="name">Generate Document</field>
|
||||||
<field name="model">res.partner.contract.wizard</field>
|
<field name="model">res.partner.contract.wizard</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
|
||||||
@ -21,46 +21,8 @@
|
|||||||
|
|
||||||
<button string="Create a document" type="object" name="get_docx_contract" />
|
<button string="Create a document" type="object" name="get_docx_contract" />
|
||||||
|
|
||||||
<group string="Contract values" colspan="4">
|
<group string="Values">
|
||||||
<field name="transient_field_ids">
|
<field name="transient_field_ids" nolabel="1" colspan="4">
|
||||||
<tree editable="1" create="0" delete="0">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="value"/>
|
|
||||||
<field name="description"/>
|
|
||||||
<field name="technical_name" invisible="1"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
<field name="transient_field_ids_hidden" invisible="1"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<footer/>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="res_partner_wizard_print_annex_view" model="ir.ui.view">
|
|
||||||
<field name="name">Print Annex</field>
|
|
||||||
<field name="model">res.partner.contract.wizard</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<group string="Template">
|
|
||||||
<field name="document_template"></field>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<group invisible="1">
|
|
||||||
<!-- Need for generate a document -->
|
|
||||||
<field name="target"/>
|
|
||||||
<field name="partner_id"/>
|
|
||||||
<field name="company_id"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<button string="Create a document" type="object" name="get_docx_contract" />
|
|
||||||
|
|
||||||
<group string="Annex values" colspan="4">
|
|
||||||
<field name="transient_field_ids">
|
|
||||||
<tree editable="1" create="0" delete="0">
|
<tree editable="1" create="0" delete="0">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="value"/>
|
<field name="value"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user