diff --git a/pos_multi_variant/README.rst b/pos_multi_variant/README.rst new file mode 100644 index 000000000..e2ac52957 --- /dev/null +++ b/pos_multi_variant/README.rst @@ -0,0 +1,40 @@ +POS Product Multi variant +========================= +* Configure products having variants + +Installation +============ +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Company +------- +* 'Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + Athira PS + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/pos_multi_variant/__init__.py b/pos_multi_variant/__init__.py new file mode 100644 index 000000000..05922f764 --- /dev/null +++ b/pos_multi_variant/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sreejith sasidharan() +# +# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/pos_multi_variant/__manifest__.py b/pos_multi_variant/__manifest__.py new file mode 100644 index 000000000..a6837e158 --- /dev/null +++ b/pos_multi_variant/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sreejith sasidharan() +# +# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "POS Product Multi variant", + 'version': '13.0.1.0.1', + 'summary': """Product with multi-variants""", + 'description': """Configure products having variants in POS""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'category': 'Point of Sale', + 'depends': ['base', + 'point_of_sale', + ], + 'data': ['views/pos_variants.xml', + 'security/ir.model.access.csv', + 'views/pos_wizard.xml'], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'qweb': ['static/src/xml/label.xml', + 'static/src/xml/popup.xml'], + 'auto_install': False, +} diff --git a/pos_multi_variant/doc/RELEASE_NOTES.md b/pos_multi_variant/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..f36962f57 --- /dev/null +++ b/pos_multi_variant/doc/RELEASE_NOTES.md @@ -0,0 +1,16 @@ +## Module + +#### 21.08.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit for pos_multi_variant + +#### 20.09.2019 +#### Version 12.0.1.0.1 +##### FIX +- Bug Fixed. + +#### 20.09.2022 +#### Version 13.0.1.0.1 +##### ADD +- Migrated To v13 diff --git a/pos_multi_variant/models/__init__.py b/pos_multi_variant/models/__init__.py new file mode 100644 index 000000000..e1fe8a83c --- /dev/null +++ b/pos_multi_variant/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sreejith sasidharan() +# +# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_variants diff --git a/pos_multi_variant/models/pos_variants.py b/pos_multi_variant/models/pos_variants.py new file mode 100644 index 000000000..50aa1c897 --- /dev/null +++ b/pos_multi_variant/models/pos_variants.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sreejith sasidharan() +# +# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, models, fields + + +class PosVarients(models.Model): + + _inherit = ['product.template'] + + pos_variants = fields.Boolean('pos variants', default=False) + variant_line_ids = fields.One2many('variants.tree', 'variants_id', string="Configure Variants") + + +class VariantsSelection(models.Model): + + _name = 'variants.tree' + + variants_id = fields.Many2one('product.template') + attribute = fields.Many2one('product.attribute', string='Attribute', ondelete='restrict', required=True, index=True) + value = fields.Many2many('product.attribute.value', string='Values') + extra_price = fields.Char(string="Price Extra") + pos_active = fields.Boolean(string="Active") + + diff --git a/pos_multi_variant/security/ir.model.access.csv b/pos_multi_variant/security/ir.model.access.csv new file mode 100644 index 000000000..29b68ed81 --- /dev/null +++ b/pos_multi_variant/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_variants_tree, access.variants.tree,model_variants_tree,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/pos_multi_variant/static/description/assets/icons/check.png b/pos_multi_variant/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/check.png differ diff --git a/pos_multi_variant/static/description/assets/icons/chevron.png b/pos_multi_variant/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/chevron.png differ diff --git a/pos_multi_variant/static/description/assets/icons/cogs.png b/pos_multi_variant/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/cogs.png differ diff --git a/pos_multi_variant/static/description/assets/icons/consultation.png b/pos_multi_variant/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/consultation.png differ diff --git a/pos_multi_variant/static/description/assets/icons/ecom-black.png b/pos_multi_variant/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/ecom-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/education-black.png b/pos_multi_variant/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/education-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/hotel-black.png b/pos_multi_variant/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/hotel-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/license.png b/pos_multi_variant/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/license.png differ diff --git a/pos_multi_variant/static/description/assets/icons/lifebuoy.png b/pos_multi_variant/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_multi_variant/static/description/assets/icons/logo.png b/pos_multi_variant/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/logo.png differ diff --git a/pos_multi_variant/static/description/assets/icons/manufacturing-black.png b/pos_multi_variant/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/pos-black.png b/pos_multi_variant/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/pos-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/puzzle.png b/pos_multi_variant/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/puzzle.png differ diff --git a/pos_multi_variant/static/description/assets/icons/restaurant-black.png b/pos_multi_variant/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/service-black.png b/pos_multi_variant/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/service-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/trading-black.png b/pos_multi_variant/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/trading-black.png differ diff --git a/pos_multi_variant/static/description/assets/icons/training.png b/pos_multi_variant/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/training.png differ diff --git a/pos_multi_variant/static/description/assets/icons/update.png b/pos_multi_variant/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/update.png differ diff --git a/pos_multi_variant/static/description/assets/icons/user.png b/pos_multi_variant/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/user.png differ diff --git a/pos_multi_variant/static/description/assets/icons/wrench.png b/pos_multi_variant/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_multi_variant/static/description/assets/icons/wrench.png differ diff --git a/pos_multi_variant/static/description/assets/modules/1.png b/pos_multi_variant/static/description/assets/modules/1.png new file mode 100644 index 000000000..1217263a6 Binary files /dev/null and b/pos_multi_variant/static/description/assets/modules/1.png differ diff --git a/pos_multi_variant/static/description/assets/modules/2.png b/pos_multi_variant/static/description/assets/modules/2.png new file mode 100644 index 000000000..6f604a403 Binary files /dev/null and b/pos_multi_variant/static/description/assets/modules/2.png differ diff --git a/pos_multi_variant/static/description/assets/modules/3.png b/pos_multi_variant/static/description/assets/modules/3.png new file mode 100644 index 000000000..6f28da108 Binary files /dev/null and b/pos_multi_variant/static/description/assets/modules/3.png differ diff --git a/pos_multi_variant/static/description/assets/modules/4.png b/pos_multi_variant/static/description/assets/modules/4.png new file mode 100644 index 000000000..3afc14722 Binary files /dev/null and b/pos_multi_variant/static/description/assets/modules/4.png differ diff --git a/pos_multi_variant/static/description/assets/modules/5.png b/pos_multi_variant/static/description/assets/modules/5.png new file mode 100644 index 000000000..cea66b05f Binary files /dev/null and b/pos_multi_variant/static/description/assets/modules/5.png differ diff --git a/pos_multi_variant/static/description/assets/modules/6.png b/pos_multi_variant/static/description/assets/modules/6.png new file mode 100644 index 000000000..0c9bb377e Binary files /dev/null and b/pos_multi_variant/static/description/assets/modules/6.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/hero.png b/pos_multi_variant/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..8f2f91faa Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/hero.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-1.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-1.png new file mode 100644 index 000000000..b3a0abb6f Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-1.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-2.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-2.png new file mode 100644 index 000000000..011d2e55e Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-2.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-3.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-3.png new file mode 100644 index 000000000..8fdf073c5 Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-3.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-4.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-4.png new file mode 100644 index 000000000..5fc025cda Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-4.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-5.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-5.png new file mode 100644 index 000000000..d79df84e9 Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-5.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-6.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-6.png new file mode 100644 index 000000000..a47291444 Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-6.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-7.png b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-7.png new file mode 100644 index 000000000..52cd4b8cb Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/pos_multivariant-7.png differ diff --git a/pos_multi_variant/static/description/assets/screenshots/youtube.png b/pos_multi_variant/static/description/assets/screenshots/youtube.png new file mode 100644 index 000000000..2a281b785 Binary files /dev/null and b/pos_multi_variant/static/description/assets/screenshots/youtube.png differ diff --git a/pos_multi_variant/static/description/banner.png b/pos_multi_variant/static/description/banner.png new file mode 100644 index 000000000..7dcac83ec Binary files /dev/null and b/pos_multi_variant/static/description/banner.png differ diff --git a/pos_multi_variant/static/description/icon.png b/pos_multi_variant/static/description/icon.png new file mode 100644 index 000000000..e8b40694d Binary files /dev/null and b/pos_multi_variant/static/description/icon.png differ diff --git a/pos_multi_variant/static/description/icon.png~ b/pos_multi_variant/static/description/icon.png~ new file mode 100644 index 000000000..5c1d3b967 Binary files /dev/null and b/pos_multi_variant/static/description/icon.png~ differ diff --git a/pos_multi_variant/static/description/images/1.png b/pos_multi_variant/static/description/images/1.png new file mode 100644 index 000000000..2f4f8ba79 Binary files /dev/null and b/pos_multi_variant/static/description/images/1.png differ diff --git a/pos_multi_variant/static/description/images/2.png b/pos_multi_variant/static/description/images/2.png new file mode 100644 index 000000000..d986c7af0 Binary files /dev/null and b/pos_multi_variant/static/description/images/2.png differ diff --git a/pos_multi_variant/static/description/images/3.png b/pos_multi_variant/static/description/images/3.png new file mode 100644 index 000000000..0b78fcded Binary files /dev/null and b/pos_multi_variant/static/description/images/3.png differ diff --git a/pos_multi_variant/static/description/images/4.png b/pos_multi_variant/static/description/images/4.png new file mode 100644 index 000000000..ca352173d Binary files /dev/null and b/pos_multi_variant/static/description/images/4.png differ diff --git a/pos_multi_variant/static/description/images/5.png b/pos_multi_variant/static/description/images/5.png new file mode 100644 index 000000000..2301eab31 Binary files /dev/null and b/pos_multi_variant/static/description/images/5.png differ diff --git a/pos_multi_variant/static/description/images/6.png b/pos_multi_variant/static/description/images/6.png new file mode 100644 index 000000000..b01461fda Binary files /dev/null and b/pos_multi_variant/static/description/images/6.png differ diff --git a/pos_multi_variant/static/description/images/checked.png b/pos_multi_variant/static/description/images/checked.png new file mode 100644 index 000000000..e6c63d582 Binary files /dev/null and b/pos_multi_variant/static/description/images/checked.png differ diff --git a/pos_multi_variant/static/description/images/hero.gif b/pos_multi_variant/static/description/images/hero.gif new file mode 100644 index 000000000..7b12e0434 Binary files /dev/null and b/pos_multi_variant/static/description/images/hero.gif differ diff --git a/pos_multi_variant/static/description/images/logo.png b/pos_multi_variant/static/description/images/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_multi_variant/static/description/images/logo.png differ diff --git a/pos_multi_variant/static/description/images/modules/i1.png b/pos_multi_variant/static/description/images/modules/i1.png new file mode 100644 index 000000000..026b47e1e Binary files /dev/null and b/pos_multi_variant/static/description/images/modules/i1.png differ diff --git a/pos_multi_variant/static/description/images/modules/i2.png b/pos_multi_variant/static/description/images/modules/i2.png new file mode 100644 index 000000000..228cecc14 Binary files /dev/null and b/pos_multi_variant/static/description/images/modules/i2.png differ diff --git a/pos_multi_variant/static/description/images/modules/i3.png b/pos_multi_variant/static/description/images/modules/i3.png new file mode 100644 index 000000000..6701a78c7 Binary files /dev/null and b/pos_multi_variant/static/description/images/modules/i3.png differ diff --git a/pos_multi_variant/static/description/images/modules/i4.png b/pos_multi_variant/static/description/images/modules/i4.png new file mode 100644 index 000000000..4b2b1a7ed Binary files /dev/null and b/pos_multi_variant/static/description/images/modules/i4.png differ diff --git a/pos_multi_variant/static/description/images/modules/i5.png b/pos_multi_variant/static/description/images/modules/i5.png new file mode 100644 index 000000000..7016c5961 Binary files /dev/null and b/pos_multi_variant/static/description/images/modules/i5.png differ diff --git a/pos_multi_variant/static/description/images/modules/i6.png b/pos_multi_variant/static/description/images/modules/i6.png new file mode 100644 index 000000000..98c8c5e1e Binary files /dev/null and b/pos_multi_variant/static/description/images/modules/i6.png differ diff --git a/pos_multi_variant/static/description/index.html b/pos_multi_variant/static/description/index.html new file mode 100644 index 000000000..286328512 --- /dev/null +++ b/pos_multi_variant/static/description/index.html @@ -0,0 +1,684 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+ +
+
+

