docx_report_generation/models/res_partner_document_template.py

48 lines
1.3 KiB
Python
Raw Normal View History

from odoo import _, fields, models
class DocumentTemplate(models.Model):
_name = "res.partner.document.template"
_description = "Document Template"
2020-01-29 15:28:24 +05:00
_order = "template_type desc,company_type,sequence"
name = fields.Char()
attachment_id = fields.Many2one(
2020-01-20 18:48:12 +05:00
"ir.attachment",
string="Template Attachment",
ondelete="cascade",
required=True,
)
document_type = fields.Selection(
string="Type of document",
selection=[
("contract", _("Contract")),
("annex", _("Annex")),
("addition", _("Addition")),
2020-01-20 18:48:12 +05:00
],
)
document_type_name = fields.Selection(
string="Document",
selection=[
2020-01-17 19:02:02 +05:00
("bill", _("Bill")),
("specification", _("Specification")),
("approval_list", _("Approval List")),
("act_at", _("Act of Acceptance and Transfer")),
("act_ad", _("Act of Acceptance and Delivery")),
2020-01-20 18:48:12 +05:00
],
)
company_type = fields.Selection(
selection=[
("person", "Individual"),
("sp", "Sole Proprietor"),
("plc", "Private Limited Company"),
]
)
template_type = fields.Selection(
2020-09-24 00:04:52 +05:00
selection=[
("contract", "Contract"),
("annex", "Annex"),
]
)
sequence = fields.Integer()