diff --git a/pos_product_category_filter/__init__.py b/pos_product_category_filter/__init__.py index 2c4eac3f8..0f7cb6b22 100644 --- a/pos_product_category_filter/__init__.py +++ b/pos_product_category_filter/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- import models \ No newline at end of file diff --git a/pos_product_category_filter/__openerp__.py b/pos_product_category_filter/__openerp__.py index 83bd4a60b..efa848c18 100644 --- a/pos_product_category_filter/__openerp__.py +++ b/pos_product_category_filter/__openerp__.py @@ -1,17 +1,17 @@ +# -*- coding: utf-8 -*- { 'name': 'POS Product Category Filter', - 'version': '1.0', + 'version': '9.0.2.0.0', 'category': 'Point of Sale', 'author': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions', 'website': 'http://www.cybrosys.com', 'sequence': 6, - 'summary': 'Show only specified categories of product in point of sale ', + 'summary': 'Show Only Specified Categories of Product in Point of Sale ', 'description': """ ======================= -Customization of produc availablity in PoS. """, 'depends': ['point_of_sale'], diff --git a/pos_product_category_filter/models/__init__.py b/pos_product_category_filter/models/__init__.py index 53521f66f..c50faeead 100644 --- a/pos_product_category_filter/models/__init__.py +++ b/pos_product_category_filter/models/__init__.py @@ -1 +1,23 @@ -import category \ No newline at end of file +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2013-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies() +# 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 category diff --git a/pos_product_category_filter/models/category.py b/pos_product_category_filter/models/category.py index e9aef3894..1da0f048f 100644 --- a/pos_product_category_filter/models/category.py +++ b/pos_product_category_filter/models/category.py @@ -1,9 +1,29 @@ # -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2013-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies() +# 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 . +# +############################################################################## +from openerp import models, fields -from openerp import models, fields, api class PosProductCateg(models.Model): - _inherit = 'pos.config' available_categ = fields.Many2many('pos.category', string='Available Product Categories') diff --git a/pos_product_category_filter/static/src/js/category.js b/pos_product_category_filter/static/src/js/category.js index d72f0bcec..d3e00b58e 100644 --- a/pos_product_category_filter/static/src/js/category.js +++ b/pos_product_category_filter/static/src/js/category.js @@ -9,7 +9,6 @@ odoo.define('pos_product_category_filter.pos_product_category_filter', function var Widget = require('web.Widget'); var QWeb = core.qweb; - var model1 = { model: 'pos.category', fields: ['id','name','parent_id','child_id','image'], @@ -45,7 +44,7 @@ odoo.define('pos_product_category_filter.pos_product_category_filter', function } for(var i=0, len = categories.length; i < len; i++){ if(categories[i].available === true){ - categories[i].parent_id[0] = 0; + categories[i].parent_id = 0; } } for(var i=0, len = categories.length; i < len; i++){