diff --git a/project_subtask/__manifest__.py b/project_subtask/__manifest__.py
index 346813b9d..675f72c6e 100644
--- a/project_subtask/__manifest__.py
+++ b/project_subtask/__manifest__.py
@@ -22,7 +22,7 @@
##############################################################################
{
'name': 'Sub Tasks in Project',
- 'version': '10.0.2.0.0',
+ 'version': '10.0.3.0.0',
'summary': """Implementation & Reports of Sub-Task in Project Module""",
'description': 'This module helps you to create sub task under a task',
'category': 'Project',
diff --git a/project_subtask/__manifest__.py~ b/project_subtask/__manifest__.py~
index 3e7d9b324..346813b9d 100644
--- a/project_subtask/__manifest__.py~
+++ b/project_subtask/__manifest__.py~
@@ -31,6 +31,7 @@
'website': "http://www.cybrosys.com",
'depends': ['base', 'project'],
'data': [
+ 'security/ir.model.access.csv',
'views/project_view.xml',
'views/task_view.xml',
'views/sub_task.xml',
diff --git a/project_subtask/views/sub_task_type_view.xml b/project_subtask/views/sub_task_type_view.xml
index 582a23c90..8afd458b1 100644
--- a/project_subtask/views/sub_task_type_view.xml
+++ b/project_subtask/views/sub_task_type_view.xml
@@ -78,7 +78,7 @@
-
+
-
\ No newline at end of file
+
diff --git a/project_subtask/views/sub_task_type_view.xml~ b/project_subtask/views/sub_task_type_view.xml~
new file mode 100644
index 000000000..582a23c90
--- /dev/null
+++ b/project_subtask/views/sub_task_type_view.xml~
@@ -0,0 +1,84 @@
+
+
+
+
+ project.sub_task.type.form
+ project.sub_task.type
+
+
+
+
+
+
+ project.sub_task.type.tree
+ project.sub_task.type
+
+
+
+
+
+
+
+
+
+
+
+ Stages
+ project.sub_task.type
+ form
+
+
+
+ Click to add a stage in the task pipeline.
+
+ Define the steps that will be used in the project from the
+ creation of the task, up to the closing of the task or issue.
+ You will use these stages in order to track the progress in
+ solving a task or an issue.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vouchers_pos/__init__.py b/vouchers_pos/__init__.py
new file mode 100644
index 000000000..c7b5ac7e1
--- /dev/null
+++ b/vouchers_pos/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+import models
diff --git a/vouchers_pos/__manifest__.py b/vouchers_pos/__manifest__.py
new file mode 100644
index 000000000..095867cd2
--- /dev/null
+++ b/vouchers_pos/__manifest__.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2017-TODAY Cybrosys Technologies().
+# Author: Linto C T()
+# 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 .
+#
+##############################################################################
+{
+ 'name': 'Coupons & Vouchers in Point of Sale',
+ 'version': '10.0.1.0',
+ 'category': 'Point of Sale',
+ 'summary': 'Manage Point of Sale Coupon Codes & Its Redeem Operations',
+ '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,
+}
diff --git a/vouchers_pos/data/product_data.xml b/vouchers_pos/data/product_data.xml
new file mode 100644
index 000000000..0431a5e1d
--- /dev/null
+++ b/vouchers_pos/data/product_data.xml
@@ -0,0 +1,11 @@
+
+
+
+ Gift-Coupon
+ Gift-Coupon
+ True
+ service
+
+
+
+
\ No newline at end of file
diff --git a/vouchers_pos/models/__init__.py b/vouchers_pos/models/__init__.py
new file mode 100644
index 000000000..913f90ebd
--- /dev/null
+++ b/vouchers_pos/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2017-TODAY Cybrosys Technologies().
+# Author: LINTO C T()
+# 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 .
+#
+##############################################################################
+
+import gift_voucher
diff --git a/vouchers_pos/models/gift_voucher.py b/vouchers_pos/models/gift_voucher.py
new file mode 100644
index 000000000..cd5871d06
--- /dev/null
+++ b/vouchers_pos/models/gift_voucher.py
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+# Copyright (C) 2017-TODAY Cybrosys Technologies().
+# Author: LINTO C T()
+# 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 .
+#
+##############################################################################
+import string
+import random
+from odoo import models, fields, api, _
+from odoo.exceptions import UserError
+
+
+class GiftVoucherPos(models.Model):
+ _name = 'gift.voucher.pos'
+
+ name = fields.Char(string="Name", required=True)
+ voucher_type = fields.Selection(
+ selection=[
+ ('product', 'Product'),
+ ('category', 'POS Category'),
+ ('all', 'All Products'),
+ ], string="Applicable on ", default='product'
+ )
+ product_id = fields.Many2one('product.product', string="Product")
+ product_categ = fields.Many2one('pos.category', string="Product Category")
+ min_value = fields.Integer(string="Minimum Voucher Value", required=True)
+ max_value = fields.Integer(string="Maximum Voucher Value", required=True)
+ expiry_date = fields.Date(string="Expiry Date", required=True)
+
+
+class GiftCouponPos(models.Model):
+ _name = 'gift.coupon.pos'
+
+ def get_code(self):
+ size = 7
+ chars = string.ascii_uppercase + string.digits
+ return ''.join(random.choice(chars) for _ in range(size))
+
+ _sql_constraints = [
+ ('name_uniq', 'unique (code)', "Code already exists !"),
+ ]
+
+ name = fields.Char(string="Name", required=True)
+ code = fields.Char(string="Code", default=get_code)
+ voucher = fields.Many2one('gift.voucher.pos', string="Voucher", required=True)
+ start_date = fields.Date(string="Start Date")
+ end_date = fields.Date(string="End Date")
+ partner_id = fields.Many2one('res.partner', string="Limit to a Single Partner")
+ limit = fields.Integer(string="Total Available For Each User", default=1)
+ total_avail = fields.Integer(string="Total Available", default=1)
+
+ voucher_val = fields.Float(string="Voucher Value")
+ type = fields.Selection([
+ ('fixed', 'Fixed Amount'),
+ ('percentage', 'Percentage'),
+ ], store=True, default='fixed')
+
+ @api.onchange('voucher_val')
+ def check_val(self):
+ if self.voucher_val > self.voucher.max_value or self.voucher_val < self.voucher.min_value:
+ raise UserError(_("Please check the voucher value"))
+
+
+class CouponPartnerPos(models.Model):
+ _name = 'partner.coupon.pos'
+
+ partner_id = fields.Many2one('res.partner', string="Partner")
+ coupon_pos = fields.Char(string="Coupon Applied")
+ number_pos = fields.Integer(string="Number of Times Used")
+
+ def update_history(self, vals):
+ if vals:
+ h_obj = self.env['partner.coupon.pos']
+ history = h_obj.search([('coupon_pos', '=', vals['coupon_pos']),
+ ('partner_id', '=', vals['partner_id'])], limit=1)
+ coupon = self.env['gift.coupon.pos'].search([('code', '=', vals['coupon_pos'])], limit=1)
+ if history:
+ history.number_pos += 1
+ coupon.total_avail -= 1
+ else:
+ coupon.total_avail -= 1
+ rec = {
+ 'partner_id': vals['partner_id'],
+ 'number_pos': 1,
+ 'coupon_pos': vals['coupon_pos']
+ }
+ h_obj.create(rec)
+ return True
+
+
+class PartnerExtendedPos(models.Model):
+ _inherit = 'res.partner'
+
+ applied_coupon_pos = fields.One2many('partner.coupon.pos', 'partner_id', string="Coupons Applied From POS")
diff --git a/vouchers_pos/security/ir.model.access.csv b/vouchers_pos/security/ir.model.access.csv
new file mode 100644
index 000000000..be5525444
--- /dev/null
+++ b/vouchers_pos/security/ir.model.access.csv
@@ -0,0 +1,7 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+voucher_mgr,access_voucher_mgr,vouchers_pos.model_gift_voucher_pos,point_of_sale.group_pos_manager,1,1,1,1
+coupon_mgr,access_coupon_mgr,vouchers_pos.model_gift_coupon_pos,point_of_sale.group_pos_manager,1,1,1,1
+partner_coupon_mgr,access_partner_coupon_mgr,vouchers_pos.model_partner_coupon_pos,point_of_sale.group_pos_manager,1,1,1,1
+voucher_usr,access_voucher_usr,vouchers_pos.model_gift_voucher_pos,point_of_sale.group_pos_user,1,0,0,0
+coupon_usr,access_coupon_usr,vouchers_pos.model_gift_coupon_pos,point_of_sale.group_pos_user,1,0,0,0
+partner_coupon_usr,access_partner_coupon_usr,vouchers_pos.model_partner_coupon_pos,point_of_sale.group_pos_user,1,0,0,0
diff --git a/vouchers_pos/static/description/banner.jpg b/vouchers_pos/static/description/banner.jpg
new file mode 100644
index 000000000..384d5d6c6
Binary files /dev/null and b/vouchers_pos/static/description/banner.jpg differ
diff --git a/vouchers_pos/static/description/coupon-button-pos.png b/vouchers_pos/static/description/coupon-button-pos.png
new file mode 100644
index 000000000..9e3893419
Binary files /dev/null and b/vouchers_pos/static/description/coupon-button-pos.png differ
diff --git a/vouchers_pos/static/description/coupon-form.png b/vouchers_pos/static/description/coupon-form.png
new file mode 100644
index 000000000..8baa64204
Binary files /dev/null and b/vouchers_pos/static/description/coupon-form.png differ
diff --git a/vouchers_pos/static/description/coupon-menu-pos.png b/vouchers_pos/static/description/coupon-menu-pos.png
new file mode 100644
index 000000000..1958f5cf9
Binary files /dev/null and b/vouchers_pos/static/description/coupon-menu-pos.png differ
diff --git a/vouchers_pos/static/description/coupon-verified.png b/vouchers_pos/static/description/coupon-verified.png
new file mode 100644
index 000000000..1d7c8ed7d
Binary files /dev/null and b/vouchers_pos/static/description/coupon-verified.png differ
diff --git a/vouchers_pos/static/description/cybro_logo.png b/vouchers_pos/static/description/cybro_logo.png
new file mode 100644
index 000000000..bb309114c
Binary files /dev/null and b/vouchers_pos/static/description/cybro_logo.png differ
diff --git a/vouchers_pos/static/description/history.png b/vouchers_pos/static/description/history.png
new file mode 100644
index 000000000..dbe2303d1
Binary files /dev/null and b/vouchers_pos/static/description/history.png differ
diff --git a/vouchers_pos/static/description/icon.png b/vouchers_pos/static/description/icon.png
new file mode 100644
index 000000000..df9234a31
Binary files /dev/null and b/vouchers_pos/static/description/icon.png differ
diff --git a/vouchers_pos/static/description/index.html b/vouchers_pos/static/description/index.html
new file mode 100644
index 000000000..bc5f0c035
--- /dev/null
+++ b/vouchers_pos/static/description/index.html
@@ -0,0 +1,154 @@
+
+
+
Vouchers and Coupons
+
..Manage Gift Vouchers and Coupon Codes in Point of Sale..
+ ☑ Create gift vouchers for products.
+ ☑ Create gift vouchers for point of sale category.
+ ☑ Create global gift vouchers.
+ ☑ Create and configure coupon codes.
+ ☑ Apply coupon codes from point of sale.
+ ☑ Coupon usage tracking.
+
+
+
+
+
+
+
+
Overview
+
+ Gift vouchers and coupon codes can be used to provide a certain amount of discount to our customers
+ using a secret code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
After installing this module, three menus will be created under
+ point of sale. We can use these menus to create, configure and track vouchers, coupons and their usage.
+
+
+
+
+
+
Vouchers
+
+
+
+
+
+
+
This is the form for creating vouchers. We can create vouchers for a single product, pos category and
+ for all the products.
+
+
+
+
+
+
+
Coupons
+
+
+
+
+
+
+
+
+
+ After creating the voucher, we need to create the coupons related to each voucher. From
+ the coupons menu, we can create new coupons and link it to the corresponding vouchers. The fixed type coupon will
+ include a fixed amount discount to the order and percentage type coupon will set the coupon amount based on
+ the total order amount and the percentage provided in the back end.
+
+
+
+
+
+
+
+
+
Apply Coupons
+
+
The 'Coupons' button in point of sale can be used to enter the coupon code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Coupon Tracking
+
+
+
+
+
+
Go to the 'Coupon History' menu under 'Vouchers and Coupons' for coupon tracking.