POS Product Multi Variant

+

+ Configure Multi-Variant Products For POS +

+ +
+
+ + + +
+
+

Overview

+
+

+ POS Multi-variant module is an advanced way for managing product variants from the point of sale application. + The module helps the user to configure product variants straight from POS. User can set extra price, also activate/inactivate the option for variants. + As multi-variant products are displayed with a label, it comes easy for the user to sort which is multi-variant and which is not. + User can confirm the variant type to POS orders. +

+
+
+ + + + +
+
+

Key Features

+
+
+ + +
+ +
+ +

+ Multi-variant option in product configuration. +

+
+ +
+ +

+ Option for activating/inactivating variant types in POS. +

+
+ +
+ +

+ Easy selection of variant type from wizard. +

+
+ +
+ +

+ Option for adding extra price for the variant. +

+
+ +
+ +

+ Notification for multi-variant products in POS. + +

+
+ +
+ +

+ Displays variant details in order receipt and order. + +

+
+
+
+
+
+ + + + +
+
+

Screenshots

+
+ + +
+
+

+ 01

+
+
+

+ Products > Enable POS +

+

+ + After installation, go to Products > Enable POS variants option. + + +

+ +
+
+ + + + +
+
+

+ 02

+
+
+

+ Configure variants + +

+

+ Here you have an option to configure different variants. + +

