diff --git a/low_stocks_product_alert/README.rst b/low_stocks_product_alert/README.rst new file mode 100644 index 000000000..f695f5b9c --- /dev/null +++ b/low_stocks_product_alert/README.rst @@ -0,0 +1,40 @@ +Product Stock Alert +=================== +* Product Stock Alert module for Odoo 14. + +Installation +============ + - www.odoo.com/documentation/14.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions '__ + +Credits +------- +* 'Cybrosys Techno Solutions '__ + Gion D @Cybrosys + +Contacts +-------- +* Mail 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 +========== +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/low_stocks_product_alert/__init__.py b/low_stocks_product_alert/__init__.py new file mode 100644 index 000000000..3367fdfdb --- /dev/null +++ b/low_stocks_product_alert/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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 diff --git a/low_stocks_product_alert/__manifest__.py b/low_stocks_product_alert/__manifest__.py new file mode 100644 index 000000000..8364bdf79 --- /dev/null +++ b/low_stocks_product_alert/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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 Stock Alert", + 'version': '14.0.1.0.0', + 'summary': """Product Stock Alert""", + "category": 'Inventory', + 'description': """Product Stock Alert""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'sale_management', 'stock', 'point_of_sale', 'product'], + 'data': [ + 'views/res_config_settings_views.xml', + 'views/product_product_views.xml', + 'views/product_template_views.xml' + ], + 'qweb': [ + 'static/src/xml/alert_tag_js.xml', + ], + 'images': ['static/description/banner.png'], + 'license': "LGPL-3", + 'installable': True, + 'application': True +} diff --git a/low_stocks_product_alert/doc/RELEASE_NOTES.md b/low_stocks_product_alert/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..9ecad8749 --- /dev/null +++ b/low_stocks_product_alert/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.06.2022 +#### Version 14.0.1.0.0 +#### ADD +- Initial commit for Product Stock Alert Module \ No newline at end of file diff --git a/low_stocks_product_alert/models/__init__.py b/low_stocks_product_alert/models/__init__.py new file mode 100644 index 000000000..c06b7ebd6 --- /dev/null +++ b/low_stocks_product_alert/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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_product +from . import product_template +from . import res_config_settings diff --git a/low_stocks_product_alert/models/product_product.py b/low_stocks_product_alert/models/product_product.py new file mode 100644 index 000000000..e3e9c26a9 --- /dev/null +++ b/low_stocks_product_alert/models/product_product.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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 api, fields, models + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + alert_tag = fields.Char( + string='Product Alert State', compute='_compute_alert_tag') + + @api.depends('qty_available') + def _compute_alert_tag(self): + is_low_stock_alert = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'low_stocks_product_alert.is_low_stock_alert') + min_low_stock_alert = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'low_stocks_product_alert.min_low_stock_alert') + if is_low_stock_alert: + for rec in self: + rec.alert_tag = False + if rec.type == 'product': + if rec.qty_available <= int(min_low_stock_alert): + rec.alert_tag = rec.qty_available + + else: + self.alert_tag = False + + + + diff --git a/low_stocks_product_alert/models/product_template.py b/low_stocks_product_alert/models/product_template.py new file mode 100644 index 000000000..ac9e6b297 --- /dev/null +++ b/low_stocks_product_alert/models/product_template.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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 api, fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + _description = 'product template' + + alert_state = fields.Boolean(string='Product Alert State', default=False, + compute='_compute_alert_state') + color_field = fields.Char(string='Background color') + + @api.depends('qty_available') + def _compute_alert_state(self): + is_low_stock_alert = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'low_stocks_product_alert.is_low_stock_alert') + min_low_stock_alert = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'low_stocks_product_alert.min_low_stock_alert') + if is_low_stock_alert: + for rec in self: + rec.alert_state = False + rec.color_field = 'white' + if rec.type == 'product': + if rec.qty_available <= int(min_low_stock_alert): + rec.alert_state = True + rec.color_field = '#fdc6c673' + + else: + self.alert_state = False + self.color_field = 'white' + diff --git a/low_stocks_product_alert/models/res_config_settings.py b/low_stocks_product_alert/models/res_config_settings.py new file mode 100644 index 000000000..bbb5170b2 --- /dev/null +++ b/low_stocks_product_alert/models/res_config_settings.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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 api, fields, models + + +class ResConfig(models.TransientModel): + _inherit = 'res.config.settings' + + is_low_stock_alert = fields.Boolean(string="Low Stock Alert") + min_low_stock_alert = fields.Integer( + string='Alert Quantity', default=0, + help='Change the background color for the product based' + ' on the Alert Quant.') + + def set_values(self): + super(ResConfig, self).set_values() + + self.env['ir.config_parameter'].set_param( + 'low_stocks_product_alert.is_low_stock_alert', self.is_low_stock_alert) + + self.env['ir.config_parameter'].set_param( + 'low_stocks_product_alert.min_low_stock_alert', self.min_low_stock_alert) + + @api.model + def get_values(self): + res = super(ResConfig, self).get_values() + params = self.env['ir.config_parameter'].sudo() + res.update( + is_low_stock_alert=params.get_param( + 'low_stocks_product_alert.is_low_stock_alert'), + min_low_stock_alert=params.get_param( + 'low_stocks_product_alert.min_low_stock_alert'), + ) + return res diff --git a/low_stocks_product_alert/static/description/assets/icons/check.png b/low_stocks_product_alert/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/check.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/chevron.png b/low_stocks_product_alert/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/chevron.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/cogs.png b/low_stocks_product_alert/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/cogs.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/consultation.png b/low_stocks_product_alert/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/consultation.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/ecom-black.png b/low_stocks_product_alert/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/ecom-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/education-black.png b/low_stocks_product_alert/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/education-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/hotel-black.png b/low_stocks_product_alert/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/hotel-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/license.png b/low_stocks_product_alert/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/license.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/lifebuoy.png b/low_stocks_product_alert/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/lifebuoy.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/logo.png b/low_stocks_product_alert/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/logo.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/manufacturing-black.png b/low_stocks_product_alert/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/manufacturing-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/pos-black.png b/low_stocks_product_alert/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/pos-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/puzzle.png b/low_stocks_product_alert/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/puzzle.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/restaurant-black.png b/low_stocks_product_alert/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/restaurant-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/service-black.png b/low_stocks_product_alert/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/service-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/trading-black.png b/low_stocks_product_alert/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/trading-black.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/training.png b/low_stocks_product_alert/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/training.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/update.png b/low_stocks_product_alert/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/update.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/user.png b/low_stocks_product_alert/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/user.png differ diff --git a/low_stocks_product_alert/static/description/assets/icons/wrench.png b/low_stocks_product_alert/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/icons/wrench.png differ diff --git a/low_stocks_product_alert/static/description/assets/modules/budget_image.png b/low_stocks_product_alert/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/modules/budget_image.png differ diff --git a/low_stocks_product_alert/static/description/assets/modules/credit_image.png b/low_stocks_product_alert/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/modules/credit_image.png differ diff --git a/low_stocks_product_alert/static/description/assets/modules/employee_image.png b/low_stocks_product_alert/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/modules/employee_image.png differ diff --git a/low_stocks_product_alert/static/description/assets/modules/export_image.png b/low_stocks_product_alert/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/modules/export_image.png differ diff --git a/low_stocks_product_alert/static/description/assets/modules/gantt_image.png b/low_stocks_product_alert/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/modules/gantt_image.png differ diff --git a/low_stocks_product_alert/static/description/assets/modules/quotation_image.png b/low_stocks_product_alert/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/modules/quotation_image.png differ diff --git a/low_stocks_product_alert/static/description/assets/screenshots/alert_1.png b/low_stocks_product_alert/static/description/assets/screenshots/alert_1.png new file mode 100644 index 000000000..64bf62ec8 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/screenshots/alert_1.png differ diff --git a/low_stocks_product_alert/static/description/assets/screenshots/alert_2.png b/low_stocks_product_alert/static/description/assets/screenshots/alert_2.png new file mode 100644 index 000000000..9cb53700c Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/screenshots/alert_2.png differ diff --git a/low_stocks_product_alert/static/description/assets/screenshots/alert_3.png b/low_stocks_product_alert/static/description/assets/screenshots/alert_3.png new file mode 100644 index 000000000..dc091290c Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/screenshots/alert_3.png differ diff --git a/low_stocks_product_alert/static/description/assets/screenshots/alert_4.png b/low_stocks_product_alert/static/description/assets/screenshots/alert_4.png new file mode 100644 index 000000000..0d9988f79 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/screenshots/alert_4.png differ diff --git a/low_stocks_product_alert/static/description/assets/screenshots/alert_5.png b/low_stocks_product_alert/static/description/assets/screenshots/alert_5.png new file mode 100644 index 000000000..8bb8d3416 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/screenshots/alert_5.png differ diff --git a/low_stocks_product_alert/static/description/assets/screenshots/hero_psa.gif b/low_stocks_product_alert/static/description/assets/screenshots/hero_psa.gif new file mode 100644 index 000000000..6b0040b63 Binary files /dev/null and b/low_stocks_product_alert/static/description/assets/screenshots/hero_psa.gif differ diff --git a/low_stocks_product_alert/static/description/banner.png b/low_stocks_product_alert/static/description/banner.png new file mode 100644 index 000000000..e8e1acdc2 Binary files /dev/null and b/low_stocks_product_alert/static/description/banner.png differ diff --git a/low_stocks_product_alert/static/description/icon.png b/low_stocks_product_alert/static/description/icon.png new file mode 100644 index 000000000..71912b9b0 Binary files /dev/null and b/low_stocks_product_alert/static/description/icon.png differ diff --git a/low_stocks_product_alert/static/description/index.html b/low_stocks_product_alert/static/description/index.html new file mode 100644 index 000000000..a6bfc4c72 --- /dev/null +++ b/low_stocks_product_alert/static/description/index.html @@ -0,0 +1,616 @@ +
+
+
+
+ +
+
+
+ Community +
+ + + + + +
+
+
+
+ +
+
+
+

