diff --git a/customer_due_days/README.md b/customer_due_days/README.md new file mode 100644 index 000000000..e107c7222 --- /dev/null +++ b/customer_due_days/README.md @@ -0,0 +1,34 @@ +Customer Due Report +===================== +Customer Due Report + +Installation +============ +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ + +Developer: Anusha P P - odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. + diff --git a/customer_due_days/__init__.py b/customer_due_days/__init__.py new file mode 100644 index 000000000..8323e7412 --- /dev/null +++ b/customer_due_days/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import report diff --git a/customer_due_days/__manifest__.py b/customer_due_days/__manifest__.py new file mode 100644 index 000000000..1a9018095 --- /dev/null +++ b/customer_due_days/__manifest__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +{ + 'name': 'Customer Due Days', + 'version': '12.0.1.0.0', + 'summary': 'Customer Due Days.', + 'description': """Customer Due Days.""", + 'category': 'Sales', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['base', 'base_report_xlsx', 'account'], + 'website': 'https://www.cybrosys.com', + 'data': [ + 'security/ir.model.access.csv', + 'report/due_days.xml', + ], + 'qweb': [], + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, + 'application': False, +} \ No newline at end of file diff --git a/customer_due_days/report/__init__.py b/customer_due_days/report/__init__.py new file mode 100644 index 000000000..4bc104c40 --- /dev/null +++ b/customer_due_days/report/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import due_days diff --git a/customer_due_days/report/due_days.py b/customer_due_days/report/due_days.py new file mode 100644 index 000000000..e9ddf8d79 --- /dev/null +++ b/customer_due_days/report/due_days.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +import json +import io +from datetime import datetime +from odoo.tools import date_utils +from odoo import models, fields, api, _ +try: + from odoo.tools.misc import xlsxwriter +except ImportError: + import xlsxwriter + + +class CreditDueExceedReportWizard(models.TransientModel): + _name = 'customer.due.report' + + @api.model + def xlsx_credit_due_report(self,data): + data = {} + data['form'] = self.read([]) + return { + 'type': 'ir_actions_xlsx_download', + 'data': {'model': 'customer.due.report', + 'options': json.dumps(data['form'], + default=date_utils.json_default), + 'output_format': 'xlsx', + 'report_name': 'customer_due_report', + } + } + + def get_xlsx_report(self, options, response): + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + sheet = workbook.add_worksheet('Product Ageing Report') + format1 = workbook.add_format({'font_size': 15, 'align': 'center', 'bg_color': '#8a98a8', 'bold': True}) + format2 = workbook.add_format( + {'align': 'center', 'font_size': 10, 'bg_color': '#8a98a8', 'bottom': 1, 'bold': True}) + format3 = workbook.add_format({'align': 'left', 'font_size': 10, 'bg_color': '#a7b2be', 'bottom': 1}) + format4 = workbook.add_format( + {'font_size': 10, 'bg_color': '#a7b2be', 'align': 'left', 'bottom': 1}) + format5 = workbook.add_format( + {'font_size': 10, 'bg_color': '#a7b2be', 'align': 'right', 'bottom': 1, 'bold': True}) + format6 = workbook.add_format({'align': 'left', 'font_size': 10, 'bg_color': '#c4ccd4', 'bottom': 1}) + format7 = workbook.add_format({'align': 'right', 'font_size': 10, 'bg_color': '#c4ccd4', 'bottom': 1}) + format8= workbook.add_format({'align': 'right', 'font_size': 10, 'bg_color': '#c4ccd4', 'bottom': 1, 'bold': True}) + date_time_default_col1_style = workbook.add_format( + {'align': 'left', 'font_size': 10, 'bg_color': '#a7b2be', 'num_format': 'dd/mm/yy', 'bottom': 1}) + date_time_default_col1_style_2 = workbook.add_format( + {'align': 'left', 'font_size': 10, 'bg_color': '#c4ccd4', 'num_format': 'dd/mm/yy', 'bottom': 1}) + format10 = workbook.add_format({'align': 'right', 'font_size': 10}) + sheet.set_row(0, 30) + report_date = datetime.now().strftime("%Y-%m-%d") + sheet.merge_range('A1:H1', 'CUSTOMER DUE REPORT', format1) + sheet.write('A3', 'Report Date', format2) + sheet.write('A4', report_date, format10) + sheet.write('A6', 'PARTNER', format2) + sheet.write('B6', 'EMAIL', format2) + sheet.write('C6', 'PHONE', format2) + sheet.write('D6', 'REFERENCE', format2) + sheet.write('E6', 'DUE DATE', format2) + sheet.write('F6', 'DUE DAYS', format2) + sheet.write('G6', 'DUE AMOUNT', format2) + sheet.write('H6', 'TOTAL DUE', format2) + row_num = 6 + col_num = 0 + cr = self._cr + for record in self.env['res.partner'].search([('customer', '=', True)]): + total_overdue = 0 + today = fields.Date.today() + cr.execute("""SELECT account_move_line.date_maturity as date_maturity,account_move_line.company_id as company_id, + SUM(account_move_line.amount_residual) as amount_residual, + account_move_line.date as date,am.ref as invoice,am.name as entry + FROM account_move_line + LEFT JOIN account_account a ON (account_move_line.account_id=a.id) + LEFT JOIN account_account_type act ON (a.user_type_id=act.id) + LEFT JOIN account_move am ON (am.id=account_move_line.move_id) + WHERE (account_move_line.date_maturity < %s) AND + act.type = 'receivable' + AND account_move_line.partner_id = %s + AND account_move_line.reconciled IS FALSE AND a.deprecated IS FALSE + GROUP BY account_move_line.date_maturity,account_move_line.company_id,account_move_line.amount_residual, + account_move_line.date,am.ref,am.name + """, (today, record.id)) + unreconciled_aml_ids = cr.dictfetchall() + if unreconciled_aml_ids: + row_old = row_num + if len(unreconciled_aml_ids) > 1: + sheet.write(row_num, col_num, record.name, format3) + sheet.write(row_num, col_num + 1, '', format3) + sheet.write(row_num, col_num + 2, '', format3) + sheet.write(row_num, col_num + 3, '', format3) + sheet.write(row_num, col_num + 4, '', format3) + sheet.write(row_num, col_num + 5, '', format3) + sheet.write(row_num, col_num + 6, '', format3) + row_num += 1 + for aml in unreconciled_aml_ids: + if aml['company_id'] == self.env.user.company_id.id: + amount = aml['amount_residual'] + total_overdue += amount + no_days = (today - aml['date_maturity']).days + sheet.write(row_num, col_num + 3, aml['invoice'] if aml['invoice'] else aml['entry'], format6) + sheet.write(row_num, col_num + 4, aml['date_maturity'], date_time_default_col1_style_2) + sheet.write(row_num, col_num + 5, no_days, format7) + sheet.write(row_num, col_num + 6, aml['amount_residual'], format8) + row_num += 1 + sheet.write(row_old, col_num + 7, total_overdue, format5) + else: + for aml in unreconciled_aml_ids: + if aml['company_id'] == self.env.user.company_id.id: + amount = aml['amount_residual'] + total_overdue += amount + no_days = (today - aml['date_maturity']).days + sheet.write(row_num, col_num, record.name, format3) + sheet.write(row_num, col_num + 1, record.email if record.email else '', format3) + sheet.write(row_num, col_num + 2, record.phone if record.phone else '', format3) + sheet.write(row_num, col_num + 3, aml['invoice'] if aml['invoice'] else aml['entry'], format3) + sheet.write(row_num, col_num + 4, aml['date_maturity'], date_time_default_col1_style) + sheet.write(row_num, col_num + 5, no_days, format4) + sheet.write(row_num, col_num + 6, aml['amount_residual'], format4) + sheet.write(row_num, col_num + 7, total_overdue, format5) + row_num += 1 + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() diff --git a/customer_due_days/report/due_days.xml b/customer_due_days/report/due_days.xml new file mode 100644 index 000000000..5f4601744 --- /dev/null +++ b/customer_due_days/report/due_days.xml @@ -0,0 +1,34 @@ + + + + + Customer Due Analysis + customer.due.report + +
+
+
+
+
+
+ + + Customer Due Analysis + customer.due.report + ir.actions.act_window + form + form + + new + + + + +
+
\ No newline at end of file diff --git a/customer_due_days/security/ir.model.access.csv b/customer_due_days/security/ir.model.access.csv new file mode 100644 index 000000000..c28a8aa5a --- /dev/null +++ b/customer_due_days/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_customer_due_manager,customer.due,model_customer_due_report,account.group_account_user,1,1,1,1 diff --git a/customer_due_days/static/description/banner.jpg b/customer_due_days/static/description/banner.jpg new file mode 100644 index 000000000..3708cfdc8 Binary files /dev/null and b/customer_due_days/static/description/banner.jpg differ diff --git a/customer_due_days/static/description/cybro_logo.png b/customer_due_days/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/customer_due_days/static/description/cybro_logo.png differ diff --git a/customer_due_days/static/description/due_report.png b/customer_due_days/static/description/due_report.png new file mode 100644 index 000000000..88720bdbf Binary files /dev/null and b/customer_due_days/static/description/due_report.png differ diff --git a/customer_due_days/static/description/due_wizard.png b/customer_due_days/static/description/due_wizard.png new file mode 100644 index 000000000..f06a1340a Binary files /dev/null and b/customer_due_days/static/description/due_wizard.png differ diff --git a/customer_due_days/static/description/icon.png b/customer_due_days/static/description/icon.png new file mode 100644 index 000000000..fe5edc074 Binary files /dev/null and b/customer_due_days/static/description/icon.png differ diff --git a/customer_due_days/static/description/index.html b/customer_due_days/static/description/index.html new file mode 100644 index 000000000..5f74dec33 --- /dev/null +++ b/customer_due_days/static/description/index.html @@ -0,0 +1,340 @@ +
+
+

