diff --git a/advanced_excel_reports/README.rst b/advanced_excel_reports/README.rst new file mode 100755 index 000000000..ebe0a92da --- /dev/null +++ b/advanced_excel_reports/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Advanced Excel Reports +====================== +This module helps to Print the excel report of the sale,invoice,picking of multiple records + +Configuration +============= +No additional configuration required + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (v15) Nisiya K @cybrosys, 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/advanced_excel_reports/__init__.py b/advanced_excel_reports/__init__.py new file mode 100755 index 000000000..50349d36a --- /dev/null +++ b/advanced_excel_reports/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 controllers +from . import models diff --git a/advanced_excel_reports/__manifest__.py b/advanced_excel_reports/__manifest__.py new file mode 100755 index 000000000..65e2a0a0b --- /dev/null +++ b/advanced_excel_reports/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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': "Advanced Excel Reports", + "version": "15.0.1.0.0", + "category": "Sale,Accounting,Warehouse", + "summary": """For printing excel reports of multiple records""", + "description": "Print the excel report of the sale,invoice,picking" + " of multiple records", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['sale_management', 'account', 'stock'], + 'data': [ + 'data/ir_action_data.xml' + ], + 'assets': + { + 'web.assets_backend': [ + 'advanced_excel_reports/static/src/js/excel_report.js' + ], + }, + 'images': [ + 'static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/advanced_excel_reports/controllers/__init__.py b/advanced_excel_reports/controllers/__init__.py new file mode 100755 index 000000000..81eabb7e5 --- /dev/null +++ b/advanced_excel_reports/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 advanced_excel_reports diff --git a/advanced_excel_reports/controllers/advanced_excel_reports.py b/advanced_excel_reports/controllers/advanced_excel_reports.py new file mode 100755 index 000000000..9e84304af --- /dev/null +++ b/advanced_excel_reports/controllers/advanced_excel_reports.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 json +from odoo import http +from odoo.http import content_disposition, request +from odoo.tools import html_escape + + +class XLSXReportController(http.Controller): + @http.route('/xlsx_reports', type='http', auth='user', + csrf=False) + def get_report_xlsx(self, model, options, output_format, report_name, + token='ads'): + """ Return data to python file passed from the javascript""" + session_unique_id = request.session.uid + report_object = request.env[model].with_user(session_unique_id) + options = json.loads(options) + try: + if output_format == 'xlsx': + response = request.make_response( + None, + headers=[('Content-Type', 'application/vnd.ms-excel'), ( + 'Content-Disposition', + content_disposition(f"{report_name}.xlsx")) + ] + ) + report_object.get_xlsx_report(options, response) + response.set_cookie('fileToken', token) + return response + except Exception: + error = { + 'code': 200, + 'message': 'Odoo Server Error', + } + return request.make_response(html_escape(json.dumps(error))) diff --git a/advanced_excel_reports/data/ir_action_data.xml b/advanced_excel_reports/data/ir_action_data.xml new file mode 100755 index 000000000..3b7119afb --- /dev/null +++ b/advanced_excel_reports/data/ir_action_data.xml @@ -0,0 +1,41 @@ + + + + + + Sale Order Excel Report + + + list + code + + action = record.print_excel_report() + + + + + Account Invoice Excel Report + + + list + code + + action = record.print_excel_report() + + + + + Picking Excel Report + + + list + code + + action = record.print_excel_report() + + + + diff --git a/advanced_excel_reports/doc/RELEASE_NOTES.md b/advanced_excel_reports/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..878bdfb6a --- /dev/null +++ b/advanced_excel_reports/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 11.06.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Advanced Excel Reports diff --git a/advanced_excel_reports/models/__init__.py b/advanced_excel_reports/models/__init__.py new file mode 100755 index 000000000..98eeb0292 --- /dev/null +++ b/advanced_excel_reports/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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_move +from . import sale_order +from . import stock_picking diff --git a/advanced_excel_reports/models/account_move.py b/advanced_excel_reports/models/account_move.py new file mode 100755 index 000000000..3a542808c --- /dev/null +++ b/advanced_excel_reports/models/account_move.py @@ -0,0 +1,174 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 io +import json +import xlsxwriter +from odoo import models +from odoo.tools import date_utils + + +class AccountMove(models.Model): + """ Added function for printing excel report + which is coming from a server action """ + _inherit = "account.move" + + def print_excel_report(self): + """ Function is used to print the Excel report + It will pass the invoice data through js file to + print Excel file""" + # Take the ids of the selected invoices + data = self._context['active_ids'] + return { + 'type': 'ir.actions.report', + 'report_type': 'xlsx', + 'data': {'model': 'account.move', + 'output_format': 'xlsx', + 'options': json.dumps(data, + default=date_utils.json_default), + 'report_name': 'Invoice Excel Report', }, } + + def get_xlsx_report(self, datas, response): + """ From this function we can create and design the Excel file template + and the map the values in the corresponding cells + :param datas: Selected record ids + :param response: Response after creating excel + """ + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + # for printing multiple sheet per file, iterate the invoices + for account_move in self.env['account.move'].browse(datas): + # Set file title as invoice when it is invoice and set bill + # if the move_type is out_invoice + account_name = 'INVOICE - ' + account_move.name if \ + account_move.move_type == 'out_invoice' else \ + 'VENDOR BILL - ' + account_move.name + company_name = 'Company Name : ' + account_move.company_id.name + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + ref = str( + account_move.payment_reference) if \ + account_move.payment_reference is not False else '' + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + payment_term = str( + account_move.invoice_payment_term_id.name) if \ + account_move.invoice_payment_term_id.name is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + fiscal_position = str( + account_move.fiscal_position_id.name) if \ + account_move.fiscal_position_id.name is not False else '' + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + sale_person = account_move.user_id.name if \ + account_move.user_id.name is not False else '' + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + incoterm = account_move.invoice_incoterm_id.name if \ + account_move.invoice_incoterm_id.name is not False else '' + invoice_date = str(account_move.invoice_date) + currency_symbol = account_move.currency_id.symbol + sheet = workbook.add_worksheet( + account_move.name) # Set sheet name as Invoice/Bill name + sheet.set_column(0, 8, 20) + head = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '20px'}) + txt = workbook.add_format( + {'align': 'center', 'bold': True}) + txt_border = workbook.add_format( + {'align': 'center', 'bold': True, 'border': 1}) + border = workbook.add_format({'border': 1}) + sheet.merge_range('B2:E3', account_name, head) + sheet.merge_range('B4:E4', company_name, txt) + sheet.write('A6', 'Customer/Vendor Name', txt) + sheet.write('B6', account_move.partner_id.name) + sheet.write('B7', account_move.partner_id.street) + sheet.write('B8', account_move.partner_id.state_id.name) + sheet.write('B9', account_move.partner_id.zip) + sheet.write('B10', account_move.partner_id.country_id.name) + sheet.write('B11', account_move.partner_id.phone) + sheet.write('D6', 'Date', txt) + sheet.write('D7', 'Payment Term', txt) + sheet.write('D8', 'Journal', txt) + sheet.write('D9', 'Currency', txt) + sheet.write('D10', 'State', txt) + sheet.write('E6', invoice_date) + sheet.write('E7', payment_term) + sheet.write('E8', account_move.journal_id.name) + sheet.write('E9', account_move.currency_id.name) + sheet.write('E10', account_move.state) + sheet.write('A13', 'Sales Persons', txt) + sheet.write('A14', sale_person) + sheet.write('B13', 'Source Document', txt) + sheet.write('B14', ref) + sheet.write('C13', 'Fiscal Position', txt) + sheet.write('C14', fiscal_position) + sheet.write('D13', 'Incoterm', txt) + sheet.write('D14', incoterm) + sheet.write('A16', 'Product', txt_border) + sheet.write('B16', 'Description', txt_border) + sheet.write('C16', 'Quantity', txt_border) + sheet.write('D16', 'Account', txt_border) + sheet.write('E16', 'Discount %', txt_border) + sheet.write('F16', 'Unit Price', txt_border) + sheet.write('G16', 'Tax', txt_border) + sheet.write('H16', 'Subtotal', txt_border) + row = 17 + self._add_invoice_line_to_excel(sheet, account_move, row, border, txt_border, + currency_symbol) + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() + + def _add_invoice_line_to_excel(self, sheet, account_move, row, border, txt_border, + currency_symbol): + """ + Function to add invoice line values to the Excel file + :param sheet: Current Excel sheet where data to be added + :param account_move : Object of invoice in which data adding + :param row:Excel row value of next data to be added + :param border :Excel styling for adding border for each cell + :param txt_border : Excel styling for adding data in each cell + :param currency_symbol : Currency symbol of current record + """ + for line in account_move.invoice_line_ids: + # For adding value of the invoice lines + tax = str( + line.tax_ids.name) if line.tax_ids.name \ + is not False else '' + sheet.write(row, 0, line.product_id.name, border) + sheet.write(row, 1, line.name, border) + sheet.write(row, 2, line.quantity, border) + sheet.write(row, 3, line.account_id.display_name, border) + sheet.write(row, 4, line.discount, border) + sheet.write(row, 5, line.price_unit, border) + sheet.write(row, 6, tax, border) + sheet.write(row, 7, + str(currency_symbol) + str(line.price_subtotal), + border) + row += 1 + row += 1 + sheet.write(row, 6, 'Total Amount', txt_border) + sheet.write(row, 7, + str(currency_symbol) + str(account_move.amount_total), + border) diff --git a/advanced_excel_reports/models/sale_order.py b/advanced_excel_reports/models/sale_order.py new file mode 100755 index 000000000..daf5e314e --- /dev/null +++ b/advanced_excel_reports/models/sale_order.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 io +import json +import xlsxwriter +from odoo import models +from odoo.tools import date_utils + + +class SaleOrder(models.Model): + """ Added a function that to print sale order excel report + which is added through server action """ + _inherit = "sale.order" + + def print_excel_report(self): + """ Function is used to print the Excel report + It will pass the sale order data through js file to + print Excel file""" + # Take the ids of the selected sale orders + data = self._context['active_ids'] + return { + 'type': 'ir.actions.report', + 'report_type': 'xlsx', + 'data': {'model': 'sale.order', + 'output_format': 'xlsx', + 'options': json.dumps(data, + default=date_utils.json_default), + 'report_name': 'Sale/Quotation Excel Report', }, } + + def get_xlsx_report(self, datas, response): + """ From this function we can create and design the Excel file template + and the map the values in the corresponding cells + :param datas:Selected record ids + :param response: Response after creating excel + """ + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + # for printing multiple sheet per file, iterate the sale orders + for sale in self.env['sale.order'].browse(datas): + sale_name = 'SALE ORDER - ' + sale.name + company_name = 'Company Name : ' + sale.company_id.name + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + ref = str( + sale.client_order_ref) if \ + sale.client_order_ref is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + payment_term = str( + sale.payment_term_id.name) if \ + sale.payment_term_id.name is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + fiscal_position = str( + sale.fiscal_position_id.name) if \ + sale.fiscal_position_id.name is not False else '' + sheet = workbook.add_worksheet( + sale.name) # set the sheet name as sale order name + sheet.set_column(0, 8, 20) + sale_date = str(sale.date_order) + currency_symbol = sale.currency_id.symbol + head = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '20px'}) + txt = workbook.add_format({'align': 'center', 'bold': True}) + txt_border = workbook.add_format( + {'align': 'center', 'bold': True, 'border': 1}) + border = workbook.add_format({'border': 1}) + sheet.merge_range('B2:E3', sale_name, head) + sheet.merge_range('B4:E4', company_name, txt) + sheet.write('A6', 'Customer Name', txt) + sheet.write('B6', sale.partner_id.name) + sheet.write('B7', sale.partner_id.street) + sheet.write('B8', sale.partner_id.state_id.name) + sheet.write('B9', sale.partner_id.zip) + sheet.write('B10', sale.partner_id.country_id.name) + sheet.write('B11', sale.partner_id.phone) + sheet.write('D6', 'Date', txt) + sheet.write('D7', 'Payment Term', txt) + sheet.write('D8', 'Price List', txt) + sheet.write('D9', 'State', txt) + sheet.write('E6', sale_date) + sheet.write('E7', payment_term) + sheet.write('E8', sale.pricelist_id.name) + sheet.write('E9', sale.state) + sheet.write('A13', 'Sales Team', txt) + sheet.write('A14', sale.team_id.name) + sheet.write('B13', 'Sales Persons', txt) + sheet.write('B14', sale.user_id.name) + sheet.write('C13', 'Source Document', txt) + sheet.write('C14', ref) + sheet.write('D13', 'Fiscal Position', txt) + sheet.write('D14', fiscal_position) + sheet.write('A16', 'Product', txt_border) + sheet.write('B16', 'Description', txt_border) + sheet.write('C16', 'Quantity', txt_border) + sheet.write('D16', 'Delivered', txt_border) + sheet.write('E16', 'Invoiced', txt_border) + sheet.write('F16', 'Unit Price', txt_border) + sheet.write('G16', 'Tax', txt_border) + sheet.write('H16', 'Subtotal', txt_border) + row = 17 + # calling this function for adding sale order line data to the + # Excel sheet + self._add_order_line_to_excel(sheet, sale, row, border, txt_border, + currency_symbol) + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() + + def _add_order_line_to_excel(self, sheet, sale, row, border, txt_border, + currency_symbol): + """ + Function to add sale order line values to the Excel file + :param sheet: Current Excel sheet where data to be added + :param sale : Object of sale order in which data adding + :param row:Excel row value of next data to be added + :param border :Excel styling for adding border for each cell + :param txt_border : Excel styling for adding data in each cell + :param currency_symbol : Currency symbol of current record + """ + for line in sale.order_line: + # For adding value of the sale order lines + + tax = str( + line.tax_id.name) if line.tax_id.name is not False else '' + sheet.write(row, 0, line.product_id.name, border) + sheet.write(row, 1, line.name, border) + sheet.write(row, 2, line.product_uom_qty, border) + sheet.write(row, 3, line.qty_delivered, border) + sheet.write(row, 4, line.qty_invoiced, border) + sheet.write(row, 5, line.price_unit, border) + sheet.write(row, 6, tax, border) + sheet.write(row, 7, + str(currency_symbol) + str(line.price_subtotal), + border) + row += 1 + row += 1 + sheet.write(row, 6, 'Total Amount', txt_border) + sheet.write(row, 7, str(currency_symbol) + str(sale.amount_total), + border) diff --git a/advanced_excel_reports/models/stock_picking.py b/advanced_excel_reports/models/stock_picking.py new file mode 100755 index 000000000..043f2dc89 --- /dev/null +++ b/advanced_excel_reports/models/stock_picking.py @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 io +import json +import xlsxwriter +from odoo import models +from odoo.tools import date_utils + + +class StockPicking(models.Model): + """ Added a function that to print sale order Excel report + which is added using server action """ + _inherit = "stock.picking" + + def print_excel_report(self): + """ Function is used to print the Excel report + It will pass the picking data through js file to + print Excel file""" + # Take the ids of the selected pickings + data = self._context['active_ids'] + return { + 'type': 'ir.actions.report', + 'report_type': 'xlsx', + 'data': {'model': 'stock.picking', + 'output_format': 'xlsx', + 'options': json.dumps(data, + default=date_utils.json_default), + 'report_name': 'Picking Order Excel Report', }, } + + def get_xlsx_report(self, datas, response): + """ From this function we can create and design the Excel file template + and the map the values in the corresponding cells + :param datas:Selected record ids + :param response: Response after creating excel + """ + + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + # for printing multiple sheet per file, iterate the pickings + for picking in self.env['stock.picking'].browse(datas): + picking_name = 'Delivery - ' + picking.name + company_name = 'Company Name : ' + picking.company_id.name + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + ref = picking.origin if picking.origin is not False else '' + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + responsible_person = picking.user_id.name if \ + picking.user_id.name is not False else '' + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + partner_name = picking.partner_id.name if \ + picking.partner_id.name is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + partner_street = picking.partner_id.street if \ + picking.partner_id.street is not False else '' + # Copy the value to a variable set black if it is null instead of + # printing 'FALSE' in the report + partner_state = picking.partner_id.state_id.name if \ + picking.partner_id.state_id.name is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + partner_zip = picking.partner_id.zip if \ + picking.partner_id.zip is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + partner_county = picking.partner_id.country_id.name if \ + picking.partner_id.country_id.name is not False else '' + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + partner_phone = picking.partner_id.phone if \ + picking.partner_id.phone is not False else '' + # Copy the value to a variable set black if it is null instead + # of printing 'FALSE' in the report + date_done = str(picking.date_done) if \ + picking.date_done is not False else '' + scheduled_date = str(picking.scheduled_date) + sheet = workbook.add_worksheet( + picking.name) # set the sheet name as picking name + sheet.set_column(0, 8, 25) + head = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '20px'}) + txt = workbook.add_format({'align': 'center', 'bold': True}) + txt_border = workbook.add_format( + {'align': 'center', 'bold': True, 'border': 1}) + border = workbook.add_format({'border': 1}) + sheet.merge_range('B2:E3', picking_name, head) + sheet.merge_range('B4:E4', company_name, txt) + sheet.write('A6', 'Customer/Vendor Name', txt) + sheet.write('B6', partner_name) + sheet.write('B7', partner_street) + sheet.write('B8', partner_state) + sheet.write('B9', partner_zip) + sheet.write('B10', partner_county) + sheet.write('B11', partner_phone) + sheet.write('D6', 'Scheduled Date', txt) + sheet.write('D7', 'Effective Date', txt) + sheet.write('D8', 'Operation Type', txt) + sheet.write('D9', 'Source Location', txt) + sheet.write('D10', 'Destination Location', txt) + sheet.write('D11', 'State', txt) + sheet.write('E6', scheduled_date) + sheet.write('E7', date_done) + sheet.write('E8', picking.picking_type_id.display_name) + sheet.write('E9', picking.location_id.complete_name) + sheet.write('E10', picking.location_dest_id.complete_name) + sheet.write('E11', picking.state) + sheet.write('A13', 'Responsible Person', txt) + sheet.write('A14', responsible_person) + sheet.write('B13', 'Source Document', txt) + sheet.write('B14', ref) + sheet.write('A16', 'Product', txt_border) + sheet.write('B16', 'Description', txt_border) + sheet.write('C16', 'Scheduled Date', txt_border) + sheet.write('D16', 'Deadline', txt_border) + sheet.write('E16', 'Quantity', txt_border) + sheet.write('F16', 'Quantity Done', txt_border) + row = 17 + # calling this function for adding picking line data to the + # Excel sheet + self._add_picking_line_to_excel(sheet, picking, row, border) + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() + + def _add_picking_line_to_excel(self, sheet, picking, row, border): + """ + Function to add stock picking line values to the Excel file + :param sheet: Current Excel sheet where data to be added + :param picking : Object of transfer in which data adding + :param row:Excel row value of next data to be added + :param border :Excel styling for adding border for each cell + """ + # For adding value of the sale order line + for line in picking.move_ids_without_package: + # Copy the value to a variable set black if it is null + # instead of printing 'FALSE' in the report + date_deadline = str(line.date_deadline) if \ + line.date_deadline is not False else '' + date = str(line.date) + sheet.write(row, 0, line.product_id.name, border) + sheet.write(row, 1, line.description_picking, border) + sheet.write(row, 2, date, border) + sheet.write(row, 3, date_deadline, border) + sheet.write(row, 4, line.product_uom_qty, border) + sheet.write(row, 5, line.quantity_done, border) + row += 1 diff --git a/advanced_excel_reports/static/description/assets/icons/check.png b/advanced_excel_reports/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/check.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/chevron.png b/advanced_excel_reports/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/chevron.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/cogs.png b/advanced_excel_reports/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/cogs.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/consultation.png b/advanced_excel_reports/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/consultation.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/ecom-black.png b/advanced_excel_reports/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/ecom-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/education-black.png b/advanced_excel_reports/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/education-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/hotel-black.png b/advanced_excel_reports/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/hotel-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/license.png b/advanced_excel_reports/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/license.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/lifebuoy.png b/advanced_excel_reports/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/lifebuoy.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/logo.png b/advanced_excel_reports/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/logo.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/manufacturing-black.png b/advanced_excel_reports/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/manufacturing-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/pos-black.png b/advanced_excel_reports/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/pos-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/puzzle.png b/advanced_excel_reports/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/puzzle.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/restaurant-black.png b/advanced_excel_reports/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/restaurant-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/service-black.png b/advanced_excel_reports/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/service-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/trading-black.png b/advanced_excel_reports/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/trading-black.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/training.png b/advanced_excel_reports/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/training.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/update.png b/advanced_excel_reports/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/update.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/user.png b/advanced_excel_reports/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/user.png differ diff --git a/advanced_excel_reports/static/description/assets/icons/wrench.png b/advanced_excel_reports/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/advanced_excel_reports/static/description/assets/icons/wrench.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/Cybrosys R.png b/advanced_excel_reports/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/Cybrosys R.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/categories.png b/advanced_excel_reports/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/categories.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/check-box.png b/advanced_excel_reports/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/check-box.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/compass.png b/advanced_excel_reports/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/compass.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/corporate.png b/advanced_excel_reports/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/corporate.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/customer-support.png b/advanced_excel_reports/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/customer-support.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/cybrosys-logo.png b/advanced_excel_reports/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/cybrosys-logo.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/features.png b/advanced_excel_reports/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/features.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/logo.png b/advanced_excel_reports/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/logo.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/pictures.png b/advanced_excel_reports/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/pictures.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/pie-chart.png b/advanced_excel_reports/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/pie-chart.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/right-arrow.png b/advanced_excel_reports/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/right-arrow.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/star.png b/advanced_excel_reports/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/star.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/support.png b/advanced_excel_reports/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/support.png differ diff --git a/advanced_excel_reports/static/description/assets/misc/whatsapp.png b/advanced_excel_reports/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/misc/whatsapp.png differ diff --git a/advanced_excel_reports/static/description/assets/modules/1_sale_discount.png b/advanced_excel_reports/static/description/assets/modules/1_sale_discount.png new file mode 100644 index 000000000..004c61a9e Binary files /dev/null and b/advanced_excel_reports/static/description/assets/modules/1_sale_discount.png differ diff --git a/advanced_excel_reports/static/description/assets/modules/2_advance_report.png b/advanced_excel_reports/static/description/assets/modules/2_advance_report.png new file mode 100644 index 000000000..1c019bdd8 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/modules/2_advance_report.png differ diff --git a/advanced_excel_reports/static/description/assets/modules/3_product_img.png b/advanced_excel_reports/static/description/assets/modules/3_product_img.png new file mode 100644 index 000000000..0a798d149 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/modules/3_product_img.png differ diff --git a/advanced_excel_reports/static/description/assets/modules/4_subscription.png b/advanced_excel_reports/static/description/assets/modules/4_subscription.png new file mode 100644 index 000000000..a5acbabc2 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/modules/4_subscription.png differ diff --git a/advanced_excel_reports/static/description/assets/modules/5_sale_orderline_img.png b/advanced_excel_reports/static/description/assets/modules/5_sale_orderline_img.png new file mode 100644 index 000000000..09e2d45b2 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/modules/5_sale_orderline_img.png differ diff --git a/advanced_excel_reports/static/description/assets/modules/6_product_pack.png b/advanced_excel_reports/static/description/assets/modules/6_product_pack.png new file mode 100644 index 000000000..2c260531d Binary files /dev/null and b/advanced_excel_reports/static/description/assets/modules/6_product_pack.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/1.png b/advanced_excel_reports/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..92c1d3f17 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/1.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/2.png b/advanced_excel_reports/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..c69f26d5b Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/2.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/3.png b/advanced_excel_reports/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..21b223e8d Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/3.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/4.png b/advanced_excel_reports/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..a8657fff1 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/4.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/5.png b/advanced_excel_reports/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..662b691be Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/5.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/6.png b/advanced_excel_reports/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..26e16612a Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/6.png differ diff --git a/advanced_excel_reports/static/description/assets/screenshots/hero.gif b/advanced_excel_reports/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..37f89c1ec Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots/hero.gif differ diff --git a/advanced_excel_reports/static/description/assets/screenshots_advanced_excel_reports.zip b/advanced_excel_reports/static/description/assets/screenshots_advanced_excel_reports.zip new file mode 100644 index 000000000..e6f991762 Binary files /dev/null and b/advanced_excel_reports/static/description/assets/screenshots_advanced_excel_reports.zip differ diff --git a/advanced_excel_reports/static/description/banner.png b/advanced_excel_reports/static/description/banner.png new file mode 100644 index 000000000..8898f8ae4 Binary files /dev/null and b/advanced_excel_reports/static/description/banner.png differ diff --git a/advanced_excel_reports/static/description/icon.png b/advanced_excel_reports/static/description/icon.png new file mode 100644 index 000000000..d10d76f0a Binary files /dev/null and b/advanced_excel_reports/static/description/icon.png differ diff --git a/advanced_excel_reports/static/description/index.html b/advanced_excel_reports/static/description/index.html new file mode 100644 index 000000000..1bd224416 --- /dev/null +++ b/advanced_excel_reports/static/description/index.html @@ -0,0 +1,811 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Advanced Excel Reports