+ Product Stock Alert

+

+ This Module will help you to easily manage your product stock. +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ The Product Stock Alert module helps you to handle product stock in effective way. The product get + highlighted when stock for a particular product + falls below the defined minimum quantity.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Stock Alert in List & Kanban View

+

+ Product details gets highlighted in red color, the product quantity goes below the alert quantity + defined. + +

+
+
+ + +
+
+ +
+
+

+ Alert Tag in POS

+

+ Display the quantity and alert tag, the products goes below the alert quantity defined. +

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Enable the "Low Stock Alert "button.

+

+ Go to Settings --> Enable "Low Stock Alert" button and enter Alert Quantity. +

+ +
+ +
+

+ List View

+

+ If the quantity of the product is less than the quantity of the alert quantity defined in the settings, the list view of the product will display a red background color. +

+ +
+ +
+

+ Kanban View

+

+ If the quantity of the product is less than the quantity of the alert quantity defined in the settings, the kanban view of the product will display a red background color. +

+ +
+ + +
+

+ Point of Sale

+

+ If the quantity of the product is less than the quantity of the alert quantity defined in the settings, the pos session of the product will display a alert tag with quantity. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

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?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/low_stocks_product_alert/static/src/css/style.css b/low_stocks_product_alert/static/src/css/style.css new file mode 100644 index 000000000..dafb4e5b5 --- /dev/null +++ b/low_stocks_product_alert/static/src/css/style.css @@ -0,0 +1,4 @@ + +.d-color { + background-color: red !important; +} \ No newline at end of file diff --git a/low_stocks_product_alert/static/src/js/alert_color_js.js b/low_stocks_product_alert/static/src/js/alert_color_js.js new file mode 100644 index 000000000..975ff138b --- /dev/null +++ b/low_stocks_product_alert/static/src/js/alert_color_js.js @@ -0,0 +1,38 @@ +odoo.define('low_stock_alert', function (require) { +"use strict"; + +var ListRenderer = require('web.ListRenderer'); +var pyUtils = require('web.py_utils'); + + +//import ListRenderer from 'web.ListRenderer'; +//import pyUtils from 'web.py_utils'; + + ListRenderer.include({ + + _renderBodyCell: function (record, node) { + var $td = this._super.apply(this, arguments); + console.log('this', this) + console.log('arguments', arguments) + + if (node.tag !== 'field') { + return $td; + } + + if (arguments && arguments[0] && arguments[0]['model'] == 'product.template') { + if (arguments[0]['data'] && arguments[0]['data']['alert_state'] && arguments[0]['data']['alert_state'] == true) { + $td.css({'color': '#000000', 'background-color': 'rgba(253, 198, 198, 0.39)'}); + } + } + + + + return $td; + }, + + }); +}); + + + + diff --git a/low_stocks_product_alert/static/src/js/alert_tag_js.js b/low_stocks_product_alert/static/src/js/alert_tag_js.js new file mode 100644 index 000000000..afda16dae --- /dev/null +++ b/low_stocks_product_alert/static/src/js/alert_tag_js.js @@ -0,0 +1,15 @@ +odoo.define('pos_product_alert_tag.Product', function(require){ + 'use strict'; + + var models = require('point_of_sale.models'); + var _super_posmodel = models.PosModel.prototype; + + models.PosModel = models.PosModel.extend({ + + initialize: function(session, attributes){ + var self = this; + models.load_fields('product.product', 'alert_tag'); + _super_posmodel.initialize.apply(this, arguments); + } + }); +}); \ No newline at end of file diff --git a/low_stocks_product_alert/static/src/xml/alert_tag_js.xml b/low_stocks_product_alert/static/src/xml/alert_tag_js.xml new file mode 100644 index 000000000..40755e196 --- /dev/null +++ b/low_stocks_product_alert/static/src/xml/alert_tag_js.xml @@ -0,0 +1,20 @@ + + + + + diff --git a/low_stocks_product_alert/views/product_product_views.xml b/low_stocks_product_alert/views/product_product_views.xml new file mode 100644 index 000000000..3080b2c2f --- /dev/null +++ b/low_stocks_product_alert/views/product_product_views.xml @@ -0,0 +1,34 @@ + + + + +