diff --git a/pos_product_sequence/__init__.py b/pos_product_sequence/__init__.py index cde864b..1d96e63 100644 --- a/pos_product_sequence/__init__.py +++ b/pos_product_sequence/__init__.py @@ -1,3 +1,5 @@ # -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. () from . import models diff --git a/pos_product_sequence/__manifest__.py b/pos_product_sequence/__manifest__.py index a13d1f6..0a83897 100644 --- a/pos_product_sequence/__manifest__.py +++ b/pos_product_sequence/__manifest__.py @@ -1,22 +1,33 @@ # -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. () + { 'name': 'POS Product Sequence', - 'version': '1.0', - 'summary': 'Point of Sale Product Sequence', + 'version': '15.0.1.0', + 'summary': 'POS Product Sequence module is used in Odoo POS to display the products position in POS Session according to the sequence or numbers assigned. If you have 5 products in backend and you want to set its sequence from 1 to 5, then same sequence wise product show in POS Session in odoo.', 'description': """ Point of Sale Product Sequence """, 'license': 'OPL-1', - 'author': 'Kanak Infosystems LLP', + 'author': 'Kanak Infosystems LLP.', 'website': 'https://www.kanakinfosystems.com', - 'images': ['static/description/main_image.jpeg'], - 'category': 'Point of Sale', + 'images': ['static/description/banner.jpeg'], + 'category': 'Sales/Point of Sale', 'depends': ['point_of_sale'], 'data': [ - 'views/template.xml', - 'views/pos_product_sequence_views.xml', + 'views/knk_pos_product_sequence_views.xml', ], - 'application': True, + 'assets': { + 'point_of_sale.assets': [ + 'pos_product_sequence/static/src/js/models.js', + ], + }, + 'sequence': 1, + 'installable': True, + 'application': False, + 'auto_install': False, 'price': 10, 'currency': 'EUR', + 'live_test_url': 'https://youtu.be/pYVNy3A3ieE', } diff --git a/pos_product_sequence/models/__init__.py b/pos_product_sequence/models/__init__.py index d7d7308..702dcfb 100644 --- a/pos_product_sequence/models/__init__.py +++ b/pos_product_sequence/models/__init__.py @@ -1,3 +1,5 @@ # -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. () -from . import product +from . import knk_product diff --git a/pos_product_sequence/models/__init__.pyc b/pos_product_sequence/models/__init__.pyc deleted file mode 100644 index 6a01310..0000000 Binary files a/pos_product_sequence/models/__init__.pyc and /dev/null differ diff --git a/pos_product_sequence/models/knk_product.py b/pos_product_sequence/models/knk_product.py new file mode 100644 index 0000000..23a3449 --- /dev/null +++ b/pos_product_sequence/models/knk_product.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Powered by Kanak Infosystems LLP. +# © 2020 Kanak Infosystems LLP. () + +from odoo import fields, models + + +class ProductProduct(models.Model): + _inherit = "product.product" + _order = 'pos_sequence, default_code, name, id' + + +class ProductTemplate(models.Model): + _inherit = "product.template" + _order = 'pos_sequence, name' + + def _get_default_sequence(self): + self.env.cr.execute("SELECT MAX(pos_sequence) FROM product_template") + seq = self.env.cr.fetchone() + if seq[0] is not None: + return seq[0] + 1 + + pos_sequence = fields.Integer( + string='POS Sequence', default=_get_default_sequence, help='POS product display base on product sequence number') diff --git a/pos_product_sequence/models/product.py b/pos_product_sequence/models/product.py deleted file mode 100644 index f67570f..0000000 --- a/pos_product_sequence/models/product.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import fields, models, api - - -class ProductProduct(models.Model): - _inherit = "product.product" - _order = 'pos_sequence, default_code, name, id' - -class ProductTemplate(models.Model): - _inherit = "product.template" - _order = 'pos_sequence, name' - - pos_sequence = fields.Integer(string='POS Sequence', help='POS product display base on product sequence number') - - @api.model - def create(self, vals): - res = super(ProductTemplate, self).create(vals) - if res: - rec = self.search([]) - if rec: - seq = max(self.search([]).mapped('pos_sequence')) - if seq: - res.pos_sequence = seq + 1; - return res \ No newline at end of file diff --git a/pos_product_sequence/models/product.pyc b/pos_product_sequence/models/product.pyc deleted file mode 100644 index acc4472..0000000 Binary files a/pos_product_sequence/models/product.pyc and /dev/null differ diff --git a/pos_product_sequence/static/description/1 before sequence.png b/pos_product_sequence/static/description/1 before sequence.png new file mode 100644 index 0000000..90c8d62 Binary files /dev/null and b/pos_product_sequence/static/description/1 before sequence.png differ diff --git a/pos_product_sequence/static/description/2 set sequence.png b/pos_product_sequence/static/description/2 set sequence.png new file mode 100644 index 0000000..8facc46 Binary files /dev/null and b/pos_product_sequence/static/description/2 set sequence.png differ diff --git a/pos_product_sequence/static/description/3 after sequence.png b/pos_product_sequence/static/description/3 after sequence.png new file mode 100644 index 0000000..8d98c56 Binary files /dev/null and b/pos_product_sequence/static/description/3 after sequence.png differ diff --git a/pos_product_sequence/static/description/Hire-Odoo-Developer.jpg b/pos_product_sequence/static/description/Hire-Odoo-Developer.jpg new file mode 100644 index 0000000..420d1b4 Binary files /dev/null and b/pos_product_sequence/static/description/Hire-Odoo-Developer.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Customization.jpg b/pos_product_sequence/static/description/Odoo-Customization.jpg new file mode 100644 index 0000000..9f86f6c Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Customization.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Development.jpg b/pos_product_sequence/static/description/Odoo-Development.jpg new file mode 100644 index 0000000..958324c Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Development.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Installation.jpg b/pos_product_sequence/static/description/Odoo-Installation.jpg new file mode 100644 index 0000000..0550b01 Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Installation.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Integration.jpg b/pos_product_sequence/static/description/Odoo-Integration.jpg new file mode 100644 index 0000000..25979c6 Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Integration.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Resources.jpg b/pos_product_sequence/static/description/Odoo-Resources.jpg new file mode 100644 index 0000000..04d3243 Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Resources.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Themes.jpg b/pos_product_sequence/static/description/Odoo-Themes.jpg new file mode 100644 index 0000000..6799654 Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Themes.jpg differ diff --git a/pos_product_sequence/static/description/Odoo-Training.jpg b/pos_product_sequence/static/description/Odoo-Training.jpg new file mode 100644 index 0000000..76dc76a Binary files /dev/null and b/pos_product_sequence/static/description/Odoo-Training.jpg differ diff --git a/pos_product_sequence/static/description/POS Category Sales Report.png b/pos_product_sequence/static/description/POS Category Sales Report.png new file mode 100644 index 0000000..bf77f49 Binary files /dev/null and b/pos_product_sequence/static/description/POS Category Sales Report.png differ diff --git a/pos_product_sequence/static/description/POS Hourly Sales Report.png b/pos_product_sequence/static/description/POS Hourly Sales Report.png new file mode 100644 index 0000000..36bb178 Binary files /dev/null and b/pos_product_sequence/static/description/POS Hourly Sales Report.png differ diff --git a/pos_product_sequence/static/description/POS Item Sales Report.png b/pos_product_sequence/static/description/POS Item Sales Report.png new file mode 100644 index 0000000..8635dff Binary files /dev/null and b/pos_product_sequence/static/description/POS Item Sales Report.png differ diff --git a/pos_product_sequence/static/description/POS Load Product Location.png b/pos_product_sequence/static/description/POS Load Product Location.png new file mode 100644 index 0000000..ccc9721 Binary files /dev/null and b/pos_product_sequence/static/description/POS Load Product Location.png differ diff --git a/pos_product_sequence/static/description/POS Pizza Modifiers.png b/pos_product_sequence/static/description/POS Pizza Modifiers.png new file mode 100644 index 0000000..c1542d4 Binary files /dev/null and b/pos_product_sequence/static/description/POS Pizza Modifiers.png differ diff --git a/pos_product_sequence/static/description/POS Receipt Report.png b/pos_product_sequence/static/description/POS Receipt Report.png new file mode 100644 index 0000000..2743639 Binary files /dev/null and b/pos_product_sequence/static/description/POS Receipt Report.png differ diff --git a/pos_product_sequence/static/description/aftercdsequence.png b/pos_product_sequence/static/description/aftercdsequence.png deleted file mode 100644 index 142d094..0000000 Binary files a/pos_product_sequence/static/description/aftercdsequence.png and /dev/null differ diff --git a/pos_product_sequence/static/description/main_image.jpeg b/pos_product_sequence/static/description/banner.jpeg similarity index 100% rename from pos_product_sequence/static/description/main_image.jpeg rename to pos_product_sequence/static/description/banner.jpeg diff --git a/pos_product_sequence/static/description/beforeposview.png b/pos_product_sequence/static/description/beforeposview.png deleted file mode 100644 index c68c2a7..0000000 Binary files a/pos_product_sequence/static/description/beforeposview.png and /dev/null differ diff --git a/pos_product_sequence/static/description/beforeproduct.png b/pos_product_sequence/static/description/beforeproduct.png deleted file mode 100644 index 5c49c51..0000000 Binary files a/pos_product_sequence/static/description/beforeproduct.png and /dev/null differ diff --git a/pos_product_sequence/static/description/call-icon.png b/pos_product_sequence/static/description/call-icon.png deleted file mode 100644 index 14f116d..0000000 Binary files a/pos_product_sequence/static/description/call-icon.png and /dev/null differ diff --git a/pos_product_sequence/static/description/cdafterposview.png b/pos_product_sequence/static/description/cdafterposview.png deleted file mode 100644 index eb1d798..0000000 Binary files a/pos_product_sequence/static/description/cdafterposview.png and /dev/null differ diff --git a/pos_product_sequence/static/description/features-icon.png b/pos_product_sequence/static/description/features-icon.png deleted file mode 100644 index 8d6b2f7..0000000 Binary files a/pos_product_sequence/static/description/features-icon.png and /dev/null differ diff --git a/pos_product_sequence/static/description/icon-2.png b/pos_product_sequence/static/description/icon-2.png deleted file mode 100644 index 447419b..0000000 Binary files a/pos_product_sequence/static/description/icon-2.png and /dev/null differ diff --git a/pos_product_sequence/static/description/icon-3.png b/pos_product_sequence/static/description/icon-3.png deleted file mode 100644 index 87af289..0000000 Binary files a/pos_product_sequence/static/description/icon-3.png and /dev/null differ diff --git a/pos_product_sequence/static/description/icon-4.png b/pos_product_sequence/static/description/icon-4.png deleted file mode 100644 index a3340a7..0000000 Binary files a/pos_product_sequence/static/description/icon-4.png and /dev/null differ diff --git a/pos_product_sequence/static/description/icon-5.png b/pos_product_sequence/static/description/icon-5.png deleted file mode 100644 index 65d77bd..0000000 Binary files a/pos_product_sequence/static/description/icon-5.png and /dev/null differ diff --git a/pos_product_sequence/static/description/icon-6.png b/pos_product_sequence/static/description/icon-6.png deleted file mode 100644 index 7a1044f..0000000 Binary files a/pos_product_sequence/static/description/icon-6.png and /dev/null differ diff --git a/pos_product_sequence/static/description/icon1.png b/pos_product_sequence/static/description/icon1.png deleted file mode 100644 index 00b2c78..0000000 Binary files a/pos_product_sequence/static/description/icon1.png and /dev/null differ diff --git a/pos_product_sequence/static/description/index.html b/pos_product_sequence/static/description/index.html index 1fe707e..3657b6f 100644 --- a/pos_product_sequence/static/description/index.html +++ b/pos_product_sequence/static/description/index.html @@ -1,136 +1,495 @@ -
-
-
-