+

+ Print Excel Reports Of Multiple Records From The Sale Account And Inventory Module.

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ In this module Print Excel Reports Of Multiple Records From The Sale Account And Inventory Module.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Available in Odoo 15.0 Community and Enterprise.

+
+
+ +
+
+ +
+
+

+ Multiple excel reports

+
+
+ +
+
+ +
+
+

+ Report for the multiple records in a single file

+
+
+ +
+
+ +
+
+

+ Multiple sheets per excel file

+
+
+ +
+
+ +
+
+

+ Able to print report for Sales,Invoice,Picking.

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Sale Order Print Menu

+

+ Go to Sales -> select records from the tree view for the sale order -> From the action menu -> Sale Order Excel Report +

+ +
+ +
+

+ Sale Order Excel Report

+

+ By clicking Sale Order Excel Report we can print sale order excel report. +

+ +
+ +
+

+ Invoice Print Menu

+

+ Go to Invoicing -> select records from the tree view for the invoice -> From the action menu -> Account Invoice Excel Report +

+ +
+ +
+

+ Invoice Excel Report.

+

+ By clicking the Account Invoice Excel Report button we can print the Excel report +

+ +
+ +
+

+ Picking Excel Report Menu

+

+ Go to inventory -> select records from the tree view for the transfer -> From the + action menu -> Picking Excel Report +

+ +
+ +
+

+ Picking Excel Reports

+

+ By clicking the Picking Excel Report button we can print the Excel report +

+ +
+ +
+ +
+
+

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?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_excel_reports/static/src/js/excel_report.js b/advanced_excel_reports/static/src/js/excel_report.js new file mode 100755 index 000000000..d5b0e2836 --- /dev/null +++ b/advanced_excel_reports/static/src/js/excel_report.js @@ -0,0 +1,17 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { BlockUI } from "@web/core/ui/block_ui"; +import { download } from "@web/core/network/download"; +registry.category("ir.actions.report handlers").add("xlsx", async(action)=> { + //Passing data to the controller to print the excel file + if (action.report_type === 'xlsx') { + BlockUI; + await download({ + url: '/xlsx_reports', + data: action.data, + complete: () => unblockUI, + error: (error) => self.call('crash_manager', 'rpc_error', error), + }); + return true + } +});