diff --git a/.gitignore b/.gitignore index b6e47617de1..f79670dfc2e 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,10 @@ dmypy.json # Pyre type checker .pyre/ + +node_modules +.eslintignore +.eslintrc.json +jsconfig.json +package-lock.json +package.json diff --git a/product_as_kit/__init__.py b/product_as_kit/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_as_kit/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_as_kit/__manifest__.py b/product_as_kit/__manifest__.py new file mode 100644 index 00000000000..d59130db264 --- /dev/null +++ b/product_as_kit/__manifest__.py @@ -0,0 +1,14 @@ +{ + "name": "Product as Kit", + "version": "1.0", + "depends": ["product", "sale_management"], + "author": "Shivam Saksham(shsak)", + "category": "Sales", + "description": """ + An module to let the product be sold as kit. + """, + "license": "LGPL-3", + "data": [ + "views/product_template_views.xml", + ], +} diff --git a/product_as_kit/models/__init__.py b/product_as_kit/models/__init__.py new file mode 100644 index 00000000000..e8fa8f6bf1e --- /dev/null +++ b/product_as_kit/models/__init__.py @@ -0,0 +1 @@ +from . import product_template diff --git a/product_as_kit/models/product_template.py b/product_as_kit/models/product_template.py new file mode 100644 index 00000000000..2b65ee246c5 --- /dev/null +++ b/product_as_kit/models/product_template.py @@ -0,0 +1,8 @@ +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + isKit = fields.Boolean(default=False) + sub_products = fields.Many2many('product.product') diff --git a/product_as_kit/views/product_template_views.xml b/product_as_kit/views/product_template_views.xml new file mode 100644 index 00000000000..10d98e771d0 --- /dev/null +++ b/product_as_kit/views/product_template_views.xml @@ -0,0 +1,13 @@ + + + product.template.form.inherit.product.as.kit + product.template + + + + + + + + +