diff --git a/product_price_update_advanced/README.rst b/product_price_update_advanced/README.rst new file mode 100644 index 000000000..92ee55da3 --- /dev/null +++ b/product_price_update_advanced/README.rst @@ -0,0 +1,25 @@ +Product Price Update v11 +======================== + +Product price update is an effective module which helps to update the price of any product. +We can update sale price and cost price of any product on a single click. + +Installation +============ + +Just select it from available modules to install it, there is no need to extra installations. + +Configuration +============= + +Nothing to configure. + + +Credits +======= +* Cybrosys Techno Solutions, https://www.cybrosys.com + +Author +------ +* v10 : Saritha Sahadevan +* v11 : Niyas Raphy diff --git a/product_price_update_advanced/__init__.py b/product_price_update_advanced/__init__.py new file mode 100644 index 000000000..d5883b592 --- /dev/null +++ b/product_price_update_advanced/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################### +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies ().# +# 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 models + + diff --git a/product_price_update_advanced/__manifest__.py b/product_price_update_advanced/__manifest__.py new file mode 100644 index 000000000..c045a840f --- /dev/null +++ b/product_price_update_advanced/__manifest__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +################################################################################### +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies ().# +# 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': "Advanced Product Price Update", + 'version': '11.0.1.0.0', + 'summary': """User Can Easily Update Cost Price/Sale Price of Products""", + 'description': """This module updates price of any product on single click""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.Cybrosys.com", + 'category': 'Tools', + 'depends': ['base', 'sale'], + 'data': [ + 'views/product_price_view.xml' + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/product_price_update_advanced/models/__init__.py b/product_price_update_advanced/models/__init__.py new file mode 100644 index 000000000..3993ab5ca --- /dev/null +++ b/product_price_update_advanced/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import product_price diff --git a/product_price_update_advanced/models/product_price.py b/product_price_update_advanced/models/product_price.py new file mode 100644 index 000000000..61d6f8a2b --- /dev/null +++ b/product_price_update_advanced/models/product_price.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api, _ + + +class ProductPrice(models.TransientModel): + _name = 'product.price' + + name = fields.Many2one('product.template', string="Product", required=True) + sale_price = fields.Integer(string="Sale Price", required=True) + cost_price = fields.Integer(string="Cost Price", required=True) + + def change_product_price(self): + prod_obj = self.env['product.template'].search([('id', '=', self.name.id)]) + prod_value = {'list_price': self.sale_price, 'standard_price': self.cost_price} + prod_obj.write(prod_value) + return { + 'name': _('Products'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'product.template', + 'type': 'ir.actions.act_window', + 'res_id': prod_obj.id, + 'context': self.env.context + } + + @api.onchange('name') + def get_price(self): + prod_obj = self.env['product.template'].search([('name', '=', self.name.name)]) + self.sale_price = prod_obj.list_price + self.cost_price = prod_obj.standard_price + + + diff --git a/product_price_update_advanced/static/description/banner.jpg b/product_price_update_advanced/static/description/banner.jpg new file mode 100644 index 000000000..0c6129ed0 Binary files /dev/null and b/product_price_update_advanced/static/description/banner.jpg differ diff --git a/product_price_update_advanced/static/description/cybro_logo.png b/product_price_update_advanced/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/product_price_update_advanced/static/description/cybro_logo.png differ diff --git a/product_price_update_advanced/static/description/icon.png b/product_price_update_advanced/static/description/icon.png new file mode 100644 index 000000000..a22a0435c Binary files /dev/null and b/product_price_update_advanced/static/description/icon.png differ diff --git a/product_price_update_advanced/static/description/index.html b/product_price_update_advanced/static/description/index.html new file mode 100644 index 000000000..c337e5aae --- /dev/null +++ b/product_price_update_advanced/static/description/index.html @@ -0,0 +1,67 @@ +
+
+

Advanced Product Price Update

+

User Can Easily Update Cost Price/Sale Price of Products

+

Cybrosys Technologies

+
+
+ +
+
+
+

Overview

+

+ Currently in Odoo, we need to switch over to each product form to update the price of product. + This module helps to update the cost price and sale price of any product in one single click. +

+

+ * Create a wizard button in the menu Sales > 'Update Product'. +

+

+ * After filling wizard form and clicking on 'Update', it will change the selected price field of products + that were selected in the wizard. +

+
+
+
+ +
+
+

Update Product Price

+
+ You can update the price of product here +
+
+
+ +
+
+
+
+ + +
+

Need Any Help?

+ +
diff --git a/product_price_update_advanced/static/description/product_price.png b/product_price_update_advanced/static/description/product_price.png new file mode 100644 index 000000000..c8a830b1e Binary files /dev/null and b/product_price_update_advanced/static/description/product_price.png differ diff --git a/product_price_update_advanced/views/product_price_view.xml b/product_price_update_advanced/views/product_price_view.xml new file mode 100644 index 000000000..3a32ffae4 --- /dev/null +++ b/product_price_update_advanced/views/product_price_view.xml @@ -0,0 +1,41 @@ + + + + + + Update Product Price + product.price + +
+ + + + + + + + +
+
+
+
+
+ + + Update Product Price + product.price + ir.actions.act_window + form + form + + new + + + + +
+
\ No newline at end of file