Browse Source

May 30: [FIX] Bug Fixed 'low_stocks_product_alert'

pull/320/head
RisvanaCybro 11 months ago
parent
commit
0925dfde4b
  1. 19
      low_stocks_product_alert/models/product_product.py
  2. 6
      low_stocks_product_alert/models/product_template.py
  3. 21
      low_stocks_product_alert/models/res_config_settings.py
  4. BIN
      low_stocks_product_alert/static/description/assets/screenshots/1.png
  5. BIN
      low_stocks_product_alert/static/description/assets/screenshots/2.png
  6. BIN
      low_stocks_product_alert/static/description/assets/screenshots/3.png
  7. BIN
      low_stocks_product_alert/static/description/assets/screenshots/4.png
  8. BIN
      low_stocks_product_alert/static/description/assets/screenshots/5.png
  9. BIN
      low_stocks_product_alert/static/description/assets/screenshots/hero.gif
  10. BIN
      low_stocks_product_alert/static/description/assets/screenshots/low-stock-product-alert-v16-gif.gif
  11. BIN
      low_stocks_product_alert/static/description/assets/screenshots/lows1.png
  12. BIN
      low_stocks_product_alert/static/description/assets/screenshots/lows2.png
  13. BIN
      low_stocks_product_alert/static/description/assets/screenshots/lows3.png
  14. BIN
      low_stocks_product_alert/static/description/assets/screenshots/lows4.png
  15. BIN
      low_stocks_product_alert/static/description/assets/screenshots/lows5.png
  16. BIN
      low_stocks_product_alert/static/description/assets/screenshots/lows6.png
  17. 386
      low_stocks_product_alert/static/description/index.html
  18. 11
      low_stocks_product_alert/views/product_product_views.xml
  19. 13
      low_stocks_product_alert/views/res_config_settings_views.xml

19
low_stocks_product_alert/models/product_product.py

@ -36,7 +36,18 @@ class ProductProduct(models.Model):
alert_tag = fields.Char(
string='Product Alert Tag', compute='_compute_alert_tag',
help='This field represents the alert tag of the product.')
help='This field represents the alert tag of the product.', store=True)
is_low_stock_alert = fields.Boolean(
string="Low Stock Alert",
help='This field determines the minimum stock quantity at which a low '
'stock alert will be triggered.When the product quantity falls '
'below this value, the background color for the product will be '
'changed based on the alert state.',
)
min_low_stock_alert = fields.Integer(
string='Alert Quantity',
help='Change the background color for the product based'
'on the Alert Quant.')
@api.depends('qty_available')
def _compute_alert_tag(self):
@ -49,3 +60,9 @@ class ProductProduct(models.Model):
self.env['ir.config_parameter'].sudo().get_param(
'low_stocks_product_alert.min_low_stock_alert'))
rec.alert_tag = rec.qty_available if is_low_stock else False
elif self.env['ir.config_parameter'].sudo().get_param(
'low_stocks_product_alert.is_low_stock_alert_individual'):
for rec in self:
is_low_stock_single = rec.detailed_type == 'product' and rec.qty_available <= int(
rec.min_low_stock_alert)
rec.alert_tag = rec.qty_available if is_low_stock_single else False

6
low_stocks_product_alert/models/product_template.py

@ -56,6 +56,12 @@ class ProductTemplate(models.Model):
self.env['ir.config_parameter'].sudo().get_param(
'low_stocks_product_alert.min_low_stock_alert')) \
else (True, '#fdc6c673')
elif self.env['ir.config_parameter'].sudo().get_param(
'low_stocks_product_alert.is_low_stock_alert_individual') and self.filtered(lambda x: x.product_variant_id.is_low_stock_alert):
for rec in self:
rec.alert_state, rec.color_field = (False, 'white') if \
rec.detailed_type != 'product' or rec.qty_available > int(rec.product_variant_id.min_low_stock_alert) \
else (True, '#fdc6c673')
else:
self.alert_state = False
self.color_field = 'white'

21
low_stocks_product_alert/models/res_config_settings.py

