Browse Source

[FIX] Discount Issue Fixed

pull/45/head
SHEREEF PT 8 years ago
parent
commit
a211c0a314
  1. 20
      vouchers_pos/__init__.py
  2. 27
      vouchers_pos/__manifest__.py
  3. 46
      vouchers_pos/__manifest__.py~
  4. 7
      vouchers_pos/doc/changelog.rst
  5. 23
      vouchers_pos/models/__init__.py
  6. 23
      vouchers_pos/models/gift_voucher.py
  7. 2
      vouchers_pos/static/src/js/coupons.js

20
vouchers_pos/__init__.py

@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author:LINTO CT(<https://www.cybrosys.com>)
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###################################################################################
import models

27
vouchers_pos/__manifest__.py

@ -1,30 +1,29 @@
# -*- coding: utf-8 -*-
##############################################################################
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Linto C T(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
# Author:LINTO CT(<https://www.cybrosys.com>)
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 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.
# If not, see <https://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
###################################################################################
{
'name': 'Coupons & Vouchers in Point of Sale',
'version': '10.0.1.0',
'version': '10.0.1.1',
'category': 'Point of Sale',
'summary': 'Manage POS Vouchers & Coupon Codes',
'summary': 'Manage Point of Sale Vouchers & Coupon Codes',
'author': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',

46
vouchers_pos/__manifest__.py~

@ -1,46 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Linto C T(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Coupons & Vouchers in Point of Sale',
'version': '10.0.1.0',
'category': 'Point of Sale',
'summary': 'Manage Point of Sale Vouchers & Coupon Codes',
'author': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',
'depends': ['point_of_sale'],
'data': [
'data/product_data.xml',
'views/gift_voucher.xml',
'views/applied_coupons.xml',
'views/pos_template.xml',
'security/ir.model.access.csv',
],
'qweb': [
'static/src/xml/*.xml'],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'application': False,
'auto_install': False,
}

7
vouchers_pos/doc/changelog.rst

@ -0,0 +1,7 @@
Changelog
=========
* Linto CT
`10.0.1.1`
----------
- Discount issue fixed for total amount.

23
vouchers_pos/models/__init__.py

@ -1,24 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: LINTO C T(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
# Author:LINTO CT(<https://www.cybrosys.com>)
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 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.
# If not, see <https://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
###################################################################################
import gift_voucher

23
vouchers_pos/models/gift_voucher.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: LINTO C T(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
# Author:LINTO CT(<https://www.cybrosys.com>)
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 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.
# If not, see <https://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
###################################################################################
import string
import random
from odoo import models, fields, api, _

2
vouchers_pos/static/src/js/coupons.js

@ -382,7 +382,7 @@ odoo.define("vouchers_pos.coupons", function (require) {
get_total_without_tax: function() {
var res = OrderSuper.prototype.get_total_without_tax.call(this);
var final_res = round_pr(this.orderlines.reduce((function(sum, orderLine) {
return sum + (orderLine.get_unit_price() * orderLine.get_quantity());
return sum + (orderLine.get_unit_price() * orderLine.get_quantity() * (1.0 - (orderLine.get_discount() / 100.0)));
}), 0), this.pos.currency.rounding);
return final_res;
},

Loading…
Cancel
Save