diff --git a/mass_price_update/README.rst b/mass_price_update/README.rst new file mode 100755 index 000000000..67423e3cf --- /dev/null +++ b/mass_price_update/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Mass Price Update +================= +This module allow to update the price/cost of products by percentage. + +Configuration +============= +Add the users to the new security group 'Update Product Price' to give access to the new menu. + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V17) Swaraj R, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://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/mass_price_update/__init__.py b/mass_price_update/__init__.py new file mode 100644 index 000000000..21b2fd9ab --- /dev/null +++ b/mass_price_update/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Swaraj R (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 wizard diff --git a/mass_price_update/__manifest__.py b/mass_price_update/__manifest__.py new file mode 100644 index 000000000..8326c54d2 --- /dev/null +++ b/mass_price_update/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Swaraj R (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': 'Mass Price Update', + 'version': '17.0.1.0.0', + 'category': 'Warehouse', + 'summary': 'Update the sales price and the cost of any product by ' + 'percentage', + 'description': 'This module allows to update more than one products sales' + 'and cost price by single click', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['stock'], + 'data': [ + 'security/mass_price_update_groups.xml', + 'security/ir.model.access.csv', + 'wizard/mass_price_update_views.xml' + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/mass_price_update/doc/RELEASE_NOTES.md b/mass_price_update/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..fa92a0e26 --- /dev/null +++ b/mass_price_update/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 07.03.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Mass Price Update diff --git a/mass_price_update/security/ir.model.access.csv b/mass_price_update/security/ir.model.access.csv new file mode 100644 index 000000000..d59182049 --- /dev/null +++ b/mass_price_update/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_mass_price_update,access.mass.price.update,model_mass_price_update,mass_price_update.mass_price_update_group_admin,1,1,1,1 +access_change_price_line,access.change.price.line,model_change_price_line,mass_price_update.mass_price_update_group_admin,1,1,1,1 diff --git a/mass_price_update/security/mass_price_update_groups.xml b/mass_price_update/security/mass_price_update_groups.xml new file mode 100644 index 000000000..2732fccd6 --- /dev/null +++ b/mass_price_update/security/mass_price_update_groups.xml @@ -0,0 +1,18 @@ + + + + + Mass Price Update + Helps to manage access to the mass price + update wizard + + + + + Administrator + Access to the mass price update wizard menu + + + + diff --git a/mass_price_update/static/description/assets/icons/check.png b/mass_price_update/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/mass_price_update/static/description/assets/icons/check.png differ diff --git a/mass_price_update/static/description/assets/icons/chevron.png b/mass_price_update/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/chevron.png differ diff --git a/mass_price_update/static/description/assets/icons/cogs.png b/mass_price_update/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/cogs.png differ diff --git a/mass_price_update/static/description/assets/icons/consultation.png b/mass_price_update/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/mass_price_update/static/description/assets/icons/consultation.png differ diff --git a/mass_price_update/static/description/assets/icons/ecom-black.png b/mass_price_update/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/ecom-black.png differ diff --git a/mass_price_update/static/description/assets/icons/education-black.png b/mass_price_update/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/mass_price_update/static/description/assets/icons/education-black.png differ diff --git a/mass_price_update/static/description/assets/icons/hotel-black.png b/mass_price_update/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/mass_price_update/static/description/assets/icons/hotel-black.png differ diff --git a/mass_price_update/static/description/assets/icons/license.png b/mass_price_update/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/mass_price_update/static/description/assets/icons/license.png differ diff --git a/mass_price_update/static/description/assets/icons/lifebuoy.png b/mass_price_update/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/mass_price_update/static/description/assets/icons/lifebuoy.png differ diff --git a/mass_price_update/static/description/assets/icons/manufacturing-black.png b/mass_price_update/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/mass_price_update/static/description/assets/icons/manufacturing-black.png differ diff --git a/mass_price_update/static/description/assets/icons/pos-black.png b/mass_price_update/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/pos-black.png differ diff --git a/mass_price_update/static/description/assets/icons/puzzle.png b/mass_price_update/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/puzzle.png differ diff --git a/mass_price_update/static/description/assets/icons/restaurant-black.png b/mass_price_update/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/restaurant-black.png differ diff --git a/mass_price_update/static/description/assets/icons/service-black.png b/mass_price_update/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/mass_price_update/static/description/assets/icons/service-black.png differ diff --git a/mass_price_update/static/description/assets/icons/trading-black.png b/mass_price_update/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/mass_price_update/static/description/assets/icons/trading-black.png differ diff --git a/mass_price_update/static/description/assets/icons/training.png b/mass_price_update/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/mass_price_update/static/description/assets/icons/training.png differ diff --git a/mass_price_update/static/description/assets/icons/update.png b/mass_price_update/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/mass_price_update/static/description/assets/icons/update.png differ diff --git a/mass_price_update/static/description/assets/icons/user.png b/mass_price_update/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/mass_price_update/static/description/assets/icons/user.png differ diff --git a/mass_price_update/static/description/assets/icons/wrench.png b/mass_price_update/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/mass_price_update/static/description/assets/icons/wrench.png differ diff --git a/mass_price_update/static/description/assets/misc/categories.png b/mass_price_update/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/categories.png differ diff --git a/mass_price_update/static/description/assets/misc/check-box.png b/mass_price_update/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/check-box.png differ diff --git a/mass_price_update/static/description/assets/misc/compass.png b/mass_price_update/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/mass_price_update/static/description/assets/misc/compass.png differ diff --git a/mass_price_update/static/description/assets/misc/corporate.png b/mass_price_update/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/mass_price_update/static/description/assets/misc/corporate.png differ diff --git a/mass_price_update/static/description/assets/misc/customer-support.png b/mass_price_update/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/mass_price_update/static/description/assets/misc/customer-support.png differ diff --git a/mass_price_update/static/description/assets/misc/cybrosys-logo.png b/mass_price_update/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/mass_price_update/static/description/assets/misc/cybrosys-logo.png differ diff --git a/mass_price_update/static/description/assets/misc/features.png b/mass_price_update/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/features.png differ diff --git a/mass_price_update/static/description/assets/misc/logo.png b/mass_price_update/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/mass_price_update/static/description/assets/misc/logo.png differ diff --git a/mass_price_update/static/description/assets/misc/phone.svg b/mass_price_update/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/mass_price_update/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/mass_price_update/static/description/assets/misc/pictures.png b/mass_price_update/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/pictures.png differ diff --git a/mass_price_update/static/description/assets/misc/pie-chart.png b/mass_price_update/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/pie-chart.png differ diff --git a/mass_price_update/static/description/assets/misc/right-arrow.png b/mass_price_update/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/right-arrow.png differ diff --git a/mass_price_update/static/description/assets/misc/star.png b/mass_price_update/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/mass_price_update/static/description/assets/misc/star.png differ diff --git a/mass_price_update/static/description/assets/misc/support (1) 1.svg b/mass_price_update/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/mass_price_update/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/mass_price_update/static/description/assets/misc/support-email.svg b/mass_price_update/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/mass_price_update/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/mass_price_update/static/description/assets/misc/support.png b/mass_price_update/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/support.png differ diff --git a/mass_price_update/static/description/assets/misc/whatsapp 1.svg b/mass_price_update/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/mass_price_update/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/mass_price_update/static/description/assets/misc/whatsapp.png b/mass_price_update/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/mass_price_update/static/description/assets/misc/whatsapp.png differ diff --git a/mass_price_update/static/description/assets/modules/1.gif b/mass_price_update/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/1.gif differ diff --git a/mass_price_update/static/description/assets/modules/1.png b/mass_price_update/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/1.png differ diff --git a/mass_price_update/static/description/assets/modules/2.png b/mass_price_update/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/mass_price_update/static/description/assets/modules/2.png differ diff --git a/mass_price_update/static/description/assets/modules/3.png b/mass_price_update/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/3.png differ diff --git a/mass_price_update/static/description/assets/modules/4.jpg b/mass_price_update/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/4.jpg differ diff --git a/mass_price_update/static/description/assets/modules/5.jpg b/mass_price_update/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/5.jpg differ diff --git a/mass_price_update/static/description/assets/modules/6.png b/mass_price_update/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/6.png differ diff --git a/mass_price_update/static/description/assets/modules/l2.png b/mass_price_update/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/mass_price_update/static/description/assets/modules/l2.png differ diff --git a/mass_price_update/static/description/assets/modules/l3.png b/mass_price_update/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/mass_price_update/static/description/assets/modules/l3.png differ diff --git a/mass_price_update/static/description/assets/modules/l4.png b/mass_price_update/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/l4.png differ diff --git a/mass_price_update/static/description/assets/modules/l5.png b/mass_price_update/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/mass_price_update/static/description/assets/modules/l5.png differ diff --git a/mass_price_update/static/description/assets/modules/l6.png b/mass_price_update/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/mass_price_update/static/description/assets/modules/l6.png differ diff --git a/mass_price_update/static/description/assets/screenshots/1.png b/mass_price_update/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..f8febf9cc Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/1.png differ diff --git a/mass_price_update/static/description/assets/screenshots/2.png b/mass_price_update/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..8ab19dfff Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/2.png differ diff --git a/mass_price_update/static/description/assets/screenshots/3.png b/mass_price_update/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..9f471c155 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/3.png differ diff --git a/mass_price_update/static/description/assets/screenshots/4.png b/mass_price_update/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4a16616f8 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/4.png differ diff --git a/mass_price_update/static/description/assets/screenshots/5.png b/mass_price_update/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..ee1cd17f0 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/5.png differ diff --git a/mass_price_update/static/description/assets/screenshots/6.png b/mass_price_update/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..20355445c Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/6.png differ diff --git a/mass_price_update/static/description/assets/screenshots/hero.gif b/mass_price_update/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..0b4a1b945 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/hero.gif differ diff --git a/mass_price_update/static/description/assets/screenshots/image1.png b/mass_price_update/static/description/assets/screenshots/image1.png new file mode 100644 index 000000000..d15192b99 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/image1.png differ diff --git a/mass_price_update/static/description/assets/screenshots/image2.png b/mass_price_update/static/description/assets/screenshots/image2.png new file mode 100644 index 000000000..67b287c10 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/image2.png differ diff --git a/mass_price_update/static/description/assets/screenshots/image3.png b/mass_price_update/static/description/assets/screenshots/image3.png new file mode 100644 index 000000000..9aef952e7 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/image3.png differ diff --git a/mass_price_update/static/description/assets/screenshots/image4.png b/mass_price_update/static/description/assets/screenshots/image4.png new file mode 100644 index 000000000..fc38ebe60 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/image4.png differ diff --git a/mass_price_update/static/description/assets/screenshots/image5.png b/mass_price_update/static/description/assets/screenshots/image5.png new file mode 100644 index 000000000..f22feb28b Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/image5.png differ diff --git a/mass_price_update/static/description/assets/screenshots/image6.png b/mass_price_update/static/description/assets/screenshots/image6.png new file mode 100644 index 000000000..72fced150 Binary files /dev/null and b/mass_price_update/static/description/assets/screenshots/image6.png differ diff --git a/mass_price_update/static/description/banner.jpg b/mass_price_update/static/description/banner.jpg new file mode 100644 index 000000000..2925ac981 Binary files /dev/null and b/mass_price_update/static/description/banner.jpg differ diff --git a/mass_price_update/static/description/icon.png b/mass_price_update/static/description/icon.png new file mode 100644 index 000000000..14400b458 Binary files /dev/null and b/mass_price_update/static/description/icon.png differ diff --git a/mass_price_update/static/description/index.html b/mass_price_update/static/description/index.html new file mode 100644 index 000000000..e4f637248 --- /dev/null +++ b/mass_price_update/static/description/index.html @@ -0,0 +1,748 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Mass Price Update

