diff --git a/invoice_merging/README.rst b/invoice_merging/README.rst new file mode 100644 index 000000000..1f8b43315 --- /dev/null +++ b/invoice_merging/README.rst @@ -0,0 +1,48 @@ +.. 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 +------- +* Developer : (V16) Vishnuraj P, + (V17) Akhil Ashok, + 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..59dd3eec0 --- /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: Akhil Ashok(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..613326589 --- /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: Akhil Ashok(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': '17.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 +} 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..15b62bbdb --- /dev/null +++ b/invoice_merging/data/ir_actions_server_data.xml @@ -0,0 +1,16 @@ + + + + + + Merge Invoices/Bills + + + 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..5e10eda07 --- /dev/null +++ b/invoice_merging/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.03.2024 +#### Version 17.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..ea5e8c6fb --- /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: Akhil Ashok(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..04dab60c2 --- /dev/null +++ b/invoice_merging/models/account_move.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Akhil Ashok(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 """ + merge_invoice = 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': merge_invoice.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..fc4db92af --- /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_user,access.merge.invoice.user,model_merge_invoice,base.group_user,1,1,1,1 diff --git a/invoice_merging/static/description/assets/icons/capture (1).png b/invoice_merging/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/invoice_merging/static/description/assets/icons/capture (1).png differ 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/img.png b/invoice_merging/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/img.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/photo-capture.png b/invoice_merging/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/invoice_merging/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/invoice_merging/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/invoice_merging/static/description/assets/misc/Cybrosys R.png differ diff --git a/invoice_merging/static/description/assets/misc/email.svg b/invoice_merging/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/invoice_merging/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/invoice_merging/static/description/assets/misc/phone.svg b/invoice_merging/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/invoice_merging/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/invoice_merging/static/description/assets/misc/star (1) 2.svg b/invoice_merging/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/invoice_merging/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/invoice_merging/static/description/assets/misc/support (1) 1.svg b/invoice_merging/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/invoice_merging/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/invoice_merging/static/description/assets/misc/support-email.svg b/invoice_merging/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/invoice_merging/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/invoice_merging/static/description/assets/misc/tick-mark.svg b/invoice_merging/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/invoice_merging/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/invoice_merging/static/description/assets/misc/whatsapp 1.svg b/invoice_merging/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/invoice_merging/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/invoice_merging/static/description/assets/misc/whatsapp.svg b/invoice_merging/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/invoice_merging/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/invoice_merging/static/description/assets/modules/m1.png b/invoice_merging/static/description/assets/modules/m1.png new file mode 100644 index 000000000..acb4c76c6 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/m1.png differ diff --git a/invoice_merging/static/description/assets/modules/m2.png b/invoice_merging/static/description/assets/modules/m2.png new file mode 100644 index 000000000..3ef91f771 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/m2.png differ diff --git a/invoice_merging/static/description/assets/modules/m3.png b/invoice_merging/static/description/assets/modules/m3.png new file mode 100644 index 000000000..72febf6ae Binary files /dev/null and b/invoice_merging/static/description/assets/modules/m3.png differ diff --git a/invoice_merging/static/description/assets/modules/m4.png b/invoice_merging/static/description/assets/modules/m4.png new file mode 100644 index 000000000..f7d7f9241 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/m4.png differ diff --git a/invoice_merging/static/description/assets/modules/m5.png b/invoice_merging/static/description/assets/modules/m5.png new file mode 100644 index 000000000..1d3324e88 Binary files /dev/null and b/invoice_merging/static/description/assets/modules/m5.png differ diff --git a/invoice_merging/static/description/assets/modules/m6.png b/invoice_merging/static/description/assets/modules/m6.png new file mode 100644 index 000000000..80938c15a Binary files /dev/null and b/invoice_merging/static/description/assets/modules/m6.png differ diff --git a/invoice_merging/static/description/assets/screenshots/1.png b/invoice_merging/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..413502ee0 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/1.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..afe7b82cd 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..cc3989092 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..13bc2d5cf 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..7a639a872 Binary files /dev/null and b/invoice_merging/static/description/assets/screenshots/13.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..fa319451d 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..4a0346c3a 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..1c568b190 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..50f303909 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..53e897e24 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..f63acfcdc 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..547a7052f 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..7dc59dd41 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..496dfa0cf 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..764fdc5f9 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..d35b5b757 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..a5979fa31 --- /dev/null +++ b/invoice_merging/static/description/index.html @@ -0,0 +1,748 @@ + + + + + + Merge Invoices + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Merge Invoices

+

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

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

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.

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

+ Select more than one Invoices.

+
+
+
+
+
+
+ +
+
+

+ The details of INV/2023/00006

+
+
+
+
+
+
+ +
+
+

+ The details of INV/2023/00007

+
+
+
+
+
+
+ +
+
+

+ 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/00006) and other one (INV/2023/00007) is Cancelled.

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+
    +
  • + Merge to single Invoice/Bill from existing large no of Invoices/Bills. +
  • +
  • + Option for merge to existing Account move. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:8th Dec 2023 +
+

+ Initial Commit for Merge Invoices.

+
+
+
+
+
+
+

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/invoice_merging/wizard/__init__.py b/invoice_merging/wizard/__init__.py new file mode 100644 index 000000000..2b65b11cd --- /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: Akhil Ashok(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..80ed576fe --- /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: Akhil Ashok(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" + + invoice_ids = fields.Many2many('account.move', string="Selected Invoices", + help="Selected invoices to merge") + 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')], + 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 or Bill")) + if any(state in ['posted', 'cancel'] for state in + self.invoice_ids.mapped('state')): + raise AccessError(_("Merging is only possible on draft state " + "Invoices or Bills")) + if len(list(set(self.invoice_ids.mapped('move_type')))) > 1: + raise AccessError(_("Merging is only possible for different type " + "moves, so please select the 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 + f"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}) + 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 + f"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..b5e133456 --- /dev/null +++ b/invoice_merging/wizard/merge_invoice_views.xml @@ -0,0 +1,40 @@ + + + + + merge.invoice.view.form + merge.invoice + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
+