+ Customer Due Days +

+
+ + Cybrosys Technologies +
+ +
+ cybrosys technologies +
+
+
+
+
+
+

+ Overview +

+

+ This module adds a new feature, 'Customer Due Analysis' to Odoo. + +

+
+
+
+
+

+ Features +

+

+ + We can get the details of invoices which is due and also the due days of that invoice +

+ +
+
+ +
+
+

+ Screenshots +

+

+
+ + A new menu, 'Customer Due Analysis' is added under Invoicing -> Reporting for performing this analysis. + Clicking on this menu will open a new wizard. +
+

+
+ +
+

+
+ Sample report +
+

+
+ +
+
+
+
+
+ cybrosys technologies +
+
+
+
+

+ Our Services +

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

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
+ + diff --git a/pos_category_wise_receipt/README.rst b/pos_category_wise_receipt/README.rst new file mode 100644 index 000000000..97b8a41cd --- /dev/null +++ b/pos_category_wise_receipt/README.rst @@ -0,0 +1,27 @@ +============================ +POS Category wise receipt v12 +============================ + +This module aims to print category wise receipt for point of sale. + +Features +======== + +* The receipt shows category wiseproduct and Subtotal of each category. + +Installation +============ + +Just select it from available modules to install it, there is no need to extra installations. + +Configuration +============= + +Nothing to configure. + + +Credits +======= +Developer: Anusha @ cybrosys V9 + Akshay Babu V12 odoo@cybrosys.com + diff --git a/pos_category_wise_receipt/__init__.py b/pos_category_wise_receipt/__init__.py new file mode 100644 index 000000000..06839078f --- /dev/null +++ b/pos_category_wise_receipt/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + diff --git a/pos_category_wise_receipt/__manifest__.py b/pos_category_wise_receipt/__manifest__.py new file mode 100644 index 000000000..2ea4a9bd7 --- /dev/null +++ b/pos_category_wise_receipt/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': 'POS Category wise receipt', + 'version': '12.0.1.0.0', + 'summary': 'Category wise receipt for the Point of Sale ', + 'author': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + 'category': 'Point of Sale', + 'depends': ['point_of_sale'], + 'data': [ + 'views/pos_ticket_view.xml', + ], + 'qweb': [ + 'static/src/xml/pos_ticket.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/pos_category_wise_receipt/static/description/banner.jpg b/pos_category_wise_receipt/static/description/banner.jpg new file mode 100644 index 000000000..ddca2948c Binary files /dev/null and b/pos_category_wise_receipt/static/description/banner.jpg differ diff --git a/pos_category_wise_receipt/static/description/category-wise-receipt-cybrosys-1.jpg b/pos_category_wise_receipt/static/description/category-wise-receipt-cybrosys-1.jpg new file mode 100644 index 000000000..15761135a Binary files /dev/null and b/pos_category_wise_receipt/static/description/category-wise-receipt-cybrosys-1.jpg differ diff --git a/pos_category_wise_receipt/static/description/category-wise-receipt-cybrosys-2.jpg b/pos_category_wise_receipt/static/description/category-wise-receipt-cybrosys-2.jpg new file mode 100644 index 000000000..cc864b5f8 Binary files /dev/null and b/pos_category_wise_receipt/static/description/category-wise-receipt-cybrosys-2.jpg differ diff --git a/pos_category_wise_receipt/static/description/cybro_logo.png b/pos_category_wise_receipt/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/pos_category_wise_receipt/static/description/cybro_logo.png differ diff --git a/pos_category_wise_receipt/static/description/icon.png b/pos_category_wise_receipt/static/description/icon.png new file mode 100644 index 000000000..0ba76ffdc Binary files /dev/null and b/pos_category_wise_receipt/static/description/icon.png differ diff --git a/pos_category_wise_receipt/static/description/index.html b/pos_category_wise_receipt/static/description/index.html new file mode 100644 index 000000000..4f133e3df --- /dev/null +++ b/pos_category_wise_receipt/static/description/index.html @@ -0,0 +1,332 @@ +
+
+