+

+ This Module Allows to Update the Sales Price and the Cost of + the Products by percentage. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Update cost/price in one click

+

Use the new + wizard for + updating the cost/price of the products. +

+
+
+
+
+
+
+ +
+
+

+ View and ensure before confirm

+

View and + confirm the current and new cost/price of the + products before changing it. +

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

+ Add the users to the new security group(Mass + Price Update: Administrator) to give access + to the new menu.

+
+
+
+
+
+
+ +
+
+

+ Use the new menu Inventory -> + Products -> Mass Price Update to + open the wizard.

+
+
+
+
+
+
+ +
+
+

+

    +
  1. Select all products
  2. +
  3. Select the categories
  4. +
  5. Select the required products
  6. +
+ The selected products will be listed in the tree + view in the wizard.

+
+
+
+
+
+
+ +
+
+

+ More fields to make it simple

+

+ The Apply on field is used to select either + Price or Cost to update the sales price and + cost of + the selected products. Set the percentage to + be changed in the Change field. On the Apply + type, + select add to add the amount and reduce to + reduce the amount. + The current and new price/cost of the + selected products will be updated asap in + the list view.

+
+
+
+
+
+
+ +
+
+

+ An extra step for safety

+

+ An extra confirmation to avoid updating the + sale price or cost of products by + accidentally + clicking the change button in the + wizard.

