diff --git a/products_price_history/README.rst b/products_price_history/README.rst new file mode 100644 index 000000000..768f809b5 --- /dev/null +++ b/products_price_history/README.rst @@ -0,0 +1,42 @@ +Products/Variants Purchase Price history +========================================= +* To get the history of purchase price history of products/Variants for Odoo 15 community and enterprise editions + +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 +------- +* Developer: +(v15) Swapna V @ 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/products_price_history/__init__.py b/products_price_history/__init__.py new file mode 100644 index 000000000..dce1af1e1 --- /dev/null +++ b/products_price_history/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################### + +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Swapna V() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + + +from . import wizard +from . import models diff --git a/products_price_history/__manifest__.py b/products_price_history/__manifest__.py new file mode 100644 index 000000000..c428aae22 --- /dev/null +++ b/products_price_history/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +################################################################################### + +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Swapna V () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +{ + 'name': "Products/Variants Purchase Price History", + 'summary': """Purchase price history report of products/variants """, + 'description': """Purchase price history report of products/variants""", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'maintainer': "Cybrosys Techno Solutions", + 'category': 'Purchase', + 'version': '15.0.1.0.0', + 'depends': [ + 'base', + 'product', + 'purchase', + 'stock', + ], + 'data': [ + 'security/ir.model.access.csv', + 'wizard/purchase_line_wiz.xml', + 'reports/report.xml', + 'reports/pdf_report_template.xml', + 'views/product_product_inherit.xml', + 'views/product_template_inherit.xml', + 'views/purchase_order_inherit.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + +} diff --git a/products_price_history/doc/RELEASE_NOTES.md b/products_price_history/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e8f4087e2 --- /dev/null +++ b/products_price_history/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 20.06.2021 +#### Version 15.0.1.0.0 +##### ADD +- Initial commit for products_price_history + diff --git a/products_price_history/models/__init__.py b/products_price_history/models/__init__.py new file mode 100644 index 000000000..6dfbb000b --- /dev/null +++ b/products_price_history/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### + +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Swapna V () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import purchase_order \ No newline at end of file diff --git a/products_price_history/models/purchase_order.py b/products_price_history/models/purchase_order.py new file mode 100644 index 000000000..3002d1f17 --- /dev/null +++ b/products_price_history/models/purchase_order.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +################################################################################### + +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Swapna V () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import models, fields, api + + +class POLineHistory(models.TransientModel): + _name = "po.line.history" + + order_id = fields.Many2one('purchase.order') + product = fields.Many2one('product.product') + po_order = fields.Many2one('purchase.order', string="Purchase Order") + unit_price = fields.Float(string="Unit Price") + quantity = fields.Float(string="Quantity") + + def reorder_product(self): + order_line_list = self.env['purchase.order'].browse(self.order_id.id) + ol_list = order_line_list.order_line.ids + po_line = self.env['purchase.order.line'].create({ + 'order_id': self.order_id.id, + 'product_id': self.product.id, + 'name': self.product.name, + 'product_qty': self.quantity, + 'price_unit': self.unit_price, + }) + ol_list.append(po_line.id) + + +class PurchaseOrder(models.Model): + _inherit = "purchase.order" + + purchase_history_lines = fields.One2many('po.line.history', 'order_id', string="Purchases") + + @api.model + def create(self, vals): + res = super(PurchaseOrder, self).create(vals) + history = [] + for line in res: + for record in line.order_line: + domain = record.product_id.id + PurchaseHistoryLines = self.env['purchase.order'].search([('order_line.product_id', '=', domain)]) + for rec in PurchaseHistoryLines: + for m in rec.order_line: + po_order_id = rec.id + product = m.product_id.id + quantity = m.product_qty + price_unit = m.price_unit + data = self.env['po.line.history'].create({ + 'unit_price': price_unit, + 'po_order': po_order_id, + 'product': product, + 'quantity': quantity, + 'order_id': res.id, + }).id + history.append(data) + if history: + res.write({'purchase_history_lines': history}) + return res diff --git a/products_price_history/reports/pdf_report_template.xml b/products_price_history/reports/pdf_report_template.xml new file mode 100644 index 000000000..d15c0948d --- /dev/null +++ b/products_price_history/reports/pdf_report_template.xml @@ -0,0 +1,74 @@ + + + + + + + \ No newline at end of file diff --git a/products_price_history/reports/report.xml b/products_price_history/reports/report.xml new file mode 100644 index 000000000..7095dca25 --- /dev/null +++ b/products_price_history/reports/report.xml @@ -0,0 +1,19 @@ + + + + + Purchase Price History + product.template + qweb-pdf + products_price_history.report_purchase_price_history + products_price_history.report_purchase_price_history + + + Purchase Price History + product.product + qweb-pdf + products_price_history.report_purchase_price_history_product_product + products_price_history.report_purchase_price_history_product_product + + + \ No newline at end of file diff --git a/products_price_history/security/ir.model.access.csv b/products_price_history/security/ir.model.access.csv new file mode 100644 index 000000000..fea90c68f --- /dev/null +++ b/products_price_history/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_purchaseline_history_wizard,access.purchaseline.history.wizard,model_purchaseline_history_wizard,,1,1,1,1 +access_purchase_order_line_history,access.purchase.order.line.history,model_purchase_order_line_history,,1,1,1,1 +access_po_line_history,access.po.line.history,model_po_line_history,,1,1,1,1 \ No newline at end of file diff --git a/products_price_history/static/description/assets/icons/check.png b/products_price_history/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/products_price_history/static/description/assets/icons/check.png differ diff --git a/products_price_history/static/description/assets/icons/chevron.png b/products_price_history/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/products_price_history/static/description/assets/icons/chevron.png differ diff --git a/products_price_history/static/description/assets/icons/cogs.png b/products_price_history/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/products_price_history/static/description/assets/icons/cogs.png differ diff --git a/products_price_history/static/description/assets/icons/consultation.png b/products_price_history/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/products_price_history/static/description/assets/icons/consultation.png differ diff --git a/products_price_history/static/description/assets/icons/ecom-black.png b/products_price_history/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/products_price_history/static/description/assets/icons/ecom-black.png differ diff --git a/products_price_history/static/description/assets/icons/education-black.png b/products_price_history/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/products_price_history/static/description/assets/icons/education-black.png differ diff --git a/products_price_history/static/description/assets/icons/hotel-black.png b/products_price_history/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/products_price_history/static/description/assets/icons/hotel-black.png differ diff --git a/products_price_history/static/description/assets/icons/license.png b/products_price_history/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/products_price_history/static/description/assets/icons/license.png differ diff --git a/products_price_history/static/description/assets/icons/lifebuoy.png b/products_price_history/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/products_price_history/static/description/assets/icons/lifebuoy.png differ diff --git a/products_price_history/static/description/assets/icons/logo.png b/products_price_history/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/products_price_history/static/description/assets/icons/logo.png differ diff --git a/products_price_history/static/description/assets/icons/manufacturing-black.png b/products_price_history/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/products_price_history/static/description/assets/icons/manufacturing-black.png differ diff --git a/products_price_history/static/description/assets/icons/pos-black.png b/products_price_history/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/products_price_history/static/description/assets/icons/pos-black.png differ diff --git a/products_price_history/static/description/assets/icons/puzzle.png b/products_price_history/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/products_price_history/static/description/assets/icons/puzzle.png differ diff --git a/products_price_history/static/description/assets/icons/restaurant-black.png b/products_price_history/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/products_price_history/static/description/assets/icons/restaurant-black.png differ diff --git a/products_price_history/static/description/assets/icons/service-black.png b/products_price_history/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/products_price_history/static/description/assets/icons/service-black.png differ diff --git a/products_price_history/static/description/assets/icons/trading-black.png b/products_price_history/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/products_price_history/static/description/assets/icons/trading-black.png differ diff --git a/products_price_history/static/description/assets/icons/training.png b/products_price_history/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/products_price_history/static/description/assets/icons/training.png differ diff --git a/products_price_history/static/description/assets/icons/update.png b/products_price_history/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/products_price_history/static/description/assets/icons/update.png differ diff --git a/products_price_history/static/description/assets/icons/user.png b/products_price_history/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/products_price_history/static/description/assets/icons/user.png differ diff --git a/products_price_history/static/description/assets/icons/wrench.png b/products_price_history/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/products_price_history/static/description/assets/icons/wrench.png differ diff --git a/products_price_history/static/description/assets/modules/budget_image.png b/products_price_history/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/products_price_history/static/description/assets/modules/budget_image.png differ diff --git a/products_price_history/static/description/assets/modules/credit_image.png b/products_price_history/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/products_price_history/static/description/assets/modules/credit_image.png differ diff --git a/products_price_history/static/description/assets/modules/employee_image.png b/products_price_history/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/products_price_history/static/description/assets/modules/employee_image.png differ diff --git a/products_price_history/static/description/assets/modules/export_image.png b/products_price_history/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/products_price_history/static/description/assets/modules/export_image.png differ diff --git a/products_price_history/static/description/assets/modules/gantt_image.png b/products_price_history/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/products_price_history/static/description/assets/modules/gantt_image.png differ diff --git a/products_price_history/static/description/assets/modules/quotation_image.png b/products_price_history/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/products_price_history/static/description/assets/modules/quotation_image.png differ diff --git a/products_price_history/static/description/assets/screenshots/hero.gif b/products_price_history/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..7ccdf7e2f Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/hero.gif differ diff --git a/products_price_history/static/description/assets/screenshots/image1.png b/products_price_history/static/description/assets/screenshots/image1.png new file mode 100644 index 000000000..1bee66473 Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image1.png differ diff --git a/products_price_history/static/description/assets/screenshots/image2.png b/products_price_history/static/description/assets/screenshots/image2.png new file mode 100644 index 000000000..eee64fd9f Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image2.png differ diff --git a/products_price_history/static/description/assets/screenshots/image3.png b/products_price_history/static/description/assets/screenshots/image3.png new file mode 100644 index 000000000..53f9b95f9 Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image3.png differ diff --git a/products_price_history/static/description/assets/screenshots/image4.png b/products_price_history/static/description/assets/screenshots/image4.png new file mode 100644 index 000000000..88f7bbb73 Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image4.png differ diff --git a/products_price_history/static/description/assets/screenshots/image5.png b/products_price_history/static/description/assets/screenshots/image5.png new file mode 100644 index 000000000..ea2aeb361 Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image5.png differ diff --git a/products_price_history/static/description/assets/screenshots/image6.png b/products_price_history/static/description/assets/screenshots/image6.png new file mode 100644 index 000000000..58dacac74 Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image6.png differ diff --git a/products_price_history/static/description/assets/screenshots/image7.png b/products_price_history/static/description/assets/screenshots/image7.png new file mode 100644 index 000000000..fafd1eece Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image7.png differ diff --git a/products_price_history/static/description/assets/screenshots/image8.png b/products_price_history/static/description/assets/screenshots/image8.png new file mode 100644 index 000000000..3b758df66 Binary files /dev/null and b/products_price_history/static/description/assets/screenshots/image8.png differ diff --git a/products_price_history/static/description/banner.png b/products_price_history/static/description/banner.png new file mode 100644 index 000000000..5e662de41 Binary files /dev/null and b/products_price_history/static/description/banner.png differ diff --git a/products_price_history/static/description/icon.png b/products_price_history/static/description/icon.png new file mode 100644 index 000000000..f732b8ebd Binary files /dev/null and b/products_price_history/static/description/icon.png differ diff --git a/products_price_history/static/description/index.html b/products_price_history/static/description/index.html new file mode 100644 index 000000000..f2a3c174f --- /dev/null +++ b/products_price_history/static/description/index.html @@ -0,0 +1,618 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Products / Variants Purchase Price History

