mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
* [ADD] Add website_portal_contract * [ADD] website_portal_contract: Add url test, usage video. * [FIX] website_portal_contract: Fix controller test. * [FIX] website_portal_contract: Change all tests to HttpCase.
25 lines
696 B
Python
25 lines
696 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2017 LasLabs Inc.
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class AccountAnalyticContract(models.Model):
|
|
|
|
_inherit = 'account.analytic.contract'
|
|
|
|
website_template_id = fields.Many2one(
|
|
string='Website Template',
|
|
comodel_name='account.analytic.contract.template',
|
|
help='Website layout for contract',
|
|
default=lambda s: s._get_default_template(),
|
|
)
|
|
|
|
@api.model
|
|
def _get_default_template(self):
|
|
return self.env.ref(
|
|
'website_portal_contract.website_contract_template_default',
|
|
raise_if_not_found=False,
|
|
)
|