+
+
+
+
+
+
+ +
+
+

+ Notification

+

+ Notification on completing the price + update.

+
+
+
+
+
+
+
    +
  • + Use the new + wizard for + updating the cost/price of the products. +
  • +
  • + View and confirm + the current and new cost/price of the products + before changing it. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:7th march 2024 +
+

+ + Initial Commit for Mass Price Update.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/mass_price_update/wizard/__init__.py b/mass_price_update/wizard/__init__.py new file mode 100755 index 000000000..138557b2f --- /dev/null +++ b/mass_price_update/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Swaraj R (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 change_price_line +from . import mass_price_update diff --git a/mass_price_update/wizard/change_price_line.py b/mass_price_update/wizard/change_price_line.py new file mode 100644 index 000000000..a039039af --- /dev/null +++ b/mass_price_update/wizard/change_price_line.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Swaraj R (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 api, fields, models + + +class ChangePriceLine(models.TransientModel): + """One2many for align the products with new price""" + _name = 'change.price.line' + _rec_name = 'product_id' + _description = "Change Price Line" + + mass_price_update_id = fields.Many2one('mass.price.update', + string='Number', + help='The related field from mass' + 'price update', ) + product_id = fields.Many2one( + 'product.product', string='Product', required=True, + domain="[('active', '=', True)]", help='Selected products will show') + current_price = fields.Float(string='Current Price', digits='Product Price', + related='product_id.lst_price', + help='The current Sales price') + new_price = fields.Float(string='New Price', digits='Product Price', + compute='_compute_new_price_cost', + help='Computing the new price based on the ' + 'percentage') + current_cost = fields.Float(string='Current Cost', digits='Product Price', + related='product_id.standard_price', + help='Current cost of the product') + new_cost = fields.Float(string='New Cost', digits='Product Price', + compute='_compute_new_price_cost', + help='Computing the new cost based on the' + 'percentage') + currency_id = fields.Many2one('res.currency', + string='Currency', + related='product_id.currency_id', + help='The currency of the product') + + @api.depends('mass_price_update_id.apply_on', + 'mass_price_update_id.change', + 'mass_price_update_id.apply_type') + def _compute_new_price_cost(self): + """Compute new price and new cost""" + for record in self: + if record.mass_price_update_id.apply_type == 'add': + percentage_num = 1 + record.mass_price_update_id.change + else: + percentage_num = 1 - record.mass_price_update_id.change + if record.mass_price_update_id.apply_on == 'price': + record.new_cost = False + record.new_price = record.current_price * percentage_num + else: + record.new_price = False + record.new_cost = record.current_cost * percentage_num diff --git a/mass_price_update/wizard/mass_price_update.py b/mass_price_update/wizard/mass_price_update.py new file mode 100755 index 000000000..11ecc9459 --- /dev/null +++ b/mass_price_update/wizard/mass_price_update.py @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Swaraj R (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 api, fields, models, _ +from odoo.exceptions import UserError + + +class MassPriceUpdate(models.TransientModel): + """Change Price and Cost of Products by Percentage""" + _name = 'mass.price.update' + _description = "Mass Price Update" + + apply_to = fields.Selection([ + ('all', 'All Products'), ('category', 'Selected Categories'), + ('selected', 'Selected Products')], default='selected', + string='Apply To', required=True, + help='Allows to select the products based on the conditions') + apply_on = fields.Selection([ + ('price', 'Price'), ('cost', 'Cost')], default='price', + string='Apply On', required=True, help='Apply on Price or Cost') + change = fields.Float(string='Change', + help='The percentage for adding or reducing to the ' + 'actual price') + apply_type = fields.Selection([ + ('add', 'Add'), ('reduce', 'Reduce')], default='add', + string='Apply Type', required=True, + help='Choose the applying type whether add or reduce') + product_ids = fields.Many2many( + 'product.product', string='Products', default=False, + domain="[('active', '=', True)]", help='Choose the required products') + category_ids = fields.Many2many( + 'product.category', string='Categories', default=False, + help='Choose the required Categories') + line_ids = fields.One2many('change.price.line', + 'mass_price_update_id', + string='Lines', readonly=True, + help='The selected product with updated price') + + @api.onchange('apply_to') + def _onchange_apply_to(self): + """When select an option from apply_to, the related records will show""" + if self.apply_to == 'all': + self.write({ + 'category_ids': [(5,)], + 'line_ids': [(5,)], + 'product_ids': [(6, 0, self.env['product.product'].search( + [('active', '=', True)]).ids)] + }) + elif self.apply_to == 'category': + self.write({ + 'line_ids': [(5,)], + 'product_ids': [(6, 0, self.env['product.product'].search( + [('categ_id', 'in', self.category_ids.ids)]).ids)] + }) + else: + self.write({ + 'product_ids': [(5,)], + 'category_ids': [(5,)], + 'line_ids': [(5,)] + }) + + @api.onchange('product_ids') + def _onchange_product_ids(self): + """Updating the products in lines""" + if self.product_ids: + self.write({'line_ids': [(5,)]}) + lines = [] + for product in self.product_ids: + lines.append((0, 0, {'product_id': product._origin.id})) + self.write({'line_ids': lines}) + + @api.onchange('category_ids') + def _onchange_category_ids(self): + """When select the category related product will show""" + if self.category_ids: + self.write({'line_ids': [(5,)], 'product_ids': [(5,)]}) + lines = [] + products = self.env['product.product'].sudo().search( + [('categ_id', 'in', self.category_ids.ids)]) + for product in products: + lines.append((0, 0, {'product_id': product.id})) + self.write({ + 'product_ids': products.ids, + 'line_ids': lines + }) + + def action_change_price(self): + """This function is used to change the price or cost of products""" + if self.apply_to == 'category' and not self.product_ids: + raise UserError(_("Please select any category with products.")) + if self.apply_to == 'selected' and not self.product_ids: + raise UserError(_("Please select any product.")) + if not self.change: + raise UserError(_("Please enter the change in percentage.")) + if self.apply_type == 'add': + percentage_num = 1 + self.change + else: + percentage_num = 1 - self.change + if self.apply_on == 'price': + for product in self.product_ids: + product.lst_price = product.lst_price * percentage_num + else: + for product in self.product_ids: + product_template = product.product_tmpl_id + product_template.standard_price = ( + product_template.standard_price * percentage_num) + message = f"""The {'sales price' if self.apply_on == 'price' + else 'cost'} is updated.""" + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': _('Success'), + 'message': _(message), + 'sticky': True, + 'next': {'type': 'ir.actions.act_window_close'}, + } + } diff --git a/mass_price_update/wizard/mass_price_update_views.xml b/mass_price_update/wizard/mass_price_update_views.xml new file mode 100755 index 000000000..577710436 --- /dev/null +++ b/mass_price_update/wizard/mass_price_update_views.xml @@ -0,0 +1,82 @@ + + + + + mass.price.update.view.form + mass.price.update + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ + + Mass Price Update + mass.price.update + ir.actions.act_window + form + new + + + +