diff --git a/sale_donation_website/README.rst b/sale_donation_website/README.rst new file mode 100755 index 000000000..fe11067d1 --- /dev/null +++ b/sale_donation_website/README.rst @@ -0,0 +1,45 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/AGPL-3.0-standalone.html + :alt: License: AGPL-3 + +Website Sale Donation +===================== +* Website Sale Donation module for Odoo 16. + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Version 16 : 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 +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +Further information +=================== +HTML Description: ``__ diff --git a/sale_donation_website/__init__.py b/sale_donation_website/__init__.py new file mode 100644 index 000000000..884b69eb0 --- /dev/null +++ b/sale_donation_website/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 +from . import models diff --git a/sale_donation_website/__manifest__.py b/sale_donation_website/__manifest__.py new file mode 100644 index 000000000..86587213d --- /dev/null +++ b/sale_donation_website/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 Sale Donation", + 'description': """To add the donation in the website""", + 'summary': """User can select created donations in the website""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'maintainer': "Cybrosys Techno Solutions", + 'category': 'Sales/Sales', + 'version': '16.0.1.0.0', + 'depends': ['base', 'sale_management', 'website_sale'], + 'data': [ + 'security/ir.model.access.csv', + 'data/product_product_data.xml', + 'views/donation_rule_views.xml', + 'views/donation_lines_views.xml', + 'views/donation_menu.xml', + 'views/website_sale_donation_views.xml', + 'views/sale_order_views.xml', + ], + 'images': [ + 'static/description/banner.jpg', + ], + 'assets': { + 'web.assets_frontend': [ + 'sale_donation_website/static/src/js/website_sale_donation.js', + ], + }, + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/sale_donation_website/controllers/__init__.py b/sale_donation_website/controllers/__init__.py new file mode 100755 index 000000000..f3da87fdf --- /dev/null +++ b/sale_donation_website/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 diff --git a/sale_donation_website/controllers/main.py b/sale_donation_website/controllers/main.py new file mode 100755 index 000000000..9e3861009 --- /dev/null +++ b/sale_donation_website/controllers/main.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebsiteSaleDelivery(WebsiteSale): + + @http.route(['/shop/update_donation'], type='json', auth='public', + methods=['POST'], website=True, csrf=False) + def update_eshop_donation(self, **post): + order = request.website.sale_get_order() + donation_id = request.env['donation.rule'].sudo().browse(int(post['donation_id'])) + donate_product = request.env.ref('sale_donation_website.product_product_view_create') + + if post.get('checked'): + # Add the donation to M2M field + order.write({'donation_ids': [(4, donation_id.id)]}) + # Add line if not already there + donation_lines = order.order_line.filtered( + lambda l: l.product_id == donate_product and l.name == donation_id.name) + if not donation_lines: + order.order_line.create({ + 'order_id': order.id, + 'product_id': donate_product.id, + 'name': donation_id.name, + 'product_uom': donate_product.uom_id.id, + 'product_uom_qty': 1, + 'price_unit': donation_id.amount, + 'is_donation': True, + }) + else: + # Remove the donation line + order.order_line.filtered( + lambda l: l.product_id == donate_product and l.name == donation_id.name and l.is_donation).unlink() + # Also unlink from donation_ids M2M if needed + order.write({'donation_ids': [(3, donation_id.id)]}) + + return True diff --git a/sale_donation_website/data/product_product_data.xml b/sale_donation_website/data/product_product_data.xml new file mode 100644 index 000000000..33f286273 --- /dev/null +++ b/sale_donation_website/data/product_product_data.xml @@ -0,0 +1,11 @@ + + + + + + Donation + service + 0.00 + + + \ No newline at end of file diff --git a/sale_donation_website/doc/RELEASE_NOTES.md b/sale_donation_website/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..b91906874 --- /dev/null +++ b/sale_donation_website/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.05.2025 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Website Sale Donation \ No newline at end of file diff --git a/sale_donation_website/models/__init__.py b/sale_donation_website/models/__init__.py new file mode 100644 index 000000000..82cf1fb28 --- /dev/null +++ b/sale_donation_website/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 donation_lines +from . import donation_rule +from . import sale_order +from . import sale_order_line diff --git a/sale_donation_website/models/donation_lines.py b/sale_donation_website/models/donation_lines.py new file mode 100644 index 000000000..84610d57b --- /dev/null +++ b/sale_donation_website/models/donation_lines.py @@ -0,0 +1,38 @@ +## -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 fields, models + + +class DonationLines(models.Model): + """Creating donation lines model.""" + _name = "donation.lines" + _description = "Donation Lines" + + partner_id = fields.Many2one('res.partner',string="Partner", + help="Partner name") + sale = fields.Char(string="Sale", help="Sale order number") + donation = fields.Many2one('donation.rule', string="Donation", + help="Name of the donation") + date = fields.Datetime(string="Date", help="Date") + donated_amount = fields.Float(string="Donated Amount", + help="Donated Amount") + website = fields.Many2one('website', string="Website", help="Website") diff --git a/sale_donation_website/models/donation_rule.py b/sale_donation_website/models/donation_rule.py new file mode 100644 index 000000000..ab7dc69d9 --- /dev/null +++ b/sale_donation_website/models/donation_rule.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 fields, models + + +class DonationRule(models.Model): + """Creating donation rule model.""" + _name = "donation.rule" + _description = "Donation Rule" + + name = fields.Char(string="Donation Name", help="Name of the Donation") + amount = fields.Float(string="Amount", help="Amount") + website_ids = fields.Many2many('website', string="Website", help="Website name") + ask_to_donate = fields.Boolean(string="Ask To Donate", help="Asking for donation") diff --git a/sale_donation_website/models/sale_order.py b/sale_donation_website/models/sale_order.py new file mode 100644 index 000000000..ca15c7e19 --- /dev/null +++ b/sale_donation_website/models/sale_order.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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, fields, models + + +class SaleOrder(models.Model): + """Inheriting sale order""" + _inherit = 'sale.order' + + donation_ids = fields.Many2many('donation.rule', string="Donation", + help="Donation choose from rules") + donation_amount = fields.Float(string='Donation Amount', + compute="_compute_donation_amount", + help='Donation Amount enter', default=0.00) + + @api.depends('donation_ids') + def _compute_donation_amount(self): + """To compute donation amount""" + if self.donation_ids: + for rec in self.donation_ids: + self.donation_amount = self.donation_amount + rec.amount + else: + self.donation_amount = 0.00 + + def action_confirm(self): + """To create donation lines when confirming a sale order""" + res = super(SaleOrder, self).action_confirm() + donation_product = self.env['product.product'].search( + [('name', '=', 'Donate')]) + for donation in self.donation_ids: + if donation_product in self.order_line.mapped('product_id'): + values = { + 'partner_id': self.partner_id.id, + 'sale': self.name, + 'donation': donation.id, + 'date': self.date_order, + 'donated_amount': donation.amount, + 'website': self.website_id.id + } + donation.env['donation.lines'].create(values) + return res diff --git a/sale_donation_website/models/sale_order_line.py b/sale_donation_website/models/sale_order_line.py new file mode 100644 index 000000000..4aff3d525 --- /dev/null +++ b/sale_donation_website/models/sale_order_line.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 fields, models + + +class SaleOrderLine(models.Model): + """Inheriting sale order line""" + _inherit = 'sale.order.line' + + is_donation = fields.Boolean(string="Is a Donation", default=False + , help="Check if donation") diff --git a/sale_donation_website/security/ir.model.access.csv b/sale_donation_website/security/ir.model.access.csv new file mode 100644 index 000000000..fc3f34e1d --- /dev/null +++ b/sale_donation_website/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_donation_rule,donation_rule,model_donation_rule,base.group_user,1,1,1,1 +access_donation_lines,donation_lines,model_donation_lines,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/sale_donation_website/static/description/assets/icons/check.png b/sale_donation_website/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/check.png differ diff --git a/sale_donation_website/static/description/assets/icons/chevron.png b/sale_donation_website/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/chevron.png differ diff --git a/sale_donation_website/static/description/assets/icons/cogs.png b/sale_donation_website/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/cogs.png differ diff --git a/sale_donation_website/static/description/assets/icons/consultation.png b/sale_donation_website/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/consultation.png differ diff --git a/sale_donation_website/static/description/assets/icons/ecom-black.png b/sale_donation_website/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/ecom-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/education-black.png b/sale_donation_website/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/education-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/hotel-black.png b/sale_donation_website/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/hotel-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/license.png b/sale_donation_website/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/license.png differ diff --git a/sale_donation_website/static/description/assets/icons/lifebuoy.png b/sale_donation_website/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/lifebuoy.png differ diff --git a/sale_donation_website/static/description/assets/icons/logo.png b/sale_donation_website/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/logo.png differ diff --git a/sale_donation_website/static/description/assets/icons/manufacturing-black.png b/sale_donation_website/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/manufacturing-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/pos-black.png b/sale_donation_website/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/pos-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/puzzle.png b/sale_donation_website/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/puzzle.png differ diff --git a/sale_donation_website/static/description/assets/icons/restaurant-black.png b/sale_donation_website/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/restaurant-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/service-black.png b/sale_donation_website/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/service-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/trading-black.png b/sale_donation_website/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/trading-black.png differ diff --git a/sale_donation_website/static/description/assets/icons/training.png b/sale_donation_website/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/training.png differ diff --git a/sale_donation_website/static/description/assets/icons/update.png b/sale_donation_website/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/update.png differ diff --git a/sale_donation_website/static/description/assets/icons/user.png b/sale_donation_website/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/user.png differ diff --git a/sale_donation_website/static/description/assets/icons/wrench.png b/sale_donation_website/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/sale_donation_website/static/description/assets/icons/wrench.png differ diff --git a/sale_donation_website/static/description/assets/modules/budget_image.png b/sale_donation_website/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/sale_donation_website/static/description/assets/modules/budget_image.png differ diff --git a/sale_donation_website/static/description/assets/modules/credit_image.png b/sale_donation_website/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/sale_donation_website/static/description/assets/modules/credit_image.png differ diff --git a/sale_donation_website/static/description/assets/modules/employee_image.png b/sale_donation_website/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/sale_donation_website/static/description/assets/modules/employee_image.png differ diff --git a/sale_donation_website/static/description/assets/modules/export_image.png b/sale_donation_website/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/sale_donation_website/static/description/assets/modules/export_image.png differ diff --git a/sale_donation_website/static/description/assets/modules/gantt_image.png b/sale_donation_website/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/sale_donation_website/static/description/assets/modules/gantt_image.png differ diff --git a/sale_donation_website/static/description/assets/modules/quotation_image.png b/sale_donation_website/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/sale_donation_website/static/description/assets/modules/quotation_image.png differ diff --git a/sale_donation_website/static/description/assets/screenshots.zip b/sale_donation_website/static/description/assets/screenshots.zip new file mode 100644 index 000000000..d3d50d153 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots.zip differ diff --git a/sale_donation_website/static/description/assets/screenshots/donation_lines.png b/sale_donation_website/static/description/assets/screenshots/donation_lines.png new file mode 100644 index 000000000..953a91962 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/donation_lines.png differ diff --git a/sale_donation_website/static/description/assets/screenshots/donation_rule.png b/sale_donation_website/static/description/assets/screenshots/donation_rule.png new file mode 100644 index 000000000..387e13dd1 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/donation_rule.png differ diff --git a/sale_donation_website/static/description/assets/screenshots/donation_sale.png b/sale_donation_website/static/description/assets/screenshots/donation_sale.png new file mode 100644 index 000000000..51b5067cc Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/donation_sale.png differ diff --git a/sale_donation_website/static/description/assets/screenshots/donation_website.png b/sale_donation_website/static/description/assets/screenshots/donation_website.png new file mode 100644 index 000000000..0f55a31e6 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/donation_website.png differ diff --git a/sale_donation_website/static/description/assets/screenshots/donation_website_adding.png b/sale_donation_website/static/description/assets/screenshots/donation_website_adding.png new file mode 100644 index 000000000..3cbe2767e Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/donation_website_adding.png differ diff --git a/sale_donation_website/static/description/assets/screenshots/donation_website_computed.png b/sale_donation_website/static/description/assets/screenshots/donation_website_computed.png new file mode 100644 index 000000000..4b8963c32 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/donation_website_computed.png differ diff --git a/sale_donation_website/static/description/assets/screenshots/hero.gif b/sale_donation_website/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..4e6dead49 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/hero.gif differ diff --git a/sale_donation_website/static/description/assets/screenshots/menu_donation.png b/sale_donation_website/static/description/assets/screenshots/menu_donation.png new file mode 100644 index 000000000..bb7f3f077 Binary files /dev/null and b/sale_donation_website/static/description/assets/screenshots/menu_donation.png differ diff --git a/sale_donation_website/static/description/banner.jpg b/sale_donation_website/static/description/banner.jpg new file mode 100644 index 000000000..f9410163b Binary files /dev/null and b/sale_donation_website/static/description/banner.jpg differ diff --git a/sale_donation_website/static/description/icon.png b/sale_donation_website/static/description/icon.png new file mode 100644 index 000000000..4d4fb619f Binary files /dev/null and b/sale_donation_website/static/description/icon.png differ diff --git a/sale_donation_website/static/description/index.html b/sale_donation_website/static/description/index.html new file mode 100644 index 000000000..592ff09dc --- /dev/null +++ b/sale_donation_website/static/description/index.html @@ -0,0 +1,495 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+ +
+
+
+

