mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] Product Variant on Serviceprofile
[IMP] Allow Product Variant Serviceprofile [IMP] Add Variant To Tree/Form View [IMP] Boolean First
This commit is contained in:
@@ -16,3 +16,17 @@ class ProductTemplate(models.Model):
|
||||
def onchange_type(self):
|
||||
if self.is_serviceprofile:
|
||||
self.type = 'service'
|
||||
|
||||
|
||||
class ProductProduct(models.Model):
|
||||
_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.""")
|
||||
|
||||
@api.onchange('is_serviceprofile')
|
||||
def onchange_type(self):
|
||||
if self.is_serviceprofile:
|
||||
self.type = 'service'
|
||||
|
||||
Reference in New Issue
Block a user