diff --git a/invoice_merging/README.rst b/invoice_merging/README.rst new file mode 100644 index 000000000..07a0395b8 --- /dev/null +++ b/invoice_merging/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Merge Invoices +============== +This module will help you to merge different invoices. + +Configuration +============= +* No additional configuration needed + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developers : (V16) Vishnuraj, + (V15) Vishnuraj +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/invoice_merging/__init__.py b/invoice_merging/__init__.py new file mode 100644 index 000000000..4f19f7ca8 --- /dev/null +++ b/invoice_merging/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnuraj (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 models +from . import wizard diff --git a/invoice_merging/__manifest__.py b/invoice_merging/__manifest__.py new file mode 100644 index 000000000..16f365709 --- /dev/null +++ b/invoice_merging/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnuraj (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': 'Merge Invoices', + 'version': '15.0.1.0.0', + 'category': 'Accounting', + 'summary': 'This module will helps to merge different Account moves', + 'description': """This module helps to manage invoices, credit note, + debit note, vendor bills by merging them""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['account'], + 'data': [ + 'security/ir.model.access.csv', + 'data/ir_actions_server_data.xml', + 'wizard/merge_invoice_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} \ No newline at end of file diff --git a/invoice_merging/data/ir_actions_server_data.xml b/invoice_merging/data/ir_actions_server_data.xml new file mode 100644 index 000000000..fc3999eba --- /dev/null +++ b/invoice_merging/data/ir_actions_server_data.xml @@ -0,0 +1,14 @@ + + + + + Merge Invoices + + + list + code + + action = records.action_merge_invoice() + + + diff --git a/invoice_merging/doc/RELEASE_NOTES.md b/invoice_merging/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c7deda240 --- /dev/null +++ b/invoice_merging/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 20.07.2023 +#### Version 15.0.1.0.0 +##### ADD + +- Initial Commit for Merge Invoices diff --git a/invoice_merging/models/__init__.py b/invoice_merging/models/__init__.py new file mode 100644 index 000000000..6c39c793e --- /dev/null +++ b/invoice_merging/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnuraj (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 account_move diff --git a/invoice_merging/models/account_move.py b/invoice_merging/models/account_move.py new file mode 100644 index 000000000..574ada536 --- /dev/null +++ b/invoice_merging/models/account_move.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnuraj (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 fields, models, _ + + +class AccountMove(models.Model): + """Inherit AccountMove class for add merge invoice action function, + Method: + action_merge_invoice(self): + Create new wizard with selected records""" + _inherit = "account.move" + + def action_merge_invoice(self): + """ Method to create invoice merge wizard """ + wizard = self.env['merge.invoice'].create({ + 'invoice_ids': [fields.Command.set(self.ids)], + }) + return { + 'name': _('Merge Invoices'), + 'type': 'ir.actions.act_window', + 'res_model': 'merge.invoice', + 'view_mode': 'form', + 'res_id': wizard.id, + 'target': 'new' + } diff --git a/invoice_merging/security/ir.model.access.csv b/invoice_merging/security/ir.model.access.csv new file mode 100644 index 000000000..d8c92811e --- /dev/null +++ b/invoice_merging/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_merge_invoice,access.merge.invoice,model_merge_invoice,base.group_user,1,1,1,1 diff --git a/invoice_merging/static/description/assets/icons/check.png b/invoice_merging/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/invoice_merging/static/description/assets/icons/check.png differ diff --git a/invoice_merging/static/description/assets/icons/chevron.png b/invoice_merging/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/chevron.png differ diff --git a/invoice_merging/static/description/assets/icons/cogs.png b/invoice_merging/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/cogs.png differ diff --git a/invoice_merging/static/description/assets/icons/consultation.png b/invoice_merging/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/invoice_merging/static/description/assets/icons/consultation.png differ diff --git a/invoice_merging/static/description/assets/icons/ecom-black.png b/invoice_merging/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/ecom-black.png differ diff --git a/invoice_merging/static/description/assets/icons/education-black.png b/invoice_merging/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/invoice_merging/static/description/assets/icons/education-black.png differ diff --git a/invoice_merging/static/description/assets/icons/hotel-black.png b/invoice_merging/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/invoice_merging/static/description/assets/icons/hotel-black.png differ diff --git a/invoice_merging/static/description/assets/icons/license.png b/invoice_merging/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/invoice_merging/static/description/assets/icons/license.png differ diff --git a/invoice_merging/static/description/assets/icons/lifebuoy.png b/invoice_merging/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/invoice_merging/static/description/assets/icons/lifebuoy.png differ diff --git a/invoice_merging/static/description/assets/icons/manufacturing-black.png b/invoice_merging/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/invoice_merging/static/description/assets/icons/manufacturing-black.png differ diff --git a/invoice_merging/static/description/assets/icons/pos-black.png b/invoice_merging/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/pos-black.png differ diff --git a/invoice_merging/static/description/assets/icons/puzzle.png b/invoice_merging/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/puzzle.png differ diff --git a/invoice_merging/static/description/assets/icons/restaurant-black.png b/invoice_merging/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/restaurant-black.png differ diff --git a/invoice_merging/static/description/assets/icons/service-black.png b/invoice_merging/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/invoice_merging/static/description/assets/icons/service-black.png differ diff --git a/invoice_merging/static/description/assets/icons/trading-black.png b/invoice_merging/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/trading-black.png differ diff --git a/invoice_merging/static/description/assets/icons/training.png b/invoice_merging/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/invoice_merging/static/description/assets/icons/training.png differ diff --git a/invoice_merging/static/description/assets/icons/update.png b/invoice_merging/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/invoice_merging/static/description/assets/icons/update.png differ diff --git a/invoice_merging/static/description/assets/icons/user.png b/invoice_merging/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/invoice_merging/static/description/assets/icons/user.png differ diff --git a/invoice_merging/static/description/assets/icons/wrench.png b/invoice_merging/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/invoice_merging/static/description/assets/icons/wrench.png differ diff --git a/invoice_merging/static/description/assets/misc/categories.png b/invoice_merging/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/categories.png differ diff --git a/invoice_merging/static/description/assets/misc/check-box.png b/invoice_merging/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/check-box.png differ diff --git a/invoice_merging/static/description/assets/misc/compass.png b/invoice_merging/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/invoice_merging/static/description/assets/misc/compass.png differ diff --git a/invoice_merging/static/description/assets/misc/corporate.png b/invoice_merging/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/invoice_merging/static/description/assets/misc/corporate.png differ diff --git a/invoice_merging/static/description/assets/misc/customer-support.png b/invoice_merging/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/invoice_merging/static/description/assets/misc/customer-support.png differ diff --git a/invoice_merging/static/description/assets/misc/cybrosys-logo.png b/invoice_merging/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/invoice_merging/static/description/assets/misc/cybrosys-logo.png differ diff --git a/invoice_merging/static/description/assets/misc/features.png b/invoice_merging/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/features.png differ diff --git a/invoice_merging/static/description/assets/misc/logo.png b/invoice_merging/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/invoice_merging/static/description/assets/misc/logo.png differ diff --git a/invoice_merging/static/description/assets/misc/pictures.png b/invoice_merging/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/pictures.png differ diff --git a/invoice_merging/static/description/assets/misc/pie-chart.png b/invoice_merging/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/pie-chart.png differ diff --git a/invoice_merging/static/description/assets/misc/right-arrow.png b/invoice_merging/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/right-arrow.png differ diff --git a/invoice_merging/static/description/assets/misc/star.png b/invoice_merging/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/invoice_merging/static/description/assets/misc/star.png differ diff --git a/invoice_merging/static/description/assets/misc/support.png b/invoice_merging/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/support.png differ diff --git a/invoice_merging/static/description/assets/misc/whatsapp.png b/invoice_merging/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/whatsapp.png differ diff --git a/invoice_merging/static/description/assets/modules/1.png b/invoice_merging/static/description/assets/modules/1.png new file mode 100644 index 000000000..77358cf30 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/1.png differ diff --git a/invoice_merging/static/description/assets/modules/2.png b/invoice_merging/static/description/assets/modules/2.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/invoice_merging/static/description/assets/modules/2.png differ diff --git a/invoice_merging/static/description/assets/modules/3.png b/invoice_merging/static/description/assets/modules/3.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/invoice_merging/static/description/assets/modules/3.png differ diff --git a/invoice_merging/static/description/assets/modules/4.png b/invoice_merging/static/description/assets/modules/4.png new file mode 100644 index 000000000..3932f4062 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/4.png differ diff --git a/invoice_merging/static/description/assets/modules/5.png b/invoice_merging/static/description/assets/modules/5.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/invoice_merging/static/description/assets/modules/5.png differ diff --git a/invoice_merging/static/description/assets/modules/6.png b/invoice_merging/static/description/assets/modules/6.png new file mode 100644 index 000000000..6c38c9e40 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/6.png differ diff --git a/invoice_merging/static/description/assets/screenshots/10.png b/invoice_merging/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..411a6cf05 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/10.png differ diff --git a/invoice_merging/static/description/assets/screenshots/11.png b/invoice_merging/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..3f528c7c1 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/11.png differ diff --git a/invoice_merging/static/description/assets/screenshots/12.png b/invoice_merging/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..f46cbe0f6 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/12.png differ diff --git a/invoice_merging/static/description/assets/screenshots/13.png b/invoice_merging/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..d70f73f1f Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/13.png differ diff --git a/invoice_merging/static/description/assets/screenshots/14.png b/invoice_merging/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..749f845ed Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/14.png differ diff --git a/invoice_merging/static/description/assets/screenshots/15.png b/invoice_merging/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..ac55fa69b Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/15.png differ diff --git a/invoice_merging/static/description/assets/screenshots/2.png b/invoice_merging/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..2e98d2bf0 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/2.png differ diff --git a/invoice_merging/static/description/assets/screenshots/3.png b/invoice_merging/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..a47a6eca4 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/3.png differ diff --git a/invoice_merging/static/description/assets/screenshots/4.png b/invoice_merging/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..27e538abc Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/4.png differ diff --git a/invoice_merging/static/description/assets/screenshots/5.png b/invoice_merging/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..b825ca643 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/5.png differ diff --git a/invoice_merging/static/description/assets/screenshots/6.png b/invoice_merging/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..1dac4e69f Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/6.png differ diff --git a/invoice_merging/static/description/assets/screenshots/7.png b/invoice_merging/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..b2a722801 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/7.png differ diff --git a/invoice_merging/static/description/assets/screenshots/8.png b/invoice_merging/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..2923574b2 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/8.png differ diff --git a/invoice_merging/static/description/assets/screenshots/9.png b/invoice_merging/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..a84222ffc Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/9.png differ diff --git a/invoice_merging/static/description/assets/screenshots/hero.gif b/invoice_merging/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..3e0337bb9 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/hero.gif differ diff --git a/invoice_merging/static/description/banner.jpg b/invoice_merging/static/description/banner.jpg new file mode 100644 index 000000000..7397f2e2d Binary files /dev/null and b/invoice_merging/static/description/banner.jpg differ diff --git a/invoice_merging/static/description/icon.png b/invoice_merging/static/description/icon.png new file mode 100644 index 000000000..a89791ca1 Binary files /dev/null and b/invoice_merging/static/description/icon.png differ diff --git a/invoice_merging/static/description/index.html b/invoice_merging/static/description/index.html new file mode 100644 index 000000000..a2f53159b --- /dev/null +++ b/invoice_merging/static/description/index.html @@ -0,0 +1,642 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Merge Invoices

+

+ This Module Will Help To Manage All Type Of Account Moves By + Merging.

+ + +
+
+
+
+ + +








+
+
+ +
+

+ Explore This Module

+
+ + + + + +
+
+ +
+

+ Overview

+
+ +
+
This module provides an option to manage the + different types of account moves, When large number of Invoices, + Credit notes we can merge the similar type pickings simply by selecting + the picking orders. +
+
+ + + +
+
+ +
+

+ Features

+
+ +
+
+
+ + Easy to manage Invoice, Credit notes, Bills etc... +
+
+ + Simply select and merge. +
+
+ + Merge to single invoice/Bill from existing large no of invoices/Bills. +
+
+ + Option for merge to existing account move +
+
+ + Track merged moves using payment reference field. +
+
+
+ + + +
+
+ +
+

+ Screenshots

+
+ +
+
+
+

+ Select more than one invoices here it is INV/2023/00005 & INV/2023/00006. +

+ +
+
+

+ The details of INV/2023/00005 +

+ +
+
+

+ The details of INV/2023/00006 +

+ +
+
+

+ Select the invoices for merging +

+ +
+
+

+ When selected invoices, there will be an option for Merge under the Actions menu. +

+ +
+
+

+ Merge confirm window, shows selected Invoices and how to use it. +

+ +
+
+

+ When a new partner selected from wizard then a new invoice created with existing invoice lines, + also we can decide what to do with the selected invoices ie, cancel or keep it. +

+ +
+
+

+ Shows the newly created Invoice. +

+ +
+
+

+ The details of newly created invoice, merged invoice lines, Also + note that payment reference field shows the merged invoice names +

+ +
+
+

+ Merging once again. +

+ +
+
+

+ This time merging on existing invoice, so choose an invoice to merge. +

+ +
+
+

+ Selecting merging type as "cancel others" ie, + All invoices except target will be cancelled. +

+ +
+
+

+ Shows result after merging, all invoice lines merged to target + invoice (INV/2023/00005) and other one (INV/2023/00006) is cancelled. +

+ +
+
+

+ The result after merge to existing invoice, also note tha payment reference field it shows merged invoices names. +

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

+ Related 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

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

+ Support

+
+ +
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/invoice_merging/wizard/__init__.py b/invoice_merging/wizard/__init__.py new file mode 100644 index 000000000..3e197ac08 --- /dev/null +++ b/invoice_merging/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnuraj (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 merge_invoice diff --git a/invoice_merging/wizard/merge_invoice.py b/invoice_merging/wizard/merge_invoice.py new file mode 100644 index 000000000..b2bdb7fb6 --- /dev/null +++ b/invoice_merging/wizard/merge_invoice.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnuraj (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 fields, models, _ +from odoo.exceptions import AccessError + + +class MergeInvoice(models.TransientModel): + """Main method to merge selected invoices + - If user select merge to existing then the selected invoices will be + merged to the selected record + - If no invoice is selected, then a new record will be created with the + existing picking lines""" + _name = "merge.invoice" + _description = "Invoice Merge Wizard" + + invoice_ids = fields.Many2many('account.move', + help="Selected invoices to merge", + string="Invoice") + partner_id = fields.Many2one('res.partner', string="Customer", + help="The new invoice will be created" + " for selected partner") + target_invoice_id = fields.Many2one('account.move', + string="Merge to existing", + help="Select a invoice if you want to " + "merge other invoices to selected" + " one, Otherwise leave it empty") + merge_type = fields.Selection( + [('cancel', 'Cancel others'), ('keep', 'Keep others as it is')], + string="Merge type", default="cancel", + help="Select the merge type to decide what to do with other invoices") + + def action_merge_invoice(self): + """Method for merge invoices""" + # Checking for is there any exceptions + if len(list(set(self.invoice_ids))) == 1: + raise AccessError(_("Merging is not possible on single invoice")) + if any(state in ['posted', 'cancel'] for state in + self.invoice_ids.mapped('state')): + raise AccessError(_("Merging is only possible on draft state " + "invoices")) + if len(list(set(self.invoice_ids.mapped('move_type')))) > 1: + raise AccessError(_("Merging is only Different type moves," + " please select same type")) + # If there is no exceptions continue with the merging + invoices = self.invoice_ids + invoice_lines = [] + pay_reference = [] + if self.target_invoice_id: + target_invoice = self.target_invoice_id + invoices -= self.target_invoice_id + pay_reference.append(target_invoice.name if + target_invoice.name != "/" else + "Draft " + str(target_invoice.id)) + else: + target_invoice = self.env['account.move'].with_context( + check_move_validity=False).create( + {'partner_id': self.partner_id.id, + 'move_type': invoices[0].move_type + }) + for record in invoices: + for line in record.line_ids: + if line.display_type not in ["payment_term", "tax"]: + invoice_lines += line.with_context( + check_move_validity=False).copy( + {'move_id': target_invoice.id}) + pay_reference.append(record.name if + record.name != "/" else + "Draft " + str(record.id)) + if self.merge_type == "cancel": + record.button_cancel() + target_invoice.write( + {'payment_reference': f"Merged ({(', '.join(pay_reference))})"}) diff --git a/invoice_merging/wizard/merge_invoice_views.xml b/invoice_merging/wizard/merge_invoice_views.xml new file mode 100644 index 000000000..cf058b30f --- /dev/null +++ b/invoice_merging/wizard/merge_invoice_views.xml @@ -0,0 +1,38 @@ + + + + + merge.invoice.view.from + merge.invoice + +
+ + + + + + + + + + + + + + + + + + +
+
+
+