mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
Make company required on subscription_template. Make subcription_template_id a company-dependent field on product_template.
15 lines
449 B
Python
15 lines
449 B
Python
# Copyright 2023 Domatix - Carlos Martínez
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
from odoo import fields, models
|
|
|
|
|
|
class Product(models.Model):
|
|
_inherit = "product.template"
|
|
|
|
subscribable = fields.Boolean(string="Subscribable product")
|
|
subscription_template_id = fields.Many2one(
|
|
comodel_name="sale.subscription.template",
|
|
string="Subscription template",
|
|
company_dependent=True,
|
|
)
|