+ POS Category wise receipt +

+

+ Print Category wise receipt +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies +
+
+
+
+
+
+

+ Overview +

+

+ This module that can be used to generate category wise bill. +

+
+
+
+
+

+ Features +

+

+ + Category wise bill +

+
+
+ + + + +
+
+

+ Screenshots +

+

+ + Choose your product randomly +

+
+ +
+

+ + Product category wise receipt +

+
+ +
+
+
+ + +
+
+ cybrosys technologies +
+
+
+
+

+ Our Services +

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

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
+ diff --git a/pos_category_wise_receipt/static/src/js/pos_ticket.js b/pos_category_wise_receipt/static/src/js/pos_ticket.js new file mode 100644 index 000000000..186d1281b --- /dev/null +++ b/pos_category_wise_receipt/static/src/js/pos_ticket.js @@ -0,0 +1,66 @@ +odoo.define('pos_category_wise_receipt.receipt', function (require) { +"use strict"; +var models = require('point_of_sale.models'); +var orderline_id = 1; + + +var order = models.Orderline.extend({ + + initialize: function(attr,options){ + console.log("dfdd") + this.pos = options.pos; + this.order = options.order; + if (options.json) { + this.init_from_JSON(options.json); + return; + } + this.product = options.product; + this.price = options.product.price; + this.set_quantity(1); + this.discount = 0; + this.discountStr = '0'; + this.type = 'unit'; + this.selected = false; + this.count = true; + this.category_selected = true; + this.select = false; + this.id = orderline_id++; + }, + get_category : function(){ + var product = this.product.pos_categ_id[1]; + return (product ? this.product.pos_categ_id[1] : undefined) || 'UnCategorised Product'; +// return this.product.pos_categ_id[1]; + }, + get_category_id: function(){ + return this.product.pos_categ_id[0]; + }, + set_selected_product: function(count){ + this.count = count; + this.trigger('change',this); + }, + set_selected_category: function(selected){ + + this.category_selected = selected; + this.trigger('change',this); + }, + is_selected_product: function(){ + return this.count; + }, + set_select: function(selected){ + this.select = selected; + this.trigger('change',this); + }, + is_select: function(){ + return this.select; + + }, + is_selected_category: function(){ + + return this.category_selected; + }, + + +}); + models.Orderline = order; + return order; +}); \ No newline at end of file diff --git a/pos_category_wise_receipt/static/src/xml/pos_ticket.xml b/pos_category_wise_receipt/static/src/xml/pos_ticket.xml new file mode 100644 index 000000000..22918285d --- /dev/null +++ b/pos_category_wise_receipt/static/src/xml/pos_ticket.xml @@ -0,0 +1,124 @@ + + + +
+
+
+
+ Phone:
+ User:
+ Shop:
+
+ +
+ +
+
+
+ + + + + + + + +

+ +

+ +
+

+ + + + + + + + + + + + +
+ + +
+ With a % discount +
+
+
+ + + +
+
+ + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
Subtotal: + +
+ +
Discount: + +
Total: + +
+
+ + + + + + + +
+ + + +
+
+ + +
Change: + +
+ +
+
+ +
+
+
+
+
+
diff --git a/pos_category_wise_receipt/views/pos_ticket_view.xml b/pos_category_wise_receipt/views/pos_ticket_view.xml new file mode 100644 index 000000000..f574511cb --- /dev/null +++ b/pos_category_wise_receipt/views/pos_ticket_view.xml @@ -0,0 +1,9 @@ + + +