Browse Source

Apr 14 : [UPDT] Updated Module 'product_discount_limit'

pull/254/head
Sayooj 2 years ago
parent
commit
4a7de32a59
  1. 2
      product_discount_limit/README.rst
  2. 4
      product_discount_limit/models/discount_limit.py
  3. 2
      product_discount_limit/static/description/index.html

2
product_discount_limit/README.rst

@ -1,6 +1,6 @@
Product Discount Limit
======================
=====================================
Product Discount Limit
Configuration

4
product_discount_limit/models/discount_limit.py

@ -21,13 +21,15 @@
################################################################################
from odoo import exceptions, api, models, _
"""Inherited sale.order.line for checking the limit of discount allowed for product and category"""
class SalesOrderDiscountLimit(models.Model):
_inherit = 'sale.order.line'
"""Checking the limit of discount allowed for products and category"""
@api.onchange('discount')
def _onchange_discount(self):
"""Checking the limit of discount allowed for products and category"""
if not self.env.user.allow_discount:
if self.product_id.product_tmpl_id.desc_limit > 0:
if self.discount > self.product_id.product_tmpl_id.desc_limit:

2
product_discount_limit/static/description/index.html

@ -28,7 +28,7 @@
Product Discount Limit</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Discount Limit for Products & Product Category
Limit Discount for Products & Product Category
</p>
<img src="./assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto" />
</div>

Loading…
Cancel
Save