diff --git a/sale_order_pos/README.rst b/sale_order_pos/README.rst new file mode 100755 index 000000000..1f17cd1f2 --- /dev/null +++ b/sale_order_pos/README.rst @@ -0,0 +1,43 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +POS Sales Order +================== +* POS Sale Order module for Odoo 15. + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/15.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions '__ + +Credits +------- + +* Version 15 : Fathima Mufeeda PP @ Cybrosys + +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/sale_order_pos/__init__.py b/sale_order_pos/__init__.py new file mode 100644 index 000000000..7b2c59c1c --- /dev/null +++ b/sale_order_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/sale_order_pos/__manifest__.py b/sale_order_pos/__manifest__.py new file mode 100644 index 000000000..3cc0bab58 --- /dev/null +++ b/sale_order_pos/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "POS Sale order ", + 'version': '15.0.1.0.0', + 'summary': """ + Create Sales order from POS. """, + 'description': """ + Creating Sales order from Point of Sale with a single click. + """, + 'category': 'Point of Sale', + 'author': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'maintainer': "Cybrosys Techno Solutions", + 'depends': ['base', 'point_of_sale', 'sale_management'], + 'assets': { + 'web.assets_backend': [ + 'sale_order_pos/static/src/js/sale_order_button.js', + ], + 'web.assets_qweb': [ + 'sale_order_pos/static/src/xml/sale_order_button.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + +} diff --git a/sale_order_pos/doc/RELEASE_NOTES.md b/sale_order_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c0e77a016 --- /dev/null +++ b/sale_order_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 11.03.2023 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for POS Sale Order \ No newline at end of file diff --git a/sale_order_pos/models/__init__.py b/sale_order_pos/models/__init__.py new file mode 100644 index 000000000..23e660c3a --- /dev/null +++ b/sale_order_pos/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import sale_order diff --git a/sale_order_pos/models/sale_order.py b/sale_order_pos/models/sale_order.py new file mode 100644 index 000000000..1f85601d7 --- /dev/null +++ b/sale_order_pos/models/sale_order.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class SaleOrder(models.Model): + """Inheriting sale order for creating a sale order through POS""" + _inherit = 'sale.order' + + def create_sale_order(self, temp_list, cus): + """To create sale order through POS""" + self.create({ + 'partner_id': cus.get('id'), + 'order_line': [(0, 0, { + 'product_id': rec.get('product'), + 'discount': rec.get('discount'), + 'product_uom_qty': rec.get('quantity'), + 'price_subtotal': rec.get('price'), + }) for rec in temp_list] + }) diff --git a/sale_order_pos/static/description/assets/icons/check.png b/sale_order_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/check.png differ diff --git a/sale_order_pos/static/description/assets/icons/chevron.png b/sale_order_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/chevron.png differ diff --git a/sale_order_pos/static/description/assets/icons/cogs.png b/sale_order_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/cogs.png differ diff --git a/sale_order_pos/static/description/assets/icons/consultation.png b/sale_order_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/consultation.png differ diff --git a/sale_order_pos/static/description/assets/icons/ecom-black.png b/sale_order_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/ecom-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/education-black.png b/sale_order_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/education-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/hotel-black.png b/sale_order_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/hotel-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/license.png b/sale_order_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/license.png differ diff --git a/sale_order_pos/static/description/assets/icons/lifebuoy.png b/sale_order_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/sale_order_pos/static/description/assets/icons/logo.png b/sale_order_pos/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/logo.png differ diff --git a/sale_order_pos/static/description/assets/icons/manufacturing-black.png b/sale_order_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/pos-black.png b/sale_order_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/pos-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/puzzle.png b/sale_order_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/puzzle.png differ diff --git a/sale_order_pos/static/description/assets/icons/restaurant-black.png b/sale_order_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/service-black.png b/sale_order_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/service-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/trading-black.png b/sale_order_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/trading-black.png differ diff --git a/sale_order_pos/static/description/assets/icons/training.png b/sale_order_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/training.png differ diff --git a/sale_order_pos/static/description/assets/icons/update.png b/sale_order_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/update.png differ diff --git a/sale_order_pos/static/description/assets/icons/user.png b/sale_order_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/user.png differ diff --git a/sale_order_pos/static/description/assets/icons/wrench.png b/sale_order_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/sale_order_pos/static/description/assets/icons/wrench.png differ diff --git a/sale_order_pos/static/description/assets/modules/budget_image.png b/sale_order_pos/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/sale_order_pos/static/description/assets/modules/budget_image.png differ diff --git a/sale_order_pos/static/description/assets/modules/credit_image.png b/sale_order_pos/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/sale_order_pos/static/description/assets/modules/credit_image.png differ diff --git a/sale_order_pos/static/description/assets/modules/employee_image.png b/sale_order_pos/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/sale_order_pos/static/description/assets/modules/employee_image.png differ diff --git a/sale_order_pos/static/description/assets/modules/export_image.png b/sale_order_pos/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/sale_order_pos/static/description/assets/modules/export_image.png differ diff --git a/sale_order_pos/static/description/assets/modules/gantt_image.png b/sale_order_pos/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/sale_order_pos/static/description/assets/modules/gantt_image.png differ diff --git a/sale_order_pos/static/description/assets/modules/quotation_image.png b/sale_order_pos/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/sale_order_pos/static/description/assets/modules/quotation_image.png differ diff --git a/sale_order_pos/static/description/assets/screenshots/create_sale_order_button.png b/sale_order_pos/static/description/assets/screenshots/create_sale_order_button.png new file mode 100644 index 000000000..c6b92a72b Binary files /dev/null and b/sale_order_pos/static/description/assets/screenshots/create_sale_order_button.png differ diff --git a/sale_order_pos/static/description/assets/screenshots/hero.gif b/sale_order_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e8810feb0 Binary files /dev/null and b/sale_order_pos/static/description/assets/screenshots/hero.gif differ diff --git a/sale_order_pos/static/description/assets/screenshots/sale_order.png b/sale_order_pos/static/description/assets/screenshots/sale_order.png new file mode 100644 index 000000000..3e1f1436b Binary files /dev/null and b/sale_order_pos/static/description/assets/screenshots/sale_order.png differ diff --git a/sale_order_pos/static/description/assets/screenshots/sale_order_created.png b/sale_order_pos/static/description/assets/screenshots/sale_order_created.png new file mode 100644 index 000000000..ed93d0e9b Binary files /dev/null and b/sale_order_pos/static/description/assets/screenshots/sale_order_created.png differ diff --git a/sale_order_pos/static/description/assets/screenshots/warning_no_customer.png b/sale_order_pos/static/description/assets/screenshots/warning_no_customer.png new file mode 100644 index 000000000..55db20f93 Binary files /dev/null and b/sale_order_pos/static/description/assets/screenshots/warning_no_customer.png differ diff --git a/sale_order_pos/static/description/assets/screenshots/warning_no_product.png b/sale_order_pos/static/description/assets/screenshots/warning_no_product.png new file mode 100644 index 000000000..3a189feb3 Binary files /dev/null and b/sale_order_pos/static/description/assets/screenshots/warning_no_product.png differ diff --git a/sale_order_pos/static/description/banner.png b/sale_order_pos/static/description/banner.png new file mode 100644 index 000000000..3ecff2b27 Binary files /dev/null and b/sale_order_pos/static/description/banner.png differ diff --git a/sale_order_pos/static/description/icon.png b/sale_order_pos/static/description/icon.png new file mode 100644 index 000000000..0a4dfd56c Binary files /dev/null and b/sale_order_pos/static/description/icon.png differ diff --git a/sale_order_pos/static/description/index.html b/sale_order_pos/static/description/index.html new file mode 100644 index 000000000..cd2d489b2 --- /dev/null +++ b/sale_order_pos/static/description/index.html @@ -0,0 +1,558 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ POS Sales Order.