Product sorting on POS interface base on POS sequence

-
-
-
-
-
-
-

Before POS Product Sequence

-
-
-
- +
+
+
+
+

+ POS Product Sequence +

-
-
-
-
-
-

Before POS Product Views

+
+
+ +
-
-
- +
+
+
+
Supported Editions
+
+
Community
+
Enterprise
- -
-
-
-
-

After Product POS Sequence

-
-
-
- +
+
+

POS Product Sequence module is used in Odoo POS to display the product's position in POS Session according to the sequence of numbers assigned. If you have 5 products in the backend and you want to set its sequence from 1 to 5, then the same sequence wise product show in POS Session in odoo. +

-
-
-
-
-
-

After POS Product View. First Display of This Product

+
+
+
+

Key Features

-
-
- +
+
+

+ User can set the Product sequence number. +

+
+
+

+ It shows sequence wise products in Odoo POS. +

+
+
+

+ User can manage the POS Sequence of Product in the Backend. +

-
-
-
-
-
-
-
- +
+
+
+ +
+
+
+
+
+
+
+ Before POS Product Sequence +

+
+
+
+
+
+
+ +
+
+
+
+ Set Product Sequence +

+
    +
  • + Navigate to the Point of Sale and click on the Products menu. +
  • +
  • + Open Products Variants sub-menu and click on Point of Sale tab. +
  • +
  • + Now, we will set POS Sequence number. +
  • +
