diff --git a/website_repeat_sale/README.rst b/website_repeat_sale/README.rst new file mode 100644 index 000000000..a1b789620 --- /dev/null +++ b/website_repeat_sale/README.rst @@ -0,0 +1,43 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Website Reorder +=============== + +Website Reorder + +Installation +============ +- www.odoo.com/documentation/13.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + Meera K @ 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 +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/website_repeat_sale/__init__.py b/website_repeat_sale/__init__.py new file mode 100755 index 000000000..53a7eae14 --- /dev/null +++ b/website_repeat_sale/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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 controllers diff --git a/website_repeat_sale/__manifest__.py b/website_repeat_sale/__manifest__.py new file mode 100644 index 000000000..49ff5bfd5 --- /dev/null +++ b/website_repeat_sale/__manifest__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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': "Website Reorder", + 'version': '13.0.1.0.0', + 'summary': """Add products from sale history of customers to cart """, + 'description': """Add products from sale history of customers to cart """, + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'category': 'eCommerce', + 'depends': ['website_sale'], + 'license': 'AGPL-3', + 'data': [ + 'views/view.xml', + ], + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, +} diff --git a/website_repeat_sale/controllers/__init__.py b/website_repeat_sale/controllers/__init__.py new file mode 100644 index 000000000..5decb7193 --- /dev/null +++ b/website_repeat_sale/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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 main \ No newline at end of file diff --git a/website_repeat_sale/controllers/main.py b/website_repeat_sale/controllers/main.py new file mode 100644 index 000000000..22f546dd1 --- /dev/null +++ b/website_repeat_sale/controllers/main.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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 http +from odoo.http import request + + +class WebSaleOrderRepeat(http.Controller): + + @http.route('/order/repeat', type='http', auth="public", website=True) + def repeat_sale_order(self, **kwargs): + """Update products to cart when a user clicks reorder button""" + order_id = kwargs.get('id') + repeat_order_id = request.env['sale.order'].sudo().browse( + int(order_id)) + sale_order = request.website.sale_get_order(force_create=True) + if sale_order.state != 'draft': + request.session['sale_order_id'] = None + sale_order = request.website.sale_get_order(force_create=True) + add_qty = 0 + set_qty = 0 + for line1 in repeat_order_id.order_line: + if line1.product_id: + if sale_order.order_line: + for line2 in sale_order.order_line: + if line2.product_id == line1.product_id: + add_qty = line1.product_uom_qty + line2.product_uom_qty + set_qty = add_qty + break + else: + add_qty = line1.product_uom_qty + set_qty = add_qty + else: + add_qty = line1.product_uom_qty + set_qty = add_qty + + sale_order._cart_update( + product_id=int(line1.product_id.id), + add_qty=add_qty, + set_qty=set_qty, + ) + return request.redirect("/shop/cart") + diff --git a/website_repeat_sale/doc/RELEASE_NOTES.md b/website_repeat_sale/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..da9a354ba --- /dev/null +++ b/website_repeat_sale/doc/RELEASE_NOTES.md @@ -0,0 +1,9 @@ +## Module + +#### 04.02.2020 +#### Version 13.0.1.0.0 +##### ADD + +- Initial Commit for website_repeat_sale + + diff --git a/website_repeat_sale/static/description/banner.jpg b/website_repeat_sale/static/description/banner.jpg new file mode 100644 index 000000000..dc8e987fb Binary files /dev/null and b/website_repeat_sale/static/description/banner.jpg differ diff --git a/website_repeat_sale/static/description/icon.png b/website_repeat_sale/static/description/icon.png new file mode 100644 index 000000000..e41b6300c Binary files /dev/null and b/website_repeat_sale/static/description/icon.png differ diff --git a/website_repeat_sale/static/description/images/banner.png b/website_repeat_sale/static/description/images/banner.png new file mode 100644 index 000000000..61d6a81a2 Binary files /dev/null and b/website_repeat_sale/static/description/images/banner.png differ diff --git a/website_repeat_sale/static/description/images/barcode.jpeg b/website_repeat_sale/static/description/images/barcode.jpeg new file mode 100644 index 000000000..529143e4e Binary files /dev/null and b/website_repeat_sale/static/description/images/barcode.jpeg differ diff --git a/website_repeat_sale/static/description/images/checked.png b/website_repeat_sale/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/website_repeat_sale/static/description/images/checked.png differ diff --git a/website_repeat_sale/static/description/images/credit_exceed.png b/website_repeat_sale/static/description/images/credit_exceed.png new file mode 100644 index 000000000..e35c8df65 Binary files /dev/null and b/website_repeat_sale/static/description/images/credit_exceed.png differ diff --git a/website_repeat_sale/static/description/images/customer_credit.png b/website_repeat_sale/static/description/images/customer_credit.png new file mode 100644 index 000000000..036c91d9a Binary files /dev/null and b/website_repeat_sale/static/description/images/customer_credit.png differ diff --git a/website_repeat_sale/static/description/images/cybrosys.png b/website_repeat_sale/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/website_repeat_sale/static/description/images/cybrosys.png differ diff --git a/website_repeat_sale/static/description/images/multiple_products.png b/website_repeat_sale/static/description/images/multiple_products.png new file mode 100644 index 000000000..3a2051a87 Binary files /dev/null and b/website_repeat_sale/static/description/images/multiple_products.png differ diff --git a/website_repeat_sale/static/description/images/product_recom.png b/website_repeat_sale/static/description/images/product_recom.png new file mode 100644 index 000000000..6b124fb63 Binary files /dev/null and b/website_repeat_sale/static/description/images/product_recom.png differ diff --git a/website_repeat_sale/static/description/images/product_to_quota.png b/website_repeat_sale/static/description/images/product_to_quota.png new file mode 100644 index 000000000..322f18f64 Binary files /dev/null and b/website_repeat_sale/static/description/images/product_to_quota.png differ diff --git a/website_repeat_sale/static/description/images/repeat-sale-order.png b/website_repeat_sale/static/description/images/repeat-sale-order.png new file mode 100644 index 000000000..96f3cb8ec Binary files /dev/null and b/website_repeat_sale/static/description/images/repeat-sale-order.png differ diff --git a/website_repeat_sale/static/description/images/screenshot-01.png b/website_repeat_sale/static/description/images/screenshot-01.png new file mode 100644 index 000000000..96f3cb8ec Binary files /dev/null and b/website_repeat_sale/static/description/images/screenshot-01.png differ diff --git a/website_repeat_sale/static/description/images/screenshot-02.png b/website_repeat_sale/static/description/images/screenshot-02.png new file mode 100644 index 000000000..2e2d86aad Binary files /dev/null and b/website_repeat_sale/static/description/images/screenshot-02.png differ diff --git a/website_repeat_sale/static/description/images/screenshot-03.png b/website_repeat_sale/static/description/images/screenshot-03.png new file mode 100644 index 000000000..5e2537c46 Binary files /dev/null and b/website_repeat_sale/static/description/images/screenshot-03.png differ diff --git a/website_repeat_sale/static/description/index.html b/website_repeat_sale/static/description/index.html new file mode 100644 index 000000000..ac5d83f22 --- /dev/null +++ b/website_repeat_sale/static/description/index.html @@ -0,0 +1,565 @@ +
+ cybrosys-logo
+
+
+
+

