diff --git a/account_partner_ledger_filter/README.rst b/account_partner_ledger_filter/README.rst new file mode 100644 index 000000000..9260273a4 --- /dev/null +++ b/account_partner_ledger_filter/README.rst @@ -0,0 +1,22 @@ +Partner Ledger Report with Partner Filter +========================================= + +Creates a partner ledger report by filtering partners + + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +Configuration +============= + +No additional configurations needed + +Credits +======= +Faslu ca v11 @ cybrosys, Contact: odoo@cybrosys.com +Afras Habis v13 @ cybrosys, Contact: odoo@cybrosys.com +Jibin James v14 @ cybrosys, Contact: odoo@cybrosys.com +Mohammed Musthafa v15 @ cybrosys, Contact: odoo@cybrosys.com diff --git a/account_partner_ledger_filter/__init__.py b/account_partner_ledger_filter/__init__.py new file mode 100644 index 000000000..7a106b2fe --- /dev/null +++ b/account_partner_ledger_filter/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import wizard +from . import models diff --git a/account_partner_ledger_filter/__manifest__.py b/account_partner_ledger_filter/__manifest__.py new file mode 100644 index 000000000..0279cd204 --- /dev/null +++ b/account_partner_ledger_filter/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': 'Partner Ledger with Partner Filter', + 'version': '15.0.1.0.0', + 'summary': """Partner Ledger Report with Partner Filter""", + 'description': """Partner Ledger Report with Partner Filter""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://cybrosys.com/", + 'category': 'Accounting', + 'depends': ['base_accounting_kit'], + 'data': [ + 'views/report.xml', + 'wizard/account_report_general_ledger_view.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False +} diff --git a/account_partner_ledger_filter/doc/RELEASE_NOTES.md b/account_partner_ledger_filter/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..51e921b6e --- /dev/null +++ b/account_partner_ledger_filter/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 31.10.2021 +#### Version 15.0.1.0.0 +#### ADD +Initial Commit for account_partner_ledger_filter diff --git a/account_partner_ledger_filter/models/__init__.py b/account_partner_ledger_filter/models/__init__.py new file mode 100644 index 000000000..f2f7cf118 --- /dev/null +++ b/account_partner_ledger_filter/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import account_partner_ledger diff --git a/account_partner_ledger_filter/models/account_partner_ledger.py b/account_partner_ledger_filter/models/account_partner_ledger.py new file mode 100644 index 000000000..2c975ef48 --- /dev/null +++ b/account_partner_ledger_filter/models/account_partner_ledger.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +import time +import logging +from odoo import api, models, _ +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class ReportPartnerLedger(models.AbstractModel): + _inherit = 'report.base_accounting_kit.report_partnerledger' + + @api.model + def _get_report_values(self, docids, data=None): + if not data.get('form'): + raise UserError(_("Form content is missing, this report cannot be printed.")) + + data['computed'] = {} + + obj_partner = self.env['res.partner'] + query_get_data = self.env['account.move.line'].with_context(data['form'].get('used_context', {}))._query_get() + data['computed']['move_state'] = ['draft', 'posted'] + if data['form'].get('target_move', 'all') == 'posted': + data['computed']['move_state'] = ['posted'] + result_selection = data['form'].get('result_selection', 'customer') + if result_selection == 'supplier': + data['computed']['ACCOUNT_TYPE'] = ['payable'] + elif result_selection == 'customer': + data['computed']['ACCOUNT_TYPE'] = ['receivable'] + else: + data['computed']['ACCOUNT_TYPE'] = ['payable', 'receivable'] + + self.env.cr.execute(""" + SELECT a.id + FROM account_account a + WHERE a.internal_type IN %s + AND NOT a.deprecated""", (tuple(data['computed']['ACCOUNT_TYPE']),)) + data['computed']['account_ids'] = [a for (a,) in self.env.cr.fetchall()] + params = [tuple(data['computed']['move_state']), tuple(data['computed']['account_ids'])] + query_get_data[2] + reconcile_clause = "" if data['form']['reconciled'] else ' AND "account_move_line".full_reconcile_id IS NULL ' + query = """ + SELECT DISTINCT "account_move_line".partner_id + FROM """ + query_get_data[0] + """, account_account AS account, account_move AS am + WHERE "account_move_line".partner_id IS NOT NULL + AND "account_move_line".account_id = account.id + AND am.id = "account_move_line".move_id + AND am.state IN %s + AND "account_move_line".account_id IN %s + AND NOT account.deprecated + AND """ + query_get_data[1] + reconcile_clause + self.env.cr.execute(query, tuple(params)) + # ---------------------Taking only selected partners--------------------------- + if data['form']['partner_ids']: + partner_ids = data['form']['partner_ids'] + else: + partner_ids = [res['partner_id'] for res in self.env.cr.dictfetchall()] + # ----------------------------------------------------------------------------- + # partner_ids = [res['partner_id'] for res in self.env.cr.dictfetchall()] + partners = obj_partner.browse(partner_ids) + partners = sorted(partners, key = lambda x: (x.ref or '', x.name or '')) + + return { + 'doc_ids': partner_ids, + 'doc_model': self.env['res.partner'], + 'data': data, + 'docs': partners, + 'time': time, + 'lines': self._lines, + 'sum_partner': self._sum_partner, + } diff --git a/account_partner_ledger_filter/static/description/assets/icons/check.png b/account_partner_ledger_filter/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/check.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/chevron.png b/account_partner_ledger_filter/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/chevron.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/cogs.png b/account_partner_ledger_filter/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/cogs.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/consultation.png b/account_partner_ledger_filter/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/consultation.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/ecom-black.png b/account_partner_ledger_filter/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/ecom-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/education-black.png b/account_partner_ledger_filter/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/education-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/hotel-black.png b/account_partner_ledger_filter/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/hotel-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/license.png b/account_partner_ledger_filter/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/license.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/lifebuoy.png b/account_partner_ledger_filter/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/lifebuoy.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/logo.png b/account_partner_ledger_filter/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/logo.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/manufacturing-black.png b/account_partner_ledger_filter/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/manufacturing-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/pos-black.png b/account_partner_ledger_filter/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/pos-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/puzzle.png b/account_partner_ledger_filter/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/puzzle.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/restaurant-black.png b/account_partner_ledger_filter/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/restaurant-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/service-black.png b/account_partner_ledger_filter/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/service-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/trading-black.png b/account_partner_ledger_filter/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/trading-black.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/training.png b/account_partner_ledger_filter/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/training.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/update.png b/account_partner_ledger_filter/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/update.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/user.png b/account_partner_ledger_filter/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/user.png differ diff --git a/account_partner_ledger_filter/static/description/assets/icons/wrench.png b/account_partner_ledger_filter/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/icons/wrench.png differ diff --git a/account_partner_ledger_filter/static/description/assets/modules/approval_image.png b/account_partner_ledger_filter/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..84fe94e80 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/modules/approval_image.png differ diff --git a/account_partner_ledger_filter/static/description/assets/modules/budget_image.png b/account_partner_ledger_filter/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..fe6aa6fe4 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/modules/budget_image.png differ diff --git a/account_partner_ledger_filter/static/description/assets/modules/export_image.png b/account_partner_ledger_filter/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..4e4ea0e51 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/modules/export_image.png differ diff --git a/account_partner_ledger_filter/static/description/assets/modules/magento_image.png b/account_partner_ledger_filter/static/description/assets/modules/magento_image.png new file mode 100644 index 000000000..39de0820f Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/modules/magento_image.png differ diff --git a/account_partner_ledger_filter/static/description/assets/modules/pos_image.png b/account_partner_ledger_filter/static/description/assets/modules/pos_image.png new file mode 100644 index 000000000..c5932894b Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/modules/pos_image.png differ diff --git a/account_partner_ledger_filter/static/description/assets/modules/shopify_image.png b/account_partner_ledger_filter/static/description/assets/modules/shopify_image.png new file mode 100644 index 000000000..c6d92c16d Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/modules/shopify_image.png differ diff --git a/account_partner_ledger_filter/static/description/assets/screenshots/hero.png b/account_partner_ledger_filter/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..afedf3d08 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/screenshots/hero.png differ diff --git a/account_partner_ledger_filter/static/description/assets/screenshots/led.png b/account_partner_ledger_filter/static/description/assets/screenshots/led.png new file mode 100644 index 000000000..ab0b1fecd Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/screenshots/led.png differ diff --git a/account_partner_ledger_filter/static/description/assets/screenshots/par.png b/account_partner_ledger_filter/static/description/assets/screenshots/par.png new file mode 100644 index 000000000..2bb4d0ddf Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/screenshots/par.png differ diff --git a/account_partner_ledger_filter/static/description/assets/screenshots/partner.png b/account_partner_ledger_filter/static/description/assets/screenshots/partner.png new file mode 100644 index 000000000..fcc37dac0 Binary files /dev/null and b/account_partner_ledger_filter/static/description/assets/screenshots/partner.png differ diff --git a/account_partner_ledger_filter/static/description/banner.png b/account_partner_ledger_filter/static/description/banner.png new file mode 100644 index 000000000..6c38c9e40 Binary files /dev/null and b/account_partner_ledger_filter/static/description/banner.png differ diff --git a/account_partner_ledger_filter/static/description/icon.png b/account_partner_ledger_filter/static/description/icon.png new file mode 100644 index 000000000..12ea57e1d Binary files /dev/null and b/account_partner_ledger_filter/static/description/icon.png differ diff --git a/account_partner_ledger_filter/static/description/index.html b/account_partner_ledger_filter/static/description/index.html new file mode 100644 index 000000000..dcd294f57 --- /dev/null +++ b/account_partner_ledger_filter/static/description/index.html @@ -0,0 +1,560 @@ + +
+
+
+
+ +
+
+
+ Community +
+
+
+
+
+ +
+
+
+