+
+
+
+
+ +
+
+
+
+ After POS Product Sequence +

+
    +
  • + Now, we will open Odoo POS and check the position of configured product. +
  • +
  • + Here, we can see configured product is in 2nd position. +
  • +
+
+
+
+
+ +
+
+
+

+
+
+
+
+ +
+
+ 4th + January, 2021 +
+
+
+

Latest Release 1.0

+

+ First version to release. +

+
+
+
+
+
+
+
+
+

+

Here See Demo Video:-

+ +
+

+
+
+
+

Frequently Asked Question:-

+
+
+
+
+
+
Is this app compatible with Odoo Enterprise? +
+ +
+
+
+
+ Yes, our app works with Odoo Enterprise as well as Community. +
+
+
+
+
+
+
+
+
+
+
Is this app compatible with Windows or Ubuntu? +
+ +
+
+
+
+ Yes, our app works with Windows or Ubuntu operating system. +
+
+
+
+
+
+
+
+
+
+
Is this app required any additional configuration? +
+ +
+
+
+
+ No, install module and use this features. +
+
+
+
+
+
+
+
-
+
+
+

FREE 3 MONTHS SUPPORT

+
+
+
+

Kanak Infosystem will provide free 3 months support for bug fixes, any doubts or queries, installation, configuration support or any types of issues related to this module.

