You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1010 B

6 years ago
6 years ago
6 years ago
  1. # Copyright (C) 2018 - TODAY, Pavlov Media
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import fields, models
  4. class AgreementClause(models.Model):
  5. _name = 'agreement.clause'
  6. _description = 'Agreement Clauses'
  7. _order = 'sequence'
  8. name = fields.Char(string="Name", required=True)
  9. title = fields.Char(string="Title",
  10. help="The title is displayed on the PDF."
  11. "The name is not.")
  12. sequence = fields.Integer(string="Sequence")
  13. agreement_id = fields.Many2one(
  14. 'agreement',
  15. string="Agreement",
  16. ondelete="cascade"
  17. )
  18. section_id = fields.Many2one(
  19. 'agreement.section',
  20. string="Section",
  21. ondelete="cascade"
  22. )
  23. content = fields.Html(string="Clause Content")
  24. active = fields.Boolean(
  25. string="Active",
  26. default=True,
  27. help="If unchecked, it will allow you to hide the agreement without "
  28. "removing it."
  29. )