+ +
+
+ + + + +
+
+

+ 03

+
+
+

+ See multi-variant products +

+

+ Open the POS session, you can see the product with multi-variants. + +

+ +
+
+ + + + +
+
+

+ 03

+
+
+

+ Variant selection window pop-up +

+

+ Variant selection window pop-ups, upon selecting a product having multi-variants. +

+ +
+
+ + + + + +
+
+

+ 03

+
+
+

+ Choose desired variants +

+

+ Choose required variants of the product. +

+ +
+
+ + + + + +
+
+

+ 03

+
+
+

+ Confirmed variants get listed in the POS order list. +

+

+ On confirming the variants, it gets listed in the order list of POS session. + +

+ +
+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+

Suggested Products

+
+ + +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
Odoo + Customization
+
+ +
+
+ +
+
Odoo + Implementation
+
+ +
+
+ +
+
Odoo + Support
+
+ + +
+
+ +
+
Hire + Odoo + Developer
+
+ +
+
+ +
+
Odoo + Integration
+
+ +
+
+ +
+
Odoo + Migration
+
+ + +
+
+ +
+
Odoo + Consultancy
+
+ +
+
+ +
+
Odoo + Implementation
+
+ +
+
+ +
+
Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + + +
+
+
+

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + +
+
\ No newline at end of file diff --git a/pos_multi_variant/static/src/css/label.css b/pos_multi_variant/static/src/css/label.css new file mode 100644 index 000000000..ded427199 --- /dev/null +++ b/pos_multi_variant/static/src/css/label.css @@ -0,0 +1,54 @@ + +.pos .product .variant { + position: absolute; + top: 50px; + left: 2px; + right: 2px; + vertical-align: top; + color: white; + line-height: 13px; + background: #0070F7; + padding: 2px 5px; + border-radius: 2px; +} + +.variants{ + position: absolute; + bottom: -11px; + left: 2px; + right: 2px; + vertical-align: top; + color: white; + line-height: 13px; + background: #1b9c99; + padding: 2px 5px; + border-radius: 2px; +} +.extra-price{ +position: absolute; + top: 2px; + right: 2px; + vertical-align: top; + color: white; + line-height: 13px; + background: #ff6a6a; + padding: 2px 5px; + border-radius: 2px; +} +.tag{ +background-color:#d7d7d7; +font-style: italic; +} +.variant-selected{ + position: absolute; + bottom: 23px; + left: 2px; + right: 2px; + vertical-align: top; + color: white; + line-height: 13px; + font-size: 15px; + background: #0831b3; + padding: 2px 5px; + border-radius: 2px; +} \ No newline at end of file diff --git a/pos_multi_variant/static/src/js/ProductPopup.js b/pos_multi_variant/static/src/js/ProductPopup.js new file mode 100644 index 000000000..4478dd906 --- /dev/null +++ b/pos_multi_variant/static/src/js/ProductPopup.js @@ -0,0 +1,453 @@ +odoo.define('pos_multi_variant.ProductPopup', function (require) +{ "use strict"; + + var PosBaseWidget = require('point_of_sale.BaseWidget'); + var gui = require('point_of_sale.gui'); + var models = require('point_of_sale.models'); + var core = require('web.core'); + var screens = require('point_of_sale.screens'); + var PopupWidget = require('point_of_sale.popups'); + var Widget = require("web.Widget"); + var QWeb = core.qweb; + var rpc = require('web.rpc'); + var _t = require('web.core')._t; + + models.load_models([ + { model: 'variants.tree', + fields: ["pos_active", "value", "attribute", "variants_id", "extra_price"], + loaded: function(self, variants_tree) + { self.variant_tree = variants_tree; + _.each(variants_tree, function(item) + { self.item = item; + }); + } + },{ model: 'product.attribute.value', + fields: ["id", "name"], + loaded: function(self,values) + { self.values = values; + } + }]); + + var super_models = models.PosModel.prototype.models; + models.load_fields('product.product','pos_variants'); + models.load_fields('product.product','variant_line_ids'); + + var _super_orderline = models.Orderline.prototype; + models.Orderline = models.Orderline.extend + ({ initialize: function(attr, options) + { _super_orderline.initialize.call(this,attr,options); + this.product_variants = this.product_variants || []; + }, + init_from_JSON: function(json) + { _super_orderline.init_from_JSON.apply(this,arguments); + this.product_variants = json.product_variants || []; + }, + export_as_JSON: function () + { var json = _super_orderline.export_as_JSON.apply(this, arguments); + json.product_variants = this.product_variants || []; + return json; + }, + }); + + var ProductPopUp = PopupWidget.extend + ({ template: 'ProductPopUp', + + init: function(parent, options) + { this._super(parent, options); + this.options = {}; + this.pos_reference = ""; + }, + + show: function(options) + { this._super(options); + this.render_list(options); + }, + + events: + { 'click .button.cancel': 'click_cancel', + 'click .button.confirm': 'click_confirm', + 'click .product': 'click_variant', + }, + + click_variant:function(e) + + { + console.log(this,e,"this and e") + var order = this.self.pos.get('selectedOrder') + var self = e.currentTarget + var action = $(self).find('.action').text(); + console.log(self.outerText,"outer") + var categories = [] + + var category = $(self).find('.action').data('category'); + $('.product-img').find('.variant-selected').each(function () + { if($(this).data('category') == category) + { $(this).text("").removeClass('variant-selected'); + $(self).find('.action').text("Selected").addClass('variant-selected'); + } + }); + $(self).find('.action').text("Selected").addClass('variant-selected'); + var add = $(self).find('.extra-price')[0].outerText; + console.log(add.split('+$ ')[1],"mmmmmmmm") + add = add.split('+$ ')[1] + console.log(add,"added price") + var type = $(self).find('.variants').text(); + $(self).find('.variant-selected').attr('data-price', add); + $(self).find('.variant-selected').attr('data-type', type); + }, + + render_list:function(options) + { this.list = options.list + this.image_url = options.image_url + this.pos_reference = options.data + this.variant_values = options.values + this.self = options.self + var AddError = "variants are not added"; + var ActiveError = "No active variants " + var NotActive = 0; + var AttributeNumbers = [] + var pushed = [] + + for (var i = 0; i < this.list.length; i++) + { if(this.list[i].pos_active == false) + { NotActive += 1 + } + if(this.list.length == NotActive) + { $("#notify").append(ActiveError); + } + if(this.list[i].pos_active == true) + { if (!pushed.includes(this.list[i].attribute[0])) + { var temp = {}; + temp.id = this.list[i].attribute[0]; + temp.name = this.list[i].attribute[1] + pushed.push(this.list[i].attribute[0]) + AttributeNumbers.push(temp) + } + } + } + var tag = "
"; + for ( var i in AttributeNumbers) + { tag += "

"+AttributeNumbers[i].name+"

"; + for (var attr = 0; attr < this.list.length; attr++) + { console.log(this.list,"list") + if (AttributeNumbers[i].id == this.list[attr].attribute[0]) + { var values = this.list[attr].value.length + for(var j = 0; j < values; j++) + { if(this.list[attr].extra_price) + { var price = '+'+this.format_currency(this.list[attr].extra_price) + var price_per = this.format_currency(this.list[attr].extra_price) + console.log(price_per,"price")} + else + { var price = '+'+this.format_currency(0.00)} + for(var k=0; k < this.variant_values.length; k++) + { if((this.variant_values[k].id == this.list[attr].value[j]) && this.list[attr].pos_active == true) + {console.log(price,"price_per") + var rows ="
" + + "
"+ + "" + + ""+price+""+ + "

"+ + ""+this.variant_values[k].name+""+ + "
"+ + "
" + tag += rows + } + } + } + } + } + } + tag += "
" + $("#notify").append(tag); + + if(!(this.pos_reference.variant_line_ids.length>0)) + { $("#notify").append(AddError); + } + }, + + click_cancel: function() + { var order = this.self.pos.get('selectedOrder').selected_orderline.product_variants = [] + this.gui.close_popup(); + }, + + click_confirm: function() + { var price = 0.00 + var order = this.self.pos.get('selectedOrder'); + var selected_orderline = order.selected_orderline + $('.product-img').find('.variant-selected').each(function () + { price += parseFloat($(this).data('price')) + console.log(this,"this") + var variant = order.selected_orderline.product_variants + variant.push + ({ 'extra_price': $(this).data('price'), + 'type': $(this).data('type'), + }) + }); + selected_orderline.price_manually_set = true; + selected_orderline.price += price + selected_orderline.trigger('change', selected_orderline); + this.gui.close_popup(); + } + }); + gui.define_popup({name:'ProductSelection', widget: ProductPopUp}); + + screens.ProductScreenWidget.include + ({ click_product: function(product) + { var image_url = this.get_product_image(product.id); + var self = this; + var variant_tree = this.pos.variant_tree + var list = [] + var values = this.pos.values + for(var i = 0; i < variant_tree.length; i++) + { if(variant_tree[i].variants_id[0] == product.product_tmpl_id) + { list.push(variant_tree[i]); } + } + if(product.to_weight && this.pos.config.iface_electronic_scale) + { this.gui.show_screen('scale',{product: product});} + else if(product.pos_variants) + { this.pos.get_order().add_product(product); + this.gui.show_popup('ProductSelection', + { 'title': product.display_name, + data: product, + image_url: image_url, + list: list, + values: values, + self: self + }); + } + else + { this.pos.get_order().add_product(product); } + }, + get_product_image: function(product) + { return window.location.origin + '/web/image?model=product.product&field=image_1920&id='+product; } + }); +}); + + + + + + +//odoo.define('pos_multi_variant.ProductPopup', function (require) +//{ "use strict"; +// +// var PosBaseWidget = require('point_of_sale.BaseWidget'); +// var gui = require('point_of_sale.gui'); +// var models = require('point_of_sale.models'); +// var core = require('web.core'); +// var screens = require('point_of_sale.screens'); +// var PopupWidget = require('point_of_sale.popups'); +// var Widget = require("web.Widget"); +// var QWeb = core.qweb; +// var rpc = require('web.rpc'); +// var _t = require('web.core')._t; +// +// models.load_models([ +// { model: 'variants.tree', +// fields: ["pos_active", "value", "attribute", "variants_id", "extra_price"], +// loaded: function(self, variants_tree) +// { self.variant_tree = variants_tree; +// _.each(variants_tree, function(item) +// { self.item = item; +// }); +// } +// },{ model: 'product.attribute.value', +// fields: ["id", "name"], +// loaded: function(self,values) +// { self.values = values; +// } +// }]); +// +// var super_models = models.PosModel.prototype.models; +// models.load_fields('product.product','pos_variants'); +// models.load_fields('product.product','variant_line_ids'); +// +// var _super_orderline = models.Orderline.prototype; +// models.Orderline = models.Orderline.extend +// ({ initialize: function(attr, options) +// { _super_orderline.initialize.call(this,attr,options); +// this.product_variants = this.product_variants || []; +// }, +// init_from_JSON: function(json) +// { _super_orderline.init_from_JSON.apply(this,arguments); +// this.product_variants = json.product_variants || []; +// }, +// export_as_JSON: function () +// { var json = _super_orderline.export_as_JSON.apply(this, arguments); +// json.product_variants = this.product_variants || []; +// return json; +// }, +// }); +// +// var ProductPopUp = PopupWidget.extend +// ({ template: 'ProductPopUp', +// +// init: function(parent, options) +// { this._super(parent, options); +// this.options = {}; +// this.pos_reference = ""; +// }, +// +// show: function(options) +// { this._super(options); +// this.render_list(options); +// }, +// +// events: +// { 'click .button.cancel': 'click_cancel', +// 'click .button.confirm': 'click_confirm', +// 'click .product': 'click_variant', +// }, +// +// click_variant:function(e) +// { var order = this.self.pos.get('selectedOrder') +// var self = e.currentTarget +// var action = $(self).find('.action').text(); +// var categories = [] +// +// var category = $(self).find('.action').data('category'); +// $('.product-img').find('.variant-selected').each(function () +// { if($(this).data('category') == category) +// { $(this).text("").removeClass('variant-selected'); +// $(self).find('.action').text("Selected").addClass('variant-selected'); +// } +// }); +// $(self).find('.action').text("Selected").addClass('variant-selected'); +// var add = $(self).find('.extra-price').text().substr(1).slice(0, -2); +// var type = $(self).find('.variants').text(); +// $(self).find('.variant-selected').attr('data-price', add); +// $(self).find('.variant-selected').attr('data-type', type); +// }, +// +// render_list:function(options) +// { this.list = options.list +// this.image_url = options.image_url +// this.pos_reference = options.data +// this.variant_values = options.values +// this.self = options.self +// var AddError = "variants are not added"; +// var ActiveError = "No active variants " +// var NotActive = 0; +// var AttributeNumbers = [] +// var pushed = [] +// +// for (var i = 0; i < this.list.length; i++) +// { if(this.list[i].pos_active == false) +// { NotActive += 1 +// } +// if(this.list.length == NotActive) +// { $("#notify").append(ActiveError); +// } +// if(this.list[i].pos_active == true) +// { if (!pushed.includes(this.list[i].attribute[0])) +// { var temp = {}; +// temp.id = this.list[i].attribute[0]; +// temp.name = this.list[i].attribute[1] +// pushed.push(this.list[i].attribute[0]) +// AttributeNumbers.push(temp) +// } +// } +// } +// var tag = "
"; +// for ( var i in AttributeNumbers) +// { tag += "

"+AttributeNumbers[i].name+"

"; +// for (var attr = 0; attr < this.list.length; attr++) +// { if (AttributeNumbers[i].id == this.list[attr].attribute[0]) +// { var values = this.list[attr].value.length +// for(var j = 0; j < values; j++) +// { if(this.list[attr].extra_price) +// { var price = '+'+this.format_currency(this.list[attr].extra_price)} +// else +// { var price = '+'+this.format_currency(0.00)} +// for(var k=0; k < this.variant_values.length; k++) +// { if((this.variant_values[k].id == this.list[attr].value[j]) && this.list[attr].pos_active == true) +// { var rows ="
" + +// "
"+ +// "" + +// ""+50+""+ +// "

"+ +// ""+this.variant_values[k].name+""+ +// "
"+ +// "
" +// tag += rows +// } +// } +// } +// } +// } +// } +// tag += "
" +// $("#notify").append(tag); +// +// if(!(this.pos_reference.variant_line_ids.length>0)) +// { $("#notify").append(AddError); +// } +// }, +// +// click_cancel: function() +// { var order = this.self.pos.get('selectedOrder').selected_orderline.product_variants = [] +// this.gui.close_popup(); +// }, +// +// click_confirm: function() +// { +// console.log(this) +// console.log(this.options.data.lst_price) +// console.log(this.options.list) +// var new_price = this.options.data.lst_price +// var extra_fee = parseFloat(this.options.list[0].extra_price); +// var price = 0.00 +// var order = this.self.pos.get('selectedOrder'); +// var selected_orderline = order.selected_orderline +// +// $('.product-img').find('.variant-selected').each(function () +// { price += parseFloat(new_price) +// var variant = order.selected_orderline.product_variants +// console.log(variant, "pppppppp") +// console.log($(this).data('price'),"pppp") +// variant.push +// ({ 'extra_price': $(this).data('price'), +// 'type': $(this).data('type'), +// }) +// }); +// console.log(extra_fee, "extraaaaaaaa") +// selected_orderline.price_manually_set = true; +// selected_orderline.price = selected_orderline.price+extra_fee +// console.log("selected order line",selected_orderline.price) +// selected_orderline.trigger('change', selected_orderline); +// this.gui.close_popup(); +// } +// }); +// gui.define_popup({name:'ProductSelection', widget: ProductPopUp}); +// +// screens.ProductScreenWidget.include +// ({ click_product: function(product) +// { var image_url = this.get_product_image(product.id); +// var self = this; +// var variant_tree = this.pos.variant_tree +// var list = [] +// var values = this.pos.values +// for(var i = 0; i < variant_tree.length; i++) +// { if(variant_tree[i].variants_id[0] == product.product_tmpl_id) +// { list.push(variant_tree[i]); } +// } +// if(product.to_weight && this.pos.config.iface_electronic_scale) +// { this.gui.show_screen('scale',{product: product});} +// else if(product.pos_variants) +// { this.pos.get_order().add_product(product); +// this.gui.show_popup('ProductSelection', +// { 'title': product.display_name, +// data: product, +// image_url: image_url, +// list: list, +// values: values, +// self: self +// }); +// } +// else +// { this.pos.get_order().add_product(product); } +// }, +// get_product_image: function(product) +// { return window.location.origin + '/web/image?model=product.product&field=image_1920&id='+product; } +// }); +//}); diff --git a/pos_multi_variant/static/src/xml/label.xml b/pos_multi_variant/static/src/xml/label.xml new file mode 100644 index 000000000..e375e7bd3 --- /dev/null +++ b/pos_multi_variant/static/src/xml/label.xml @@ -0,0 +1,61 @@ + + + + + + +
+ Product image + + + + + + + + Multi-variant + + + + + + + + + + Multi-variant + + +
+
+
+ + +
+ +
  • + + : + + at + +
  • +
    + +
    +
    +
    + + + +
    + + +
    + +
    +
    + +
    + + diff --git a/pos_multi_variant/static/src/xml/popup.xml b/pos_multi_variant/static/src/xml/popup.xml new file mode 100644 index 000000000..b25f2b729 --- /dev/null +++ b/pos_multi_variant/static/src/xml/popup.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/pos_multi_variant/views/pos_variants.xml b/pos_multi_variant/views/pos_variants.xml new file mode 100644 index 000000000..007c81f07 --- /dev/null +++ b/pos_multi_variant/views/pos_variants.xml @@ -0,0 +1,30 @@ + + + + + pos.variants + product.template + + + +
    + +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/pos_multi_variant/views/pos_wizard.xml b/pos_multi_variant/views/pos_wizard.xml new file mode 100644 index 000000000..7d58d2a42 --- /dev/null +++ b/pos_multi_variant/views/pos_wizard.xml @@ -0,0 +1,10 @@ + + + +