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.

24 lines
696 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 LasLabs Inc.
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, fields, models
  5. class AccountAnalyticContract(models.Model):
  6. _inherit = 'account.analytic.contract'
  7. website_template_id = fields.Many2one(
  8. string='Website Template',
  9. comodel_name='account.analytic.contract.template',
  10. help='Website layout for contract',
  11. default=lambda s: s._get_default_template(),
  12. )
  13. @api.model
  14. def _get_default_template(self):
  15. return self.env.ref(
  16. 'website_portal_contract.website_contract_template_default',
  17. raise_if_not_found=False,
  18. )