+ Partner Ledger Report with Partner Filter

+

+ Creates a partner ledger report by filtering partners +

+ +
+
+ +
+
+

+ Explore this module +

+
+ + + + + +
+
+

+ Overview +

+
+ +
+

+ This module adds a filter to the partner ledger report in Odoo 15 Full Accounting Kit Module +

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Community Support

+

+ Available in Odoo 15.0 Community.

+
+
+
+
+ +
+
+

+ Partner Ledger Report with Partner Filter

+

+ Helps to filter partners and makes reports based on the input .

+
+
+ +
+ +
+
+

+ Screenshots +

+
+
+

+ Partner List View

+ +
+ +
+

+ Partner Form View

+ +
+ +
+

+ Partner ledger wizard View

+ +
+ +
+ + +
+
+

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
diff --git a/account_partner_ledger_filter/views/report.xml b/account_partner_ledger_filter/views/report.xml new file mode 100644 index 000000000..e85928158 --- /dev/null +++ b/account_partner_ledger_filter/views/report.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/account_partner_ledger_filter/wizard/__init__.py b/account_partner_ledger_filter/wizard/__init__.py new file mode 100644 index 000000000..07e120247 --- /dev/null +++ b/account_partner_ledger_filter/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import account_report_partner_ledger diff --git a/account_partner_ledger_filter/wizard/account_report_general_ledger_view.xml b/account_partner_ledger_filter/wizard/account_report_general_ledger_view.xml new file mode 100644 index 000000000..c7e1364e7 --- /dev/null +++ b/account_partner_ledger_filter/wizard/account_report_general_ledger_view.xml @@ -0,0 +1,15 @@ + + + + Partner Ledger + account.report.partner.ledger + + + + + + + + + + diff --git a/account_partner_ledger_filter/wizard/account_report_partner_ledger.py b/account_partner_ledger_filter/wizard/account_report_partner_ledger.py new file mode 100644 index 000000000..704848784 --- /dev/null +++ b/account_partner_ledger_filter/wizard/account_report_partner_ledger.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import fields, models + + +class AccountPartnerLedger(models.TransientModel): + _inherit = "account.report.partner.ledger" + + partner_ids = fields.Many2many('res.partner', 'partner_ledger_partner_rel', 'id', 'partner_id', string='Partners') + + def _print_report(self, data): + data = self.pre_print_report(data) + data['form'].update({'reconciled': self.reconciled, 'amount_currency': self.amount_currency, + 'partner_ids': self.partner_ids.ids}) + return self.env.ref('base_accounting_kit.action_report_partnerledger').report_action(self, data=data)