+ Website Sale Donation +

+

+ This module allows to create donation +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ This module crafted by Cybrosys Technologies will help you to collect funds for charity and help needy people. . +

+
+
+ +
+
+

+ Features +

+
+
+
+ +
+
+

+ Customer can add donation.

+
+
+
+
+ +
+
+

+ Customer can also donate for multiple issues.

+ +
+
+
+ +
+
+

+ Screenshots +

+
+
+

+ Menu for creating donation. +

+ +
+
+

+ Can create Donation rules. +

+ +
+
+

+ Created donation rules are visible in the website. +

+ +
+
+

+ Can select the donations. +

+ +
+
+

+ The donation amount will be calculated based on the selected donations. +

+ +
+
+

+ The donation lines will be added in the sale order. +

+ +
+
+

+ When confirming the sale order the donation lines are created. +

+ +
+
+ + +
+
+

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?

+
+
+
+ + +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
diff --git a/sale_donation_website/static/src/js/website_sale_donation.js b/sale_donation_website/static/src/js/website_sale_donation.js new file mode 100755 index 000000000..85c0863ba --- /dev/null +++ b/sale_donation_website/static/src/js/website_sale_donation.js @@ -0,0 +1,24 @@ +//To pass selected donations in to the sale order +odoo.define('sale_donation_website.donation', function(require) { + "use strict"; + var publicWidget = require('web.public.widget'); + publicWidget.registry.donation = publicWidget.Widget.extend({ + selector: '.donation', + events: { + 'change .form-check-input': '_onCheckDonation', + }, + _onCheckDonation: function (ev) { + var donation = $(ev.currentTarget); + var isChecked = donation.is(':checked'); + this._rpc({ + route: '/shop/update_donation', + params: { + donation_id: donation.val(), + checked: isChecked, + }, + }); + }, + }); + var donationButton = $('button[name="donation_submit_button"]'); + donationButton.click(function() { window.location.reload(); }); +}); diff --git a/sale_donation_website/views/donation_lines_views.xml b/sale_donation_website/views/donation_lines_views.xml new file mode 100644 index 000000000..299363d47 --- /dev/null +++ b/sale_donation_website/views/donation_lines_views.xml @@ -0,0 +1,24 @@ + + + + + donation.lines.tree + donation.lines + + + + + + + + + + + + + + Donation Lines + donation.lines + tree + + diff --git a/sale_donation_website/views/donation_menu.xml b/sale_donation_website/views/donation_menu.xml new file mode 100644 index 000000000..23286af74 --- /dev/null +++ b/sale_donation_website/views/donation_menu.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/sale_donation_website/views/donation_rule_views.xml b/sale_donation_website/views/donation_rule_views.xml new file mode 100644 index 000000000..a36a18f00 --- /dev/null +++ b/sale_donation_website/views/donation_rule_views.xml @@ -0,0 +1,44 @@ + + + + + donation.rule.form + donation.rule + +
+ + + + + + + + + + + + + +
+
+
+ + + donation.rule.tree + donation.rule + + + + + + + + + + + + Donation + donation.rule + tree,form + +
diff --git a/sale_donation_website/views/sale_order_views.xml b/sale_donation_website/views/sale_order_views.xml new file mode 100644 index 000000000..fbc4def4e --- /dev/null +++ b/sale_donation_website/views/sale_order_views.xml @@ -0,0 +1,16 @@ + + + + + Add Donation in Sale Order + sale.order + + + + + + + + + + diff --git a/sale_donation_website/views/website_sale_donation_views.xml b/sale_donation_website/views/website_sale_donation_views.xml new file mode 100644 index 000000000..bdcdfa81b --- /dev/null +++ b/sale_donation_website/views/website_sale_donation_views.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + \ No newline at end of file