+

+ A Module For Creating Sales Order From POS. +

+ +
+
+ + + +
+
+

+ Overview. +

+
+ +
+

+ Odoo POS Sales Order Module will allow to create Sales Order from POS

+
+

+
+ +
+
+

+ Features. +

+
+ +
+
+ +
+
+

+ Create a sales order from POS.

+
+
+ +
+
+ +
+
+

+ Product/Customer Validation.

+
+
+ +
+
+

+ Screenshots. +

+
+ +
+

+ Create sales order button in POS touch-screen.

+ +
+ +
+

+ User can see warning messages if they forgot to select the product.

+ +
+ +
+

+ User can see warning messages if they forgot to select the customer.

+ +
+ +
+

+ User can see a message when sales order created.

+ +
+ +
+

+ The corresponding sales order we can see in sales module.

+ +
+ +
+ +
+
+

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?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/sale_order_pos/static/src/js/sale_order_button.js b/sale_order_pos/static/src/js/sale_order_button.js new file mode 100644 index 000000000..6927adac2 --- /dev/null +++ b/sale_order_pos/static/src/js/sale_order_button.js @@ -0,0 +1,65 @@ +odoo.define('sale_order_pos.CreateSaleOrder', function(require) { +'use strict'; + var rpc = require('web.rpc'); + const PosComponent = require('point_of_sale.PosComponent'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require('web.custom_hooks'); + const Registries = require('point_of_sale.Registries'); + const PaymentScreen = require('point_of_sale.PaymentScreen'); + var core = require('web.core'); + const { Gui } = require('point_of_sale.Gui'); + const _t = core._t; + + class PosSaleOrder extends PosComponent { + constructor() { + super(...arguments); + useListener('click', this.onClick); + } + async onClick() { +// for creating sale order from pos throgh a button + var cus = this.env.pos.get_client() + const order = this.env.pos.get_order(); + var lines = order.get_orderlines() + if (lines.length === 0 ){ + Gui.showPopup("ErrorPopup", { + 'title': _t("Please select a product"), + 'body': _t("You cannot create sales order without selecting a product."), + }); + return;} + else if(!cus){ + Gui.showPopup("ErrorPopup", { + 'title': _t("Please select a customer"), + 'body': _t("You cannot create sales order without selecting a customer."), + }); + return;} + + else { + const { confirmed} = await this.showPopup("ConfirmPopup", { + title: this.env._t('Confirmation'), + body: this.env._t('Are you sure you want to create sale order?'), + }); + if(confirmed){ + var temp_list = [] + for(var i=0; i < lines.length ; i++){ + const dict = { quantity:lines[i].quantity, price:lines[i].get_display_price(), discount:lines[i].get_discount(),product:lines[i].product.id} + temp_list.push(dict) + } + rpc.query({ + model: 'sale.order', + method: 'create_sale_order', + args: [,temp_list,cus] + }) + } + } + } + } + PosSaleOrder.template = 'PosSaleOrder'; + ProductScreen.addControlButton({ + component: PosSaleOrder, + condition: function() { + return this.env.pos; + }, + }); + Registries.Component.add(PosSaleOrder); + return PosSaleOrder; +}); diff --git a/sale_order_pos/static/src/xml/sale_order_button.xml b/sale_order_pos/static/src/xml/sale_order_button.xml new file mode 100644 index 000000000..44dd5cf25 --- /dev/null +++ b/sale_order_pos/static/src/xml/sale_order_button.xml @@ -0,0 +1,10 @@ + + + + + + + Create Sale Order + + +