[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:
scampbell
2020-09-21 10:57:42 -07:00
committed by Olga Marco
parent 07b309ccd6
commit 7a4e3df740
14 changed files with 235 additions and 42 deletions

View File

@@ -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'