mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[14.0][MIG] agreement_serviceprofile (Version 12.0 to 14.0)
[MIG] Black [MIG] Black
This commit is contained in:
committed by
Olga Marco
parent
7a4e3df740
commit
2e19f4a2ba
@@ -5,28 +5,30 @@ from odoo import api, fields, models
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
_inherit = "product.template"
|
||||
|
||||
is_serviceprofile = fields.Boolean(
|
||||
string="Create Service Profiles",
|
||||
help="""If True, this product will create a service profile on the
|
||||
agreement when the sales order is confirmed.""")
|
||||
agreement when the sales order is confirmed.""",
|
||||
)
|
||||
|
||||
@api.onchange('is_serviceprofile')
|
||||
@api.onchange("is_serviceprofile")
|
||||
def onchange_type(self):
|
||||
if self.is_serviceprofile:
|
||||
self.type = 'service'
|
||||
self.type = "service"
|
||||
|
||||
|
||||
class ProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
_inherit = "product.product"
|
||||
|
||||
is_serviceprofile = fields.Boolean(
|
||||
string="Create Service Profiles",
|
||||
help="""If True, this product will create a service profile on the
|
||||
agreement when the sales order is confirmed.""")
|
||||
agreement when the sales order is confirmed.""",
|
||||
)
|
||||
|
||||
@api.onchange('is_serviceprofile')
|
||||
@api.onchange("is_serviceprofile")
|
||||
def onchange_type(self):
|
||||
if self.is_serviceprofile:
|
||||
self.type = 'service'
|
||||
self.type = "service"
|
||||
|
||||
Reference in New Issue
Block a user