+

+ NOTE: This module do not required extra configuration. +
+
+
+
+
+ + sales@kanakinfosystems.com
+
+ + kanakinfosystems
-
-
"We are groupies wrapped in Creativity, Skills and Innovation"
-

We are authorized IT company to offer advanced, hight quality and affordable IT solutions. We have years of rich experience in the field of ODOO Development, ERP Solutions, Web Development, Mobile Apps, Web Designing and Digital marketing. Around a decade are offering quality assured and 100% customer satisfaction services to global clientele.

- -

Our highly experienced and devoted team of professionals works with there heart, passion and talent to provide the most dedicated IT Business Solutions to our valuable clients globally. Our team works on the real words "Dedication,"Timely Deliverables",And "Happy Clients"!

+
+ + +91 9818108884
-
-
-

What We Do

+
+
+
+
+ + + + + + +
+
+ SUGGESTED APPS + + App Link
-
-
- -
Odoo Customization
-
-
- -
Odoo Code Migration
-
-
- -
Odoo Mobile App
-
-
- -
Odoo DB Migration
-
-
- -
Odoo Web Development
-
-
- -
Odoo Themes
+
+
+
+
+
+
+
+ SUGGESTED APPS + + App Link +
-
\ No newline at end of file + + +
+ +
+ \ No newline at end of file diff --git a/pos_product_sequence/static/description/support-icon.png b/pos_product_sequence/static/description/support-icon.png deleted file mode 100644 index c169f79..0000000 Binary files a/pos_product_sequence/static/description/support-icon.png and /dev/null differ diff --git a/pos_product_sequence/static/src/js/models.js b/pos_product_sequence/static/src/js/models.js index 7d6ed27..f01493e 100644 --- a/pos_product_sequence/static/src/js/models.js +++ b/pos_product_sequence/static/src/js/models.js @@ -1,54 +1,70 @@ -odoo.define('pos_product_sequence.models', function (require) { -"use strict"; +odoo.define('pos_product_sequence.models', function(require) { + "use strict"; -var models = require('point_of_sale.models'); -var core = require('web.core'); + var models = require('point_of_sale.models'); + var core = require('web.core'); -var QWeb = core.qweb; -var _t = core._t; -var PosDB = require('point_of_sale.DB') -var exports = require('point_of_sale.models'); + var QWeb = core.qweb; + var _t = core._t; + var PosDB = require('point_of_sale.DB'); + const Registries = require('point_of_sale.Registries'); + const ProductsWidget = require('point_of_sale.ProductsWidget'); -PosDB.include({ - get_product_by_category: function(category_id){ - var product_ids = this.product_by_category_id[category_id]; - var list = []; - if (product_ids) { - for (var i = 0, len = Math.min(product_ids.length, this.limit); i < len; i++) { - list.push(this.product_by_id[product_ids[i]]); - } - } - if(list.length){ - var new_list = _.sortBy(list, function(num) { - return num.pos_sequence; - }); - return new_list; - } - return list; - }, -}); - -models.load_models({ - model: 'product.product', - // todo remove list_price in master, it is unused - fields: ['display_name', 'list_price', 'lst_price', 'standard_price', 'categ_id', 'pos_categ_id', 'taxes_id', - 'barcode', 'default_code', 'to_weight', 'uom_id', 'description_sale', 'description', - 'product_tmpl_id','tracking','pos_sequence'], - order: _.map(['pos_sequence','sequence','default_code','name'], function (name) { return {name: name}; }), - domain: [['sale_ok','=',true],['available_in_pos','=',true]], - context: function(self){ return { display_default_code: false }; }, - loaded: function(self, products){ - var using_company_currency = self.config.currency_id[0] === self.company.currency_id[0]; - var conversion_rate = self.currency.rate / self.company_currency.rate; - self.db.add_products(_.map(products, function (product) { - if (!using_company_currency) { - product.lst_price = round_pr(product.lst_price * conversion_rate, self.currency.rounding); + PosDB.include({ + get_product_by_category: function(category_id) { + var product_ids = this.product_by_category_id[category_id]; + var list = []; + if (product_ids) { + for (var i = 0, len = Math.min(product_ids.length, this.limit); i < len; i++) { + list.push(this.product_by_id[product_ids[i]]); } - product.categ = _.findWhere(self.product_categories, {'id': product.categ_id[0]}); - return new exports.Product({}, product); - })); + } + if (list.length) { + var new_list = _.sortBy(list, function(num) { + return num.pos_sequence; + }); + return new_list; + } + return list; }, }); -return exports; + models.PosModel.prototype.models.some(function(model) { + if (model.model !== 'product.product') { + return false; + } + // add name and attribute_value_ids to list of fields + // to fetch for product.product + ['pos_sequence'].forEach(function(field) { + if (model.fields.indexOf(field) == -1) { + model.fields.push(field); + } + }); + model['order'] = _.map(['pos_sequence', 'sequence', 'default_code', 'name'], function(name) { return { name: name }; }); + return true; //exit early the iteration of this.models + }); + + const BiProductsTemplateWidget = (ProductsWidget) => + class extends ProductsWidget { + constructor() { + super(...arguments); + } + + get productsToDisplay() { + let list = []; + if (this.searchWord !== '') { + list = this.env.pos.db.search_product_in_category( + this.selectedCategoryId, + this.searchWord + ); + } else { + list = this.env.pos.db.get_product_by_category(this.selectedCategoryId); + } + return list + } + }; + + Registries.Component.extend(ProductsWidget, BiProductsTemplateWidget); + + return ProductsWidget; }); \ No newline at end of file diff --git a/pos_product_sequence/views/knk_pos_product_sequence_views.xml b/pos_product_sequence/views/knk_pos_product_sequence_views.xml new file mode 100644 index 0000000..064879b --- /dev/null +++ b/pos_product_sequence/views/knk_pos_product_sequence_views.xml @@ -0,0 +1,33 @@ + + + + knk.product.product.tree.inherit + product.product + + + + + + + + + knk_product.template.tree.inherit + product.template + + + + + + + + + knk_product.template.form.inherit + product.template + + + + + + + + \ No newline at end of file diff --git a/pos_product_sequence/views/pos_product_sequence_views.xml b/pos_product_sequence/views/pos_product_sequence_views.xml deleted file mode 100644 index 7b714bc..0000000 --- a/pos_product_sequence/views/pos_product_sequence_views.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - product.product.tree.inherit - product.product - - - - - - - - - - product.template.tree.inherit - product.template - - - - 1 - - - - - - - - - product.template.form.inherit - product.template - - - - - - - - - - diff --git a/pos_product_sequence/views/template.xml b/pos_product_sequence/views/template.xml deleted file mode 100644 index 0ee8eac..0000000 --- a/pos_product_sequence/views/template.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file