diff --git a/export_stockinfo_xls/README.rst b/export_stockinfo_xls/README.rst new file mode 100644 index 000000000..01f377256 --- /dev/null +++ b/export_stockinfo_xls/README.rst @@ -0,0 +1,41 @@ +Export Product Stock in Excel v14 +================================= +This module helps you to take current stock report for all products in each warehouse. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: Cybrosys Techno Solutions odoo@cybrosys.com + Version 14: Minhaj T @cybrosys + + +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/export_stockinfo_xls/__init__.py b/export_stockinfo_xls/__init__.py new file mode 100644 index 000000000..979abddaf --- /dev/null +++ b/export_stockinfo_xls/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:Cybrosys Techno Solutions(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 controllers diff --git a/export_stockinfo_xls/__manifest__.py b/export_stockinfo_xls/__manifest__.py new file mode 100644 index 000000000..38e6c7693 --- /dev/null +++ b/export_stockinfo_xls/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies(). +# +# 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': 'Export Product Stock in Excel', + 'version': '14.0.1.0.0', + 'summary': "Current Stock Report for all Products in each Warehouse", + 'description': "Current Stock Report for all Products in each Warehouse, Odoo 13,Odoo13", + 'category': 'Warehouse', + 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': [ + 'base', + 'stock', + 'sale', + 'purchase', + ], + 'data': [ + 'views/wizard_view.xml', + 'views/action_manager.xml', + 'security/ir.model.access.csv', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'auto_install': False, +} diff --git a/export_stockinfo_xls/controllers/__init__.py b/export_stockinfo_xls/controllers/__init__.py new file mode 100644 index 000000000..772ede554 --- /dev/null +++ b/export_stockinfo_xls/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:Cybrosys Techno Solutions(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 main diff --git a/export_stockinfo_xls/controllers/main.py b/export_stockinfo_xls/controllers/main.py new file mode 100644 index 000000000..d7f879002 --- /dev/null +++ b/export_stockinfo_xls/controllers/main.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:Cybrosys Techno Solutions(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 . +# +############################################################################# + +import json +from odoo import http +from odoo.http import content_disposition, request +from odoo.addons.web.controllers.main import _serialize_exception +from odoo.tools import html_escape + + +class XLSXReportController(http.Controller): + + @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) + def get_report_xlsx(self, model, options, output_format, token, report_name, **kw): + uid = request.session.uid + report_obj = request.env[model].with_user(uid) + 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(report_name + '.xlsx')) + ] + ) + report_obj.get_xlsx_report(options, response) + response.set_cookie('fileToken', token) + return response + except Exception as e: + se = _serialize_exception(e) + error = { + 'code': 200, + 'message': 'Odoo Server Error', + 'data': se + } + return request.make_response(html_escape(json.dumps(error))) diff --git a/export_stockinfo_xls/doc/RELEASE_NOTES.md b/export_stockinfo_xls/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..be57b8b7f --- /dev/null +++ b/export_stockinfo_xls/doc/RELEASE_NOTES.md @@ -0,0 +1,11 @@ +## Module + +#### 03.10.2020 +#### Version 14.0.1.0.0 +#### ADD +Initial Commit Export Product Stock in Excel + + + + + diff --git a/export_stockinfo_xls/models/__init__.py b/export_stockinfo_xls/models/__init__.py new file mode 100644 index 000000000..beaa6787a --- /dev/null +++ b/export_stockinfo_xls/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:Cybrosys Techno Solutions(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 res_partner +from . import wizard diff --git a/export_stockinfo_xls/models/res_partner.py b/export_stockinfo_xls/models/res_partner.py new file mode 100644 index 000000000..8961faaa1 --- /dev/null +++ b/export_stockinfo_xls/models/res_partner.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:Cybrosys Techno Solutions(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 models, fields + + +class Partner(models.Model): + _inherit = 'res.partner' + + supplier_id = fields.Many2many('wizard.stock.history', 'supp_wiz_rel', 'wiz', 'supp', invisible=True) + + +class Category(models.Model): + _inherit = 'product.category' + + obj = fields.Many2many('wizard.stock.history', 'categ_wiz_rel', 'wiz', 'categ', invisible=True) + + +class Warehouse(models.Model): + _inherit = 'stock.warehouse' + + obj = fields.Many2many('wizard.stock.history', 'wh_wiz_rel', 'wiz', 'wh', invisible=True) diff --git a/export_stockinfo_xls/models/wizard.py b/export_stockinfo_xls/models/wizard.py new file mode 100644 index 000000000..7b4f29a9c --- /dev/null +++ b/export_stockinfo_xls/models/wizard.py @@ -0,0 +1,249 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author:Cybrosys Techno Solutions(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 . +# +############################################################################# +import time +from datetime import date, datetime +import pytz +import json +import datetime +import io +from odoo import api, fields, models, _ +from odoo.tools import date_utils +try: + from odoo.tools.misc import xlsxwriter +except ImportError: + import xlsxwriter + + +class StockReport(models.TransientModel): + _name = "wizard.stock.history" + _description = "Current Stock History" + + warehouse = fields.Many2many('stock.warehouse', 'wh_wiz_rel', 'wh', 'wiz', string='Warehouse', required=True) + category = fields.Many2many('product.category', 'categ_wiz_rel', 'categ', 'wiz', string='Warehouse') + + def export_xls(self): + data = { + 'ids': self.ids, + 'model': self._name, + 'warehouse': self.warehouse.ids, + 'category': self.category.ids, + + } + return { + 'type': 'ir.actions.report', + 'data': {'model': 'wizard.stock.history', + 'options': json.dumps(data, default=date_utils.json_default), + 'output_format': 'xlsx', + 'report_name': 'Current Stock History', + }, + 'report_type': 'xlsx' + } + + def get_warehouse(self, data): + wh = data.warehouse.mapped('id') + obj = self.env['stock.warehouse'].search([('id', 'in', wh)]) + l1 = [] + l2 = [] + for j in obj: + l1.append(j.name) + l2.append(j.id) + return l1, l2 + + def get_lines(self, data, warehouse): + lines = [] + categ_id = data.mapped('id') + if categ_id: + categ_products = self.env['product.product'].search([('categ_id', 'in', categ_id)]) + + else: + categ_products = self.env['product.product'].search([]) + product_ids = tuple([pro_id.id for pro_id in categ_products]) + sale_query = """ + SELECT sum(s_o_l.product_uom_qty) AS product_uom_qty, s_o_l.product_id FROM sale_order_line AS s_o_l + JOIN sale_order AS s_o ON s_o_l.order_id = s_o.id + WHERE s_o.state IN ('sale','done') + AND s_o.warehouse_id = %s + AND s_o_l.product_id in %s group by s_o_l.product_id""" + purchase_query = """ + SELECT sum(p_o_l.product_qty) AS product_qty, p_o_l.product_id FROM purchase_order_line AS p_o_l + JOIN purchase_order AS p_o ON p_o_l.order_id = p_o.id + INNER JOIN stock_picking_type AS s_p_t ON p_o.picking_type_id = s_p_t.id + WHERE p_o.state IN ('purchase','done') + AND s_p_t.warehouse_id = %s AND p_o_l.product_id in %s group by p_o_l.product_id""" + params = warehouse, product_ids if product_ids else (0, 0) + self._cr.execute(sale_query, params) + sol_query_obj = self._cr.dictfetchall() + self._cr.execute(purchase_query, params) + pol_query_obj = self._cr.dictfetchall() + for obj in categ_products: + sale_value = 0 + purchase_value = 0 + for sol_product in sol_query_obj: + if sol_product['product_id'] == obj.id: + sale_value = sol_product['product_uom_qty'] + for pol_product in pol_query_obj: + if pol_product['product_id'] == obj.id: + purchase_value = pol_product['product_qty'] + virtual_available = obj.with_context({'warehouse': warehouse}).virtual_available + outgoing_qty = obj.with_context({'warehouse': warehouse}).outgoing_qty + incoming_qty = obj.with_context({'warehouse': warehouse}).incoming_qty + available_qty = virtual_available + outgoing_qty - incoming_qty + value = available_qty * obj.standard_price + vals = { + 'sku': obj.default_code, + 'name': obj.name, + 'category': obj.categ_id.name, + 'cost_price': obj.standard_price, + 'available': available_qty, + 'virtual': virtual_available, + 'incoming': incoming_qty, + 'outgoing': outgoing_qty, + 'net_on_hand': obj.with_context({'warehouse': warehouse}).qty_available, + 'total_value': value, + 'sale_value': sale_value, + 'purchase_value': purchase_value, + } + lines.append(vals) + return lines + + def get_xlsx_report(self, data, response): + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + lines = self.browse(data['ids']) + d = lines.category + get_warehouse = self.get_warehouse(lines) + count = len(get_warehouse[0]) * 11 + 6 + comp = self.env.user.company_id.name + sheet = workbook.add_worksheet('Stock Info') + format0 = workbook.add_format({'font_size': 20, 'align': 'center', 'bold': True}) + format1 = workbook.add_format({'font_size': 14, 'align': 'vcenter', 'bold': True}) + format11 = workbook.add_format({'font_size': 12, 'align': 'center', 'bold': True}) + format21 = workbook.add_format({'font_size': 10, 'align': 'center', 'bold': True}) + format3 = workbook.add_format({'bottom': True, 'top': True, 'font_size': 12}) + format4 = workbook.add_format({'font_size': 12, 'align': 'left', 'bold': True}) + font_size_8 = workbook.add_format({'font_size': 8, 'align': 'center'}) + font_size_8_l = workbook.add_format({'font_size': 8, 'align': 'left'}) + font_size_8_r = workbook.add_format({'font_size': 8, 'align': 'right'}) + red_mark = workbook.add_format({'font_size': 8, 'bg_color': 'red'}) + justify = workbook.add_format({'font_size': 12}) + format3.set_align('center') + justify.set_align('justify') + format1.set_align('center') + red_mark.set_align('center') + sheet.merge_range(1, 7, 2, 10, 'Product Stock Info', format0) + sheet.merge_range(3, 7, 3, 10, comp, format11) + w_house = ', ' + cat = ', ' + c = [] + d1 = d.mapped('id') + if d1: + for i in d1: + c.append(self.env['product.category'].browse(i).name) + cat = cat.join(c) + sheet.merge_range(4, 0, 4, 1, 'Category(s) : ', format4) + sheet.merge_range(4, 2, 4, 3 + len(d1), cat, format4) + sheet.merge_range(5, 0, 5, 1, 'Warehouse(s) : ', format4) + w_house = w_house.join(get_warehouse[0]) + sheet.merge_range(5, 2, 5, 3 + len(get_warehouse[0]), w_house, format4) + user = self.env['res.users'].browse(self.env.uid) + tz = pytz.timezone(user.tz if user.tz else 'UTC') + times = pytz.utc.localize(datetime.datetime.now()).astimezone(tz) + sheet.merge_range('A8:G8', 'Report Date: ' + str(times.strftime("%Y-%m-%d %H:%M %p")), format1) + sheet.merge_range(7, 7, 7, count, 'Warehouses', format1) + sheet.merge_range('A9:G9', 'Product Information', format11) + w_col_no = 6 + w_col_no1 = 7 + for i in get_warehouse[0]: + w_col_no = w_col_no + 11 + sheet.merge_range(8, w_col_no1, 8, w_col_no, i, format11) + w_col_no1 = w_col_no1 + 11 + sheet.write(9, 0, 'SKU', format21) + sheet.merge_range(9, 1, 9, 3, 'Name', format21) + sheet.merge_range(9, 4, 9, 5, 'Category', format21) + sheet.write(9, 6, 'Cost Price', format21) + p_col_no1 = 7 + for i in get_warehouse[0]: + sheet.write(9, p_col_no1, 'Available', format21) + sheet.write(9, p_col_no1 + 1, 'Virtual', format21) + sheet.write(9, p_col_no1 + 2, 'Incoming', format21) + sheet.write(9, p_col_no1 + 3, 'Outgoing', format21) + sheet.merge_range(9, p_col_no1 + 4, 9, p_col_no1 + 5, 'Net On Hand', format21) + sheet.merge_range(9, p_col_no1 + 6, 9, p_col_no1 + 7, 'Total Sold', format21) + sheet.merge_range(9, p_col_no1 + 8, 9, p_col_no1 + 9, 'Total Purchased', format21) + sheet.write(9, p_col_no1 + 10, 'Valuation', format21) + p_col_no1 = p_col_no1 + 11 + prod_row = 10 + prod_col = 0 + for i in get_warehouse[1]: + get_line = self.get_lines(d, i) + for each in get_line: + sheet.write(prod_row, prod_col, each['sku'], font_size_8) + sheet.merge_range(prod_row, prod_col + 1, prod_row, prod_col + 3, each['name'], font_size_8_l) + sheet.merge_range(prod_row, prod_col + 4, prod_row, prod_col + 5, each['category'], font_size_8_l) + sheet.write(prod_row, prod_col + 6, each['cost_price'], font_size_8_r) + prod_row = prod_row + 1 + break + prod_row = 10 + prod_col = 7 + for i in get_warehouse[1]: + get_line = self.get_lines(d, i) + for each in get_line: + if each['available'] < 0: + sheet.write(prod_row, prod_col, each['available'], red_mark) + else: + sheet.write(prod_row, prod_col, each['available'], font_size_8) + if each['virtual'] < 0: + sheet.write(prod_row, prod_col + 1, each['virtual'], red_mark) + else: + sheet.write(prod_row, prod_col + 1, each['virtual'], font_size_8) + if each['incoming'] < 0: + sheet.write(prod_row, prod_col + 2, each['incoming'], red_mark) + else: + sheet.write(prod_row, prod_col + 2, each['incoming'], font_size_8) + if each['outgoing'] < 0: + sheet.write(prod_row, prod_col + 3, each['outgoing'], red_mark) + else: + sheet.write(prod_row, prod_col + 3, each['outgoing'], font_size_8) + if each['net_on_hand'] < 0: + sheet.merge_range(prod_row, prod_col + 4, prod_row, prod_col + 5, each['net_on_hand'], red_mark) + else: + sheet.merge_range(prod_row, prod_col + 4, prod_row, prod_col + 5, each['net_on_hand'], font_size_8) + if each['sale_value'] < 0: + sheet.merge_range(prod_row, prod_col + 6, prod_row, prod_col + 7, each['sale_value'], red_mark) + else: + sheet.merge_range(prod_row, prod_col + 6, prod_row, prod_col + 7, each['sale_value'], font_size_8) + if each['purchase_value'] < 0: + sheet.merge_range(prod_row, prod_col + 8, prod_row, prod_col + 9, each['purchase_value'], red_mark) + else: + sheet.merge_range(prod_row, prod_col + 8, prod_row, prod_col + 9, each['purchase_value'], + font_size_8) + if each['total_value'] < 0: + sheet.write(prod_row, prod_col + 10, each['total_value'], red_mark) + else: + sheet.write(prod_row, prod_col + 10, each['total_value'], font_size_8_r) + prod_row = prod_row + 1 + prod_row = 10 + prod_col = prod_col + 11 + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() diff --git a/export_stockinfo_xls/security/ir.model.access.csv b/export_stockinfo_xls/security/ir.model.access.csv new file mode 100644 index 000000000..1c1a4d4a1 --- /dev/null +++ b/export_stockinfo_xls/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_wizard_stock_history_user,wizard.stock.history,model_wizard_stock_history,base.group_user,1,1,1,1 + diff --git a/export_stockinfo_xls/static/description/banner.png b/export_stockinfo_xls/static/description/banner.png new file mode 100644 index 000000000..d09dd347f Binary files /dev/null and b/export_stockinfo_xls/static/description/banner.png differ diff --git a/export_stockinfo_xls/static/description/icon.png b/export_stockinfo_xls/static/description/icon.png new file mode 100644 index 000000000..6817bc00e Binary files /dev/null and b/export_stockinfo_xls/static/description/icon.png differ diff --git a/export_stockinfo_xls/static/description/images/advanced_stock.png b/export_stockinfo_xls/static/description/images/advanced_stock.png new file mode 100644 index 000000000..6156b14bf Binary files /dev/null and b/export_stockinfo_xls/static/description/images/advanced_stock.png differ diff --git a/export_stockinfo_xls/static/description/images/banner.png b/export_stockinfo_xls/static/description/images/banner.png new file mode 100644 index 000000000..0950f6f7e Binary files /dev/null and b/export_stockinfo_xls/static/description/images/banner.png differ diff --git a/export_stockinfo_xls/static/description/images/barcode_scanning.jpeg b/export_stockinfo_xls/static/description/images/barcode_scanning.jpeg new file mode 100644 index 000000000..529143e4e Binary files /dev/null and b/export_stockinfo_xls/static/description/images/barcode_scanning.jpeg differ diff --git a/export_stockinfo_xls/static/description/images/checked.png b/export_stockinfo_xls/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/export_stockinfo_xls/static/description/images/checked.png differ diff --git a/export_stockinfo_xls/static/description/images/cybrosys.png b/export_stockinfo_xls/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/export_stockinfo_xls/static/description/images/cybrosys.png differ diff --git a/export_stockinfo_xls/static/description/images/export.jpeg b/export_stockinfo_xls/static/description/images/export.jpeg new file mode 100644 index 000000000..5dfdf2c2b Binary files /dev/null and b/export_stockinfo_xls/static/description/images/export.jpeg differ diff --git a/export_stockinfo_xls/static/description/images/export.png b/export_stockinfo_xls/static/description/images/export.png new file mode 100644 index 000000000..7772c0e5c Binary files /dev/null and b/export_stockinfo_xls/static/description/images/export.png differ diff --git a/export_stockinfo_xls/static/description/images/export1.png b/export_stockinfo_xls/static/description/images/export1.png new file mode 100644 index 000000000..fa3c1a327 Binary files /dev/null and b/export_stockinfo_xls/static/description/images/export1.png differ diff --git a/export_stockinfo_xls/static/description/images/export2.png b/export_stockinfo_xls/static/description/images/export2.png new file mode 100644 index 000000000..115efe623 Binary files /dev/null and b/export_stockinfo_xls/static/description/images/export2.png differ diff --git a/export_stockinfo_xls/static/description/images/export3.png b/export_stockinfo_xls/static/description/images/export3.png new file mode 100644 index 000000000..b9259e9ff Binary files /dev/null and b/export_stockinfo_xls/static/description/images/export3.png differ diff --git a/export_stockinfo_xls/static/description/images/inventory_valuation.png b/export_stockinfo_xls/static/description/images/inventory_valuation.png new file mode 100644 index 000000000..02df9a68b Binary files /dev/null and b/export_stockinfo_xls/static/description/images/inventory_valuation.png differ diff --git a/export_stockinfo_xls/static/description/images/product_barcode.png b/export_stockinfo_xls/static/description/images/product_barcode.png new file mode 100644 index 000000000..683ba5b0d Binary files /dev/null and b/export_stockinfo_xls/static/description/images/product_barcode.png differ diff --git a/export_stockinfo_xls/static/description/images/stock_ageing.jpeg b/export_stockinfo_xls/static/description/images/stock_ageing.jpeg new file mode 100644 index 000000000..92effb57b Binary files /dev/null and b/export_stockinfo_xls/static/description/images/stock_ageing.jpeg differ diff --git a/export_stockinfo_xls/static/description/index.html b/export_stockinfo_xls/static/description/index.html new file mode 100644 index 000000000..da9b48bad --- /dev/null +++ b/export_stockinfo_xls/static/description/index.html @@ -0,0 +1,323 @@ +
cybrosys-logo
+
+
+
+

Current Stock XLS

+

Current Stock Report for all Products in each Warehouse

+
+

Key Highlights

+
    +
  • Select category for products
  • +
  • Get your stock valuation details
  • +
  • Negative stock will be highlighted in "red" cells.
  • +
+
+
+
+
+
+
+
+ +
+
+ +

Overview

+
+

+ This module helps to print Current Stock Report for all Products in each Warehouse with XLS. +

+
+ + + + + +
+ + +

Installation

+
+
    +
  • + To install this module, you need also the report_xlsx module. +
  • +
  • + You need to set the Timezone in odoo. +
  • +
+
+
+ +

Current Stock XLS

+
+
    +
  • + Select category for products +
  • +
  • + Get your stock valuation details +
  • + +
  • + Negative stock will be highlighted in "red" cells. +
  • +
+
+ +
+
+

Screenshots

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

Suggested Products

+
+ +
+
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

+
+
+
+
+
+ +
+
+
+

Need Any Help?

+
+

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+
+
+

Contact Us

+ www.cybrosys.com +
+
+
+
+
+
+
+
+
+ +
+ + + + + + + +
+
+
+ \ No newline at end of file diff --git a/export_stockinfo_xls/static/src/js/action_manager.js b/export_stockinfo_xls/static/src/js/action_manager.js new file mode 100644 index 000000000..abf8f5e41 --- /dev/null +++ b/export_stockinfo_xls/static/src/js/action_manager.js @@ -0,0 +1,49 @@ +odoo.define('export_stockinfo_xls.action_manager', function (require) { +"use strict"; + +/** + * The purpose of this file is to add the actions of type + * 'xlsx' to the ActionManager. + */ + +var ActionManager = require('web.ActionManager'); +var framework = require('web.framework'); +var session = require('web.session'); + +ActionManager.include({ + + /** + * Executes actions of type 'ir.actions.report'. + * + * @private + * @param {Object} action the description of the action to execute + * @param {Object} options @see doAction for details + * @returns {Promise} resolved when the action has been executed + */ + _executexlsxReportDownloadAction: function (action) { + framework.blockUI(); + var def = $.Deferred(); + session.get_file({ + url: '/xlsx_reports', + data: action.data, + success: def.resolve.bind(def), + error: (error) => this.call('crash_manager', 'rpc_error', error), + complete: framework.unblockUI, + }); + return def; + }, + /** + * Overrides to handle the 'ir.actions.report' actions. + * + * @override + * @private + */ + _executeReportAction: function (action, options) { + if (action.report_type === 'xlsx') { + return this._executexlsxReportDownloadAction(action, options); + } + return this._super.apply(this, arguments); + }, +}); + +}); \ No newline at end of file diff --git a/export_stockinfo_xls/views/action_manager.xml b/export_stockinfo_xls/views/action_manager.xml new file mode 100644 index 000000000..b79d07f5e --- /dev/null +++ b/export_stockinfo_xls/views/action_manager.xml @@ -0,0 +1,9 @@ + + +