diff --git a/product_approval_management/README.rst b/product_approval_management/README.rst new file mode 100644 index 000000000..06a1ee6e8 --- /dev/null +++ b/product_approval_management/README.rst @@ -0,0 +1,40 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: lGPL-3 + +Product Approval +================ +* Product Approval Management is a Approval system for product creation + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) + +Credits +------- +Developer : (V15) Vishnu K P, Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/product_approval_management/__init__.py b/product_approval_management/__init__.py new file mode 100644 index 000000000..52317f446 --- /dev/null +++ b/product_approval_management/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from odoo import api, SUPERUSER_ID + + +def _default_product_confirm(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + product = env['product.template'].search([]) + for rec in product: + rec.approve_state = 'confirmed' diff --git a/product_approval_management/__manifest__.py b/product_approval_management/__manifest__.py new file mode 100644 index 000000000..fb32bfcaf --- /dev/null +++ b/product_approval_management/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Product Approval", + 'version': '15.0.1.0.0', + 'category': "Extra Tools", + 'summary': 'Product Approval allow you to control the product creation', + 'description': "Using this module a user can create product which" + "will be in draft state and only a product manager can" + "confirm the product.Also only the confirmed products" + "can be selected from sale order line", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['sale_management'], + 'data': ['security/product_approval_management_groups.xml', + 'security/ir.model.access.csv', + 'views/product_template_views.xml', + 'views/sale_order_views.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'post_init_hook': '_default_product_confirm', + 'auto_install': False, + 'application': False, +} diff --git a/product_approval_management/doc/RELEASE_NOTES.md b/product_approval_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e86519734 --- /dev/null +++ b/product_approval_management/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 17.11.2023 +#### Version 15.0.1.0.0 +##### ADD + +- Initial Commit for Product Approval diff --git a/product_approval_management/models/__init__.py b/product_approval_management/models/__init__.py new file mode 100644 index 000000000..d30b4d9a0 --- /dev/null +++ b/product_approval_management/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import product_template +from . import sale_order_line diff --git a/product_approval_management/models/product_template.py b/product_approval_management/models/product_template.py new file mode 100644 index 000000000..53c57575b --- /dev/null +++ b/product_approval_management/models/product_template.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# + +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ProductTemplate(models.Model): + """The module is used to add the approval state in the product form page""" + _inherit = 'product.template' + + approve_state = fields.Selection([('draft', 'Draft'), + ('confirmed', 'Confirmed')], + default='draft', string='State', + help='State to approve') + + def action_confirm_product_approval(self): + """Confirm button on the product form page""" + for rec in self: + rec.approve_state = 'confirmed' + + def action_reset_product_approval(self): + """Reset to draft state button on the product form page""" + for rec in self: + rec.approve_state = 'draft' + + def action_confirm_products(self): + """Bulk product approval button on the product form page""" + active_ids = self.env.context.get('active_ids') + products = self.env['product.template'].browse(active_ids) + products.action_confirm_product_approval() diff --git a/product_approval_management/models/sale_order_line.py b/product_approval_management/models/sale_order_line.py new file mode 100644 index 000000000..cacb7ffd9 --- /dev/null +++ b/product_approval_management/models/sale_order_line.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# + +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class SaleOrderLine(models.Model): + """Sale order line inherited to add the domain to the order line product""" + _inherit = 'sale.order.line' + + product_id = fields.Many2one('product.product', + string='Product', + domain="[('approve_state', '=', 'confirmed')," + " ('sale_ok', '=', True), '|', " + "('company_id', '=', False)," + "('company_id', '=', company_id)]", + change_default=True, ondelete='restrict', + check_company=True, + help="product field in sale order line") diff --git a/product_approval_management/security/ir.model.access.csv b/product_approval_management/security/ir.model.access.csv new file mode 100644 index 000000000..6260dc962 --- /dev/null +++ b/product_approval_management/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_product_template_approver,access.product.template.manager,model_product_template,product_template_approver,1,1,1,1 diff --git a/product_approval_management/security/product_approval_management_groups.xml b/product_approval_management/security/product_approval_management_groups.xml new file mode 100644 index 000000000..840349c10 --- /dev/null +++ b/product_approval_management/security/product_approval_management_groups.xml @@ -0,0 +1,9 @@ + + + + + + Product Manager + + + diff --git a/product_approval_management/static/description/assets/icons/check.png b/product_approval_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_approval_management/static/description/assets/icons/check.png differ diff --git a/product_approval_management/static/description/assets/icons/chevron.png b/product_approval_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/chevron.png differ diff --git a/product_approval_management/static/description/assets/icons/cogs.png b/product_approval_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/cogs.png differ diff --git a/product_approval_management/static/description/assets/icons/consultation.png b/product_approval_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_approval_management/static/description/assets/icons/consultation.png differ diff --git a/product_approval_management/static/description/assets/icons/ecom-black.png b/product_approval_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/ecom-black.png differ diff --git a/product_approval_management/static/description/assets/icons/education-black.png b/product_approval_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_approval_management/static/description/assets/icons/education-black.png differ diff --git a/product_approval_management/static/description/assets/icons/hotel-black.png b/product_approval_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_approval_management/static/description/assets/icons/hotel-black.png differ diff --git a/product_approval_management/static/description/assets/icons/license.png b/product_approval_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_approval_management/static/description/assets/icons/license.png differ diff --git a/product_approval_management/static/description/assets/icons/lifebuoy.png b/product_approval_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_approval_management/static/description/assets/icons/lifebuoy.png differ diff --git a/product_approval_management/static/description/assets/icons/logo.png b/product_approval_management/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_approval_management/static/description/assets/icons/logo.png differ diff --git a/product_approval_management/static/description/assets/icons/manufacturing-black.png b/product_approval_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_approval_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_approval_management/static/description/assets/icons/pos-black.png b/product_approval_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/pos-black.png differ diff --git a/product_approval_management/static/description/assets/icons/puzzle.png b/product_approval_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/puzzle.png differ diff --git a/product_approval_management/static/description/assets/icons/restaurant-black.png b/product_approval_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/restaurant-black.png differ diff --git a/product_approval_management/static/description/assets/icons/service-black.png b/product_approval_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_approval_management/static/description/assets/icons/service-black.png differ diff --git a/product_approval_management/static/description/assets/icons/trading-black.png b/product_approval_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_approval_management/static/description/assets/icons/trading-black.png differ diff --git a/product_approval_management/static/description/assets/icons/training.png b/product_approval_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_approval_management/static/description/assets/icons/training.png differ diff --git a/product_approval_management/static/description/assets/icons/update.png b/product_approval_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_approval_management/static/description/assets/icons/update.png differ diff --git a/product_approval_management/static/description/assets/icons/user.png b/product_approval_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_approval_management/static/description/assets/icons/user.png differ diff --git a/product_approval_management/static/description/assets/icons/wrench.png b/product_approval_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_approval_management/static/description/assets/icons/wrench.png differ diff --git a/product_approval_management/static/description/assets/modules/budget_image.png b/product_approval_management/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/product_approval_management/static/description/assets/modules/budget_image.png differ diff --git a/product_approval_management/static/description/assets/modules/credit_image.png b/product_approval_management/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/product_approval_management/static/description/assets/modules/credit_image.png differ diff --git a/product_approval_management/static/description/assets/modules/employee_image.png b/product_approval_management/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/product_approval_management/static/description/assets/modules/employee_image.png differ diff --git a/product_approval_management/static/description/assets/modules/export_image.png b/product_approval_management/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/product_approval_management/static/description/assets/modules/export_image.png differ diff --git a/product_approval_management/static/description/assets/modules/gantt_image.png b/product_approval_management/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/product_approval_management/static/description/assets/modules/gantt_image.png differ diff --git a/product_approval_management/static/description/assets/modules/quotation_image.png b/product_approval_management/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/product_approval_management/static/description/assets/modules/quotation_image.png differ diff --git a/product_approval_management/static/description/assets/screenshots/1.jpg b/product_approval_management/static/description/assets/screenshots/1.jpg new file mode 100644 index 000000000..8503836e3 Binary files /dev/null and b/product_approval_management/static/description/assets/screenshots/1.jpg differ diff --git a/product_approval_management/static/description/assets/screenshots/2.png b/product_approval_management/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..cc482ca9f Binary files /dev/null and b/product_approval_management/static/description/assets/screenshots/2.png differ diff --git a/product_approval_management/static/description/assets/screenshots/3.jpg b/product_approval_management/static/description/assets/screenshots/3.jpg new file mode 100644 index 000000000..88aafa52f Binary files /dev/null and b/product_approval_management/static/description/assets/screenshots/3.jpg differ diff --git a/product_approval_management/static/description/assets/screenshots/hero.gif b/product_approval_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..01bd701bb Binary files /dev/null and b/product_approval_management/static/description/assets/screenshots/hero.gif differ diff --git a/product_approval_management/static/description/banner.jpg b/product_approval_management/static/description/banner.jpg new file mode 100644 index 000000000..41b4dd000 Binary files /dev/null and b/product_approval_management/static/description/banner.jpg differ diff --git a/product_approval_management/static/description/icon.png b/product_approval_management/static/description/icon.png new file mode 100644 index 000000000..49fb709a1 Binary files /dev/null and b/product_approval_management/static/description/icon.png differ diff --git a/product_approval_management/static/description/index.html b/product_approval_management/static/description/index.html new file mode 100644 index 000000000..4d8d73a8d --- /dev/null +++ b/product_approval_management/static/description/index.html @@ -0,0 +1,542 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+ +
+
+
+

+ Product + Approval

+

+ A Powerful Tool for Companies Looking to Maintain Control Over the Introduction of New Products. +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ Introducing Approval For Products in the odoo. The module help to + provide users with an Approval Feature on product creation and only those approved + products can be used in sale orders.

+
+ +
+
+
+

+ Features +

+
+ +
+
+ +
+
+

+ User Permissions

+
+
+ +
+
+ +
+
+

+ Only The Product Manager Can Approve The Product

+
+
+ +
+
+ +
+
+

+ Newly generated products are first going to be in draft state.

+
+
+ +
+
+ +
+
+

+ The Sale Order Line Displays Only Approved Products.

+
+
+
+ +
+
+

+ Screenshots +

+
+
+
+

+ Product Manager Check Box

+ +
+
+

+ CONFIRM Button

+

+ CONFIRM Button in Product Form Page

+ +
+
+

+ Order line Domain

+

+ User Can't use The Draft Stage Product on Order line

+ +
+
+
+ +
+
+

Suggested Products

+
+ +
+
+ + +
+
+
+

Our Services

+
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + +
+
+
+

Our Industries

+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + +
+
+
+

Need Help?

+
+
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+
diff --git a/product_approval_management/views/product_template_views.xml b/product_approval_management/views/product_template_views.xml new file mode 100644 index 000000000..17d8bac45 --- /dev/null +++ b/product_approval_management/views/product_template_views.xml @@ -0,0 +1,46 @@ + + + + + product.template.view.form.inherit.product.approval.management + product.template + + +
+
+
+
+ + + product.template.view.search.inherit.product.approval.management + product.template + + + + + + + + + + + + + Confirm + + code + model.action_confirm_products() + + + +
diff --git a/product_approval_management/views/sale_order_views.xml b/product_approval_management/views/sale_order_views.xml new file mode 100644 index 000000000..5fc331c4f --- /dev/null +++ b/product_approval_management/views/sale_order_views.xml @@ -0,0 +1,18 @@ + + + + + sale.order.view.form.inherit.product.approval.management + sale.order + + + + [('approve_state', '=', 'confirmed'), + ('sale_ok', '=', True), '|', + ('company_id', '=', False), ('company_id', '=', company_id)] + + + + +