+

+ Purchase price history of products/variants and print reports +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ In this app, we get purchase price history of each products and its variants. Also we can take a report + of that history data. History is availble in PO. There is a facility to reorder the line to the PO + line.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Take purchase history in to a one2many field

+
+
+ +
+
+ +
+
+

+ pdf report analysis

+
+
+ +
+
+ +
+
+

+ Can reorder the line from history page of PO

+
+
+ +
+
+ +
+
+

+ Available in both community & enterprise

+
+
+ +
+ +
+
+

+ Screenshots +

+
+
+

+ Here we can see "Purchase price history report" option under actions.

+ +
+ +
+

+ Here we can see the history of purchase price history(tree view). +

+ +
+ +
+

+ There is a button to take pdf prints.

+ +
+ +
+

+ This is the normal pdf layout.

+ +
+ +
+

+ Purchase price history is available in PO. Here we get all the PO details of ordered products.

+ +
+ +
+

+ This is the button to reorder the line.

+ +
+ +
+

+ click on the reorder button.

+ +
+ +
+

+ We can see that the line is updated.

+ +
+ +
+ +
+
+

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/products_price_history/views/product_product_inherit.xml b/products_price_history/views/product_product_inherit.xml new file mode 100644 index 000000000..42faa7299 --- /dev/null +++ b/products_price_history/views/product_product_inherit.xml @@ -0,0 +1,13 @@ + + + + + Purchase Price History Report + purchaseline.history.wizard + form + + + new + + + \ No newline at end of file diff --git a/products_price_history/views/product_template_inherit.xml b/products_price_history/views/product_template_inherit.xml new file mode 100644 index 000000000..2cc6b6a50 --- /dev/null +++ b/products_price_history/views/product_template_inherit.xml @@ -0,0 +1,13 @@ + + + + + Purchase Price History Report + purchaseline.history.wizard + form + + + new + + + \ No newline at end of file diff --git a/products_price_history/views/purchase_order_inherit.xml b/products_price_history/views/purchase_order_inherit.xml new file mode 100644 index 000000000..29d3d20b7 --- /dev/null +++ b/products_price_history/views/purchase_order_inherit.xml @@ -0,0 +1,29 @@ + + + + + purchase.order.form.inherit + purchase.order + + + + + + + + + + + +