Browse Source

[FIX] BUg Fixed 'sale_promotion'

pull/124/head
Ajmalcybrosys 6 years ago
parent
commit
7f5ad90198
  1. 8
      sale_promotion/__manifest__.py
  2. 5
      sale_promotion/doc/RELEASE_NOTES.md
  3. 5
      sale_promotion/models/sale_order.py
  4. 8
      sale_promotion/static/description/index.html
  5. BIN
      sale_promotion/static/description/sale_promotion_5.png

8
sale_promotion/__manifest__.py

@ -4,13 +4,13 @@
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Anusha P P(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
# you can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL 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.
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
@ -20,7 +20,7 @@
{
'name': "Sale Promotion",
'version': '12.0.1.0.0',
'version': '12.0.1.0.1',
'summary': """Create Promotion Offers For Sales""",
'description': """This Module Allows to Set Promotion Offers On Products And Product Categories.""",
'author': "Cybrosys Techno Solutions",

5
sale_promotion/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 12.0.1.0.0
##### ADD
- Initial commit
#### 19.08.2019
#### Version 12.0.1.0.1
##### FIX
- Bug Fixed

5
sale_promotion/models/sale_order.py

@ -18,6 +18,7 @@
#############################################################################
from dateutil import parser
from datetime import datetime
from odoo import models, fields, api, _
from odoo.exceptions import UserError
@ -76,8 +77,8 @@ class SalePromotion(models.Model):
product_rule_ids = []
for obj in self.sale_promotion_id:
for promo_lines in obj.item_ids:
if not promo_lines.date_start or promo_lines.date_start <= date_order:
if not promo_lines.date_end or promo_lines.date_end >= date_order:
if not promo_lines.date_start or str(promo_lines.date_start) <= datetime.strftime(date_order,'%Y-%m-%d'):
if not promo_lines.date_end or str(promo_lines.date_end) >= datetime.strftime(date_order,'%Y-%m-%d'):
if promo_lines.applied_on == 'product_category':
categ_val = {'rule': promo_lines,
'category': promo_lines.categ_id.id,

8
sale_promotion/static/description/index.html

@ -67,6 +67,14 @@
<div class="oe_row oe_spaced">
<img src="sale_promotion_4.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
You must tick the check box to get the product in the sales promotion window.
Also it helps to identify the promotional products.
</h3>
<div class="oe_row oe_spaced">
<img src="sale_promotion_5.png" alt="" style="width: 95%;"/>
</div>
<h3>Select Offer In Sale Order</h3>
<h3 class="oe_slogan" style="text-align: left;padding: 1% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">

BIN
sale_promotion/static/description/sale_promotion_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Loading…
Cancel
Save