Website + Reorder

+

Repeat a sale order + quickly from sale order history(my/orders) of Customer.

+
+

Key Highlights

+
    +
  • check + Repeat a sale order quickly from sale order history(my/orders) of Customer. + Added a button in 'my/orders' and in sale order preview form. +
  • +
+
+
+
+
+
+
+
+ +
+
+ +

Overview

+
+

+ Repeat a sale order quickly from sale order history(my/orders) of + Customer. + Added a button in 'my/orders' and in sale order preview form. +

+
+
+ +

Repeat a sale order from sale order history

+
+
    +
  • + checkUsers can + add all the products in a sale order to the cart from the sale order history of the user . +
  • +
+
+ +
+
+

+ Screenshots

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

Suggested + Products

+
+ +
+
+

Our + Service

+
+ +
+
+
+

Our + Industries

+
+ +
+
+
+
+ Odoo Industry
+
+
+

+ + Trading

+

+ Easily procure and sell your products.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + Manufacturing

+

+ Plan, track and schedule your operations.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + Restaurant

+

+ Run your bar or restaurant methodical.

+
+
+
+
+
+ + Odoo Industry
+
+
+

+ + POS

+

+ Easy configuring and convivial selling.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + E-commerce & Website

+

+ Mobile friendly, awe-inspiring product pages.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + Hotel Management

+

+ An all-inclusive hotel management application.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + Education

+

+ A Collaborative platform for educational management.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + Service Management

+

+ Keep track of services and invoice accordingly.

+
+
+
+
+
+ +
+
+
+

Need Any Help?

+
+

If you have anything to share with us based on your use of + this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+
+
+

Contact Us

+ www.cybrosys.com +
+
+
+
+
+
+
+
+
+ +
+ + + + + + + +
+
+
+ \ No newline at end of file diff --git a/website_repeat_sale/views/view.xml b/website_repeat_sale/views/view.xml new file mode 100644 index 000000000..682c4abe9 --- /dev/null +++ b/website_repeat_sale/views/view.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file