@ -19,7 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
from odoo import api, fields, models
class ResConfig(models.TransientModel):
@ -32,14 +32,31 @@ class ResConfig(models.TransientModel):
_inherit = 'res.config.settings'
is_low_stock_alert = fields.Boolean(
string="Low Stock Alert",
string="Low Stock Alert For All Products",
help='This field determines the minimum stock quantity at which a low '
'stock alert will be triggered.When the product quantity falls '
'below this value, the background color for the product will be '
'changed based on the alert state.',
config_parameter='low_stocks_product_alert.is_low_stock_alert')
is_low_stock_alert_individual = fields.Boolean(
string="Low Stock Alert For Individual Product",
help='This field determines the minimum stock quantity at which a low '
'stock alert will be triggered.When the product quantity falls '
'below this value, the background color for the product will be '
'changed based on the alert state.',
config_parameter='low_stocks_product_alert.is_low_stock_alert_individual',
default=False)
min_low_stock_alert = fields.Integer(
string='Alert Quantity', default=0,
help='Change the background color for the product based'
'on the Alert Quant.',
config_parameter='low_stocks_product_alert.min_low_stock_alert')
@api.onchange('is_low_stock_alert_individual')
def _onchange_is_low_stock_alert_individual(self):
"""The function is used to change the stock alert in the product form"""
if self.env['ir.config_parameter'].sudo().get_param(
'low_stocks_product_alert.is_low_stock_alert_individual'):
product_variants = self.env['product.product'].search([])
for rec in product_variants:
rec.is_low_stock_alert = True

BIN
low_stocks_product_alert/static/description/assets/screenshots/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/low-stock-product-alert-v16-gif.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/lows1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/lows2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/lows3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/lows4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/lows5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
low_stocks_product_alert/static/description/assets/screenshots/lows6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

386
low_stocks_product_alert/static/description/index.html

@ -2,7 +2,8 @@
<!-- TITLE BAR -->
<div
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" style="width: 42px; height: 42px;" />
<img src="assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
@ -21,21 +22,27 @@
<!-- END OF TITLE BAR -->
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">Product Low Stock Alert</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Simplify your stock management by promptly recognizing low stock items through highlighted red color.</p>
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Product Low Stock Alert</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Simplify your stock management by promptly recognizing low stock items
through highlighted red color.</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/low-stock-product-alert-v16-gif.gif"
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;" />
<img src="assets/screenshots/hero.gif"
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png" />
<img src="assets/misc/compass.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
@ -50,7 +57,7 @@
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
@ -65,7 +72,7 @@
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
@ -80,7 +87,7 @@
screenshots of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
@ -88,42 +95,60 @@
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview">
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pie-chart.png" />
<img src="assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Overview
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Overview
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
The Product Low 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.
The Product Low 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.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png" />
<img src="assets/misc/features.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Features
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center" style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2" />
<div class="d-flex align-items-center"
style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Stock Alert in List & Kanban View</span>
<p style="margin-left: 20px; font-size: 14px;">Product details get highlighted in red color when the product quantity goes below the alert quantity defined.</p>
<p style="margin-left: 20px; font-size: 14px;">Product details get
highlighted in red color when the product quantity goes below
the alert quantity defined.</p>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Alert Tag in POS</span>
<p style="margin-left: 20px; font-size: 14px;">Display the quantity and alert tag when the products go below the alert quantity defined.</p>
<p style="margin-left: 20px; font-size: 14px;">Display the quantity
and alert tag when the products go below the alert quantity
defined.</p>
</div>
</div>
</div>
@ -132,25 +157,30 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots">
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png" />
<img src="assets/misc/pictures.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<h3 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
Enable the "Low Stock Alert "button.</h3>
Enable the "Low Stock Alert for All Products"</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Go to Settings --> Enable "Low Stock Alert" button and enter
Go to Settings --> Enable "Low Stock Alert for All Products" button
and enter the
Alert Quantity.
</p>
<img src="assets/screenshots/1.png"
<img src="assets/screenshots/lows1.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
@ -165,12 +195,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
the alert quantity defined in the settings, the list view of
the product will display a red background color.
</p>
<img src="assets/screenshots/3.png"
<img src="assets/screenshots/lows3.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
</div>
<div class="col-sm-12">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 class="mt-3"
@ -182,12 +212,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
the alert quantity defined in the settings, the kanban view
of the product will display a red background color.
</p>
<img src="assets/screenshots/2.png"
<img src="assets/screenshots/lows2.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
</div>
<div class="col-sm-12">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h2 class="mt-3"
@ -199,34 +229,111 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
the alert quantity defined in the settings, the pos session
of the product will display an alert tag with quantity.
</p>
<img src="assets/screenshots/5.png"
<img src="assets/screenshots/lows6.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
</div>
</div>
<div class="col-sm-12">
<h3 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
Enable the "Low Stock Alert for Individual Products"</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Go to Settings --> Enable "Low Stock Alert for Individual
Products" button and enter the
Alert Quantity in the product form of each product.
</p>
<img src="assets/screenshots/lows4.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
<img src="assets/screenshots/lows5.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-sm-12">
<h3 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
List View</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
If the quantity of the product is less than the quantity of
the alert quantity defined in the product, the list view of
the product will display a red background color.
</p>
<img src="assets/screenshots/lows3.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
Kanban View</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
If the quantity of the product is less than the
quantity of
the alert quantity defined in the product, the kanban
view
of the product will display a red background color.
</p>
<img src="assets/screenshots/lows2.png"
class="img-responsive img-thumbnail border"
width="100%"
height="auto"/>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<div class="col-sm-12">
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div style="display: block; margin: 30px auto;">
<h2 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
Point of Sale</h2>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
If the quantity of the product is less than the
quantity of
the alert quantity defined in the product, the pos
session
of the product will display an alert tag with
quantity.
</p>
<img src="assets/screenshots/lows6.png"
class="img-responsive img-thumbnail border"
width="100%"
height="auto"/>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png" />
<img src="assets/misc/categories.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Related
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
</div>
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
<div id="demo1" class="row carousel slide" data-ride="carousel">
<div id="demo1" class="row carousel slide"
data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active"
@ -265,7 +372,8 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="carousel-item"
style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/product_barcode/"
@ -317,29 +425,35 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
</a>
</div>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png" />
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our Services
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
</div>
<div class="container my-5">
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/cogs.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
@ -347,9 +461,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/wrench.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
@ -357,9 +474,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/lifebuoy.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
@ -368,9 +488,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/user.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
@ -379,9 +502,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/puzzle.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
@ -389,9 +515,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/update.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
@ -400,9 +529,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/consultation.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
@ -410,9 +542,12 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/training.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
@ -420,36 +555,44 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
<img src="assets/icons/license.png"
class="img-responsive" height="48px"
width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
</div>
<!-- END OF OUR SERVICES -->
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png" />
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
</div>
<div class="container my-5">
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
@ -463,7 +606,9 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
@ -477,7 +622,9 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/education-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
@ -490,7 +637,8 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px"
<img src="assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
@ -504,7 +652,9 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
@ -518,7 +668,9 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/service-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
@ -531,7 +683,9 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
@ -544,7 +698,9 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<img src="assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
@ -555,30 +711,36 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
</div>
</div>
</div>
</div>
</div>
<!-- END OF OUR INDUSTRIES -->
<!-- END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png" />
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Support
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48" width="48" style="width: 42px; height: 42px;" />
<img src="assets/misc/support.png"
height="48" width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help? Get in touch.</p>
<p style="line-height: 100%;">Got questions
or need help? Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
@ -590,13 +752,17 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52" width="52" style="width: 52px; height: 52px;" />
<img src="assets/misc/whatsapp.png"
height="52" width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<p style="line-height: 100%;">Say hi to us
on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">+91 86068
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707</p>
</a>
</div>
@ -605,10 +771,14 @@ The Product Low Stock Alert module helps you to handle product stock in effectiv
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;" />
<img src="assets/misc/logo.png" width="144"
height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div>
<!-- END OF SUPPORT -->

