diff --git a/customer_so_history/README.rst b/customer_so_history/README.rst new file mode 100644 index 000000000..7011af390 --- /dev/null +++ b/customer_so_history/README.rst @@ -0,0 +1,42 @@ +Customer Sale Order History +========================== +* Customer Sale Order History 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/13.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: +Athul @ 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/customer_so_history/__init__.py b/customer_so_history/__init__.py new file mode 100644 index 000000000..3367fdfdb --- /dev/null +++ b/customer_so_history/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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/customer_so_history/__manifest__.py b/customer_so_history/__manifest__.py new file mode 100644 index 000000000..568a8b0c0 --- /dev/null +++ b/customer_so_history/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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': 'Customer Sale Order History', + 'version': '15.0.1.0.0', + 'summary': 'Customer Sale Order History for Odoo 15', + 'description': """Customer Sale Order History for Odoo 15""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'category': 'Sales', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management'], + 'data': [ + 'security/ir.model.access.csv', + 'views/sale_order_inherit.xml' + ], + 'images': ['static/description/banner.png'], + 'installable': True, + 'application': True, + 'license': 'LGPL-3', +} diff --git a/customer_so_history/doc/RELEASE_NOTES.md b/customer_so_history/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e02f1d228 --- /dev/null +++ b/customer_so_history/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 16.5.2022 +#### Version 15.0.1.0.0 +##### ADD +- Initial Commit for customer_so_hostory diff --git a/customer_so_history/models/__init__.py b/customer_so_history/models/__init__.py new file mode 100644 index 000000000..f91ea1044 --- /dev/null +++ b/customer_so_history/models/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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/customer_so_history/models/sale_order.py b/customer_so_history/models/sale_order.py new file mode 100644 index 000000000..d1f1a2771 --- /dev/null +++ b/customer_so_history/models/sale_order.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-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 fields, models, api + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + order_details_ids = fields.One2many('order.history.line', 'order_id') + + @api.onchange('partner_id') + def sale_order_domain(self): + self.write({'order_details_ids': [(5,)]}) + new_lines = [] + lines = self.env['sale.order.line'].search( + [('order_id.partner_id', '=', self.partner_id.id), ('order_id.state', 'in', ('sale', 'done'))]) + for rec in lines: + new_lines.append((0, 0, { + 'name': rec.order_id.name, + 'product_id': rec.product_id, + 'product_uom_qty': rec.product_uom_qty, + 'price_unit': rec.price_unit, + 'tax_id': rec.tax_id, + 'price_subtotal': rec.price_subtotal + })) + self.write({'order_details_ids': new_lines}) + + +class OrderHistoryLine(models.Model): + _name = 'order.history.line' + _description = 'Order History Line' + + order_id = fields.Many2one('sale.order') + name = fields.Char('Order') + product_id = fields.Many2one('product.product') + product_uom_qty = fields.Integer('Quantity') + price_unit = fields.Integer('Unit price') + tax_id = fields.Many2many('account.tax') + company_id = fields.Many2one('res.company',default=lambda self: self.env.company) + price_subtotal = fields.Integer(string='Subtotal') + + def action_add(self): + vals = { + 'order_id': self.order_id.id, + 'product_id': self.product_id.id, + 'product_uom_qty': self.product_uom_qty, + 'price_unit': self.price_unit, + 'tax_id': self.tax_id.id, + 'price_subtotal': self.price_subtotal, + 'company_id':self.company_id, + } + self.env['sale.order.line'].sudo().create(vals) diff --git a/customer_so_history/security/ir.model.access.csv b/customer_so_history/security/ir.model.access.csv new file mode 100644 index 000000000..5a01a5c9b --- /dev/null +++ b/customer_so_history/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_order_history_line,access.order.history.line,model_order_history_line,,1,1,1,1 diff --git a/customer_so_history/static/description/assets/icons/check.png b/customer_so_history/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/customer_so_history/static/description/assets/icons/check.png differ diff --git a/customer_so_history/static/description/assets/icons/chevron.png b/customer_so_history/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/chevron.png differ diff --git a/customer_so_history/static/description/assets/icons/cogs.png b/customer_so_history/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/cogs.png differ diff --git a/customer_so_history/static/description/assets/icons/consultation.png b/customer_so_history/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/customer_so_history/static/description/assets/icons/consultation.png differ diff --git a/customer_so_history/static/description/assets/icons/ecom-black.png b/customer_so_history/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/ecom-black.png differ diff --git a/customer_so_history/static/description/assets/icons/education-black.png b/customer_so_history/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/customer_so_history/static/description/assets/icons/education-black.png differ diff --git a/customer_so_history/static/description/assets/icons/hotel-black.png b/customer_so_history/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/customer_so_history/static/description/assets/icons/hotel-black.png differ diff --git a/customer_so_history/static/description/assets/icons/license.png b/customer_so_history/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/customer_so_history/static/description/assets/icons/license.png differ diff --git a/customer_so_history/static/description/assets/icons/lifebuoy.png b/customer_so_history/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/customer_so_history/static/description/assets/icons/lifebuoy.png differ diff --git a/customer_so_history/static/description/assets/icons/logo.png b/customer_so_history/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/customer_so_history/static/description/assets/icons/logo.png differ diff --git a/customer_so_history/static/description/assets/icons/manufacturing-black.png b/customer_so_history/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/customer_so_history/static/description/assets/icons/manufacturing-black.png differ diff --git a/customer_so_history/static/description/assets/icons/pos-black.png b/customer_so_history/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/pos-black.png differ diff --git a/customer_so_history/static/description/assets/icons/puzzle.png b/customer_so_history/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/puzzle.png differ diff --git a/customer_so_history/static/description/assets/icons/restaurant-black.png b/customer_so_history/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/restaurant-black.png differ diff --git a/customer_so_history/static/description/assets/icons/service-black.png b/customer_so_history/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/customer_so_history/static/description/assets/icons/service-black.png differ diff --git a/customer_so_history/static/description/assets/icons/trading-black.png b/customer_so_history/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/customer_so_history/static/description/assets/icons/trading-black.png differ diff --git a/customer_so_history/static/description/assets/icons/training.png b/customer_so_history/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/customer_so_history/static/description/assets/icons/training.png differ diff --git a/customer_so_history/static/description/assets/icons/update.png b/customer_so_history/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/customer_so_history/static/description/assets/icons/update.png differ diff --git a/customer_so_history/static/description/assets/icons/user.png b/customer_so_history/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/customer_so_history/static/description/assets/icons/user.png differ diff --git a/customer_so_history/static/description/assets/icons/wrench.png b/customer_so_history/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/customer_so_history/static/description/assets/icons/wrench.png differ diff --git a/customer_so_history/static/description/assets/modules/budget_image.png b/customer_so_history/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/customer_so_history/static/description/assets/modules/budget_image.png differ diff --git a/customer_so_history/static/description/assets/modules/credit_image.png b/customer_so_history/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/customer_so_history/static/description/assets/modules/credit_image.png differ diff --git a/customer_so_history/static/description/assets/modules/employee_image.png b/customer_so_history/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/customer_so_history/static/description/assets/modules/employee_image.png differ diff --git a/customer_so_history/static/description/assets/modules/export_image.png b/customer_so_history/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/customer_so_history/static/description/assets/modules/export_image.png differ diff --git a/customer_so_history/static/description/assets/modules/gantt_image.png b/customer_so_history/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/customer_so_history/static/description/assets/modules/gantt_image.png differ diff --git a/customer_so_history/static/description/assets/modules/quotation_image.png b/customer_so_history/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/customer_so_history/static/description/assets/modules/quotation_image.png differ diff --git a/customer_so_history/static/description/assets/screenshots/add.png b/customer_so_history/static/description/assets/screenshots/add.png new file mode 100644 index 000000000..cce367c70 Binary files /dev/null and b/customer_so_history/static/description/assets/screenshots/add.png differ diff --git a/customer_so_history/static/description/assets/screenshots/hero.gif b/customer_so_history/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..1f8bd659c Binary files /dev/null and b/customer_so_history/static/description/assets/screenshots/hero.gif differ diff --git a/customer_so_history/static/description/assets/screenshots/history.png b/customer_so_history/static/description/assets/screenshots/history.png new file mode 100644 index 000000000..f9cd513cf Binary files /dev/null and b/customer_so_history/static/description/assets/screenshots/history.png differ diff --git a/customer_so_history/static/description/banner.png b/customer_so_history/static/description/banner.png new file mode 100644 index 000000000..a49d2394c Binary files /dev/null and b/customer_so_history/static/description/banner.png differ diff --git a/customer_so_history/static/description/icon.png b/customer_so_history/static/description/icon.png new file mode 100644 index 000000000..0b97d0fe8 Binary files /dev/null and b/customer_so_history/static/description/icon.png differ diff --git a/customer_so_history/static/description/images/checked.png b/customer_so_history/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/customer_so_history/static/description/images/checked.png differ diff --git a/customer_so_history/static/description/images/cybrosys.png b/customer_so_history/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/customer_so_history/static/description/images/cybrosys.png differ diff --git a/customer_so_history/static/description/index.html b/customer_so_history/static/description/index.html new file mode 100644 index 000000000..6ea5696fb --- /dev/null +++ b/customer_so_history/static/description/index.html @@ -0,0 +1,581 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Customer Sale Order History

+

+ shows customer's sale order history +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ The module helps you to show customer's sale order history. +

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Sale Order History

+

+

+
+
+
+
+ +
+
+

+ Directly add products into Sale order line from History

+

+

+
+
+
+
+

+ Screenshots +

+
+
+

+ Shows the previous sale order history of selected Customer +

+

+ + +

+
+

+ Using 'Add' users can add products directly into Sale order Line +

+

+ + +

+
+ +
+
+

Suggested Products

+
+ + +
+
+
+
\ No newline at end of file diff --git a/customer_so_history/views/sale_order_inherit.xml b/customer_so_history/views/sale_order_inherit.xml new file mode 100644 index 000000000..f43729bdd --- /dev/null +++ b/customer_so_history/views/sale_order_inherit.xml @@ -0,0 +1,27 @@ + + + + Sale Order History + sale.order + + + + + + + + + + + + + +