11
low_stocks_product_alert/views/product_product_views.xml

@ -1,14 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Inherit product.product view form to add field-->
<!--Inherit product.product view form to add field-->
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.product.view.form.inherit.low.stocks.product.alert</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="pos_categ_id" position="after">
<field name="alert_tag" />
<field name="alert_tag"/>
</field>
<xpath expr="//group[@name='group_lots_and_weight']"
position="inside">
<field name="is_low_stock_alert" invisible="1"/>
<field name="min_low_stock_alert" attrs="{'invisible':[('is_low_stock_alert','=', False)]}"/>
</xpath>
</field>
</record>
</odoo>

13
low_stocks_product_alert/views/res_config_settings_views.xml

@ -15,8 +15,8 @@
<field name="is_low_stock_alert"/>
</div>
<div class="o_setting_right_pane">
<span class="o_form_label">Low Stock Alert</span>
<div class="text-muted">Quantity for Low Stock Alert
<span class="o_form_label">Low Stock Alert For All Products</span>
<div class="text-muted">To set Alert for all products
</div>
<div class="row mt-16"
attrs="{'invisible': [('is_low_stock_alert', '=', False)]}">
@ -26,6 +26,15 @@
class="oe_inline"/>
</div>
</div>
<br/>
<div class="o_setting_left_pane">
<field name="is_low_stock_alert_individual"/>
</div>
<div class="o_setting_right_pane">
<span class="o_form_label">Low Stock Alert For Individual Products</span>
<div class="text-muted">To set Alert for individual product
</div>
</div>
</div>
</xpath>
</field>

Loading…
Cancel
Save