diff --git a/account_partner_ledger_filter/README.rst b/account_partner_ledger_filter/README.rst new file mode 100644 index 000000000..238524288 --- /dev/null +++ b/account_partner_ledger_filter/README.rst @@ -0,0 +1,21 @@ +Partner Ledger Report with Partner Filter +========================================= + +Creates a partner ledger report by filtering partners + + +Installation +============ + - www.odoo.com/documentation/14.0/setup/install.html + - Install our custom addon + +Configuration +============= + +No additional configurations needed + +Credits +======= +Faslu ca v11 @ cybrosys, Contact: odoo@cybrosys.com +Afras Habis v13 @ cybrosys, Contact: odoo@cybrosys.com +Jibin James v14 @ cybrosys, Contact: odoo@cybrosys.com diff --git a/account_partner_ledger_filter/__init__.py b/account_partner_ledger_filter/__init__.py new file mode 100644 index 000000000..7a106b2fe --- /dev/null +++ b/account_partner_ledger_filter/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import wizard +from . import models diff --git a/account_partner_ledger_filter/__manifest__.py b/account_partner_ledger_filter/__manifest__.py new file mode 100644 index 000000000..7b2c487a1 --- /dev/null +++ b/account_partner_ledger_filter/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': 'Partner Ledger with Partner Filter', + 'version': '14.0.1.0.0', + 'summary': """Partner Ledger Report with Partner Filter""", + 'description': """Partner Ledger Report with Partner Filter""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://cybrosys.com/", + 'category': 'Accounting', + 'depends': ['base_accounting_kit'], + 'data': [ + 'views/report.xml', + 'wizard/account_report_general_ledger_view.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False +} diff --git a/account_partner_ledger_filter/doc/RELEASE_NOTES.md b/account_partner_ledger_filter/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..34c02fee7 --- /dev/null +++ b/account_partner_ledger_filter/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 31.03.2021 +#### Version 14.0.1.0.0 +#### ADD +Initial Commit for account_partner_ledger_filter diff --git a/account_partner_ledger_filter/models/__init__.py b/account_partner_ledger_filter/models/__init__.py new file mode 100644 index 000000000..f2f7cf118 --- /dev/null +++ b/account_partner_ledger_filter/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import account_partner_ledger diff --git a/account_partner_ledger_filter/models/account_partner_ledger.py b/account_partner_ledger_filter/models/account_partner_ledger.py new file mode 100644 index 000000000..2c975ef48 --- /dev/null +++ b/account_partner_ledger_filter/models/account_partner_ledger.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +import time +import logging +from odoo import api, models, _ +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class ReportPartnerLedger(models.AbstractModel): + _inherit = 'report.base_accounting_kit.report_partnerledger' + + @api.model + def _get_report_values(self, docids, data=None): + if not data.get('form'): + raise UserError(_("Form content is missing, this report cannot be printed.")) + + data['computed'] = {} + + obj_partner = self.env['res.partner'] + query_get_data = self.env['account.move.line'].with_context(data['form'].get('used_context', {}))._query_get() + data['computed']['move_state'] = ['draft', 'posted'] + if data['form'].get('target_move', 'all') == 'posted': + data['computed']['move_state'] = ['posted'] + result_selection = data['form'].get('result_selection', 'customer') + if result_selection == 'supplier': + data['computed']['ACCOUNT_TYPE'] = ['payable'] + elif result_selection == 'customer': + data['computed']['ACCOUNT_TYPE'] = ['receivable'] + else: + data['computed']['ACCOUNT_TYPE'] = ['payable', 'receivable'] + + self.env.cr.execute(""" + SELECT a.id + FROM account_account a + WHERE a.internal_type IN %s + AND NOT a.deprecated""", (tuple(data['computed']['ACCOUNT_TYPE']),)) + data['computed']['account_ids'] = [a for (a,) in self.env.cr.fetchall()] + params = [tuple(data['computed']['move_state']), tuple(data['computed']['account_ids'])] + query_get_data[2] + reconcile_clause = "" if data['form']['reconciled'] else ' AND "account_move_line".full_reconcile_id IS NULL ' + query = """ + SELECT DISTINCT "account_move_line".partner_id + FROM """ + query_get_data[0] + """, account_account AS account, account_move AS am + WHERE "account_move_line".partner_id IS NOT NULL + AND "account_move_line".account_id = account.id + AND am.id = "account_move_line".move_id + AND am.state IN %s + AND "account_move_line".account_id IN %s + AND NOT account.deprecated + AND """ + query_get_data[1] + reconcile_clause + self.env.cr.execute(query, tuple(params)) + # ---------------------Taking only selected partners--------------------------- + if data['form']['partner_ids']: + partner_ids = data['form']['partner_ids'] + else: + partner_ids = [res['partner_id'] for res in self.env.cr.dictfetchall()] + # ----------------------------------------------------------------------------- + # partner_ids = [res['partner_id'] for res in self.env.cr.dictfetchall()] + partners = obj_partner.browse(partner_ids) + partners = sorted(partners, key = lambda x: (x.ref or '', x.name or '')) + + return { + 'doc_ids': partner_ids, + 'doc_model': self.env['res.partner'], + 'data': data, + 'docs': partners, + 'time': time, + 'lines': self._lines, + 'sum_partner': self._sum_partner, + } diff --git a/account_partner_ledger_filter/static/description/banner.png b/account_partner_ledger_filter/static/description/banner.png new file mode 100644 index 000000000..29bfd4eac Binary files /dev/null and b/account_partner_ledger_filter/static/description/banner.png differ diff --git a/account_partner_ledger_filter/static/description/icon.png b/account_partner_ledger_filter/static/description/icon.png new file mode 100644 index 000000000..a84b25ca7 Binary files /dev/null and b/account_partner_ledger_filter/static/description/icon.png differ diff --git a/account_partner_ledger_filter/static/description/images/account_dynamic_report_banner.gif b/account_partner_ledger_filter/static/description/images/account_dynamic_report_banner.gif new file mode 100644 index 000000000..d4530e466 Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/account_dynamic_report_banner.gif differ diff --git a/account_partner_ledger_filter/static/description/images/checked.png b/account_partner_ledger_filter/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/checked.png differ diff --git a/account_partner_ledger_filter/static/description/images/crm_dashboard_banner.gif b/account_partner_ledger_filter/static/description/images/crm_dashboard_banner.gif new file mode 100644 index 000000000..b80a0bfc9 Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/crm_dashboard_banner.gif differ diff --git a/account_partner_ledger_filter/static/description/images/cybrosys.png b/account_partner_ledger_filter/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/cybrosys.png differ diff --git a/account_partner_ledger_filter/static/description/images/led.png b/account_partner_ledger_filter/static/description/images/led.png new file mode 100644 index 000000000..ab0b1fecd Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/led.png differ diff --git a/account_partner_ledger_filter/static/description/images/mobile_service_shop_pro_banner.jpg b/account_partner_ledger_filter/static/description/images/mobile_service_shop_pro_banner.jpg new file mode 100644 index 000000000..7a2e022ca Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/mobile_service_shop_pro_banner.jpg differ diff --git a/account_partner_ledger_filter/static/description/images/odoo11_magento_banner.jpg b/account_partner_ledger_filter/static/description/images/odoo11_magento_banner.jpg new file mode 100644 index 000000000..b2d9b33ce Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/odoo11_magento_banner.jpg differ diff --git a/account_partner_ledger_filter/static/description/images/par.png b/account_partner_ledger_filter/static/description/images/par.png new file mode 100644 index 000000000..2bb4d0ddf Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/par.png differ diff --git a/account_partner_ledger_filter/static/description/images/partner.png b/account_partner_ledger_filter/static/description/images/partner.png new file mode 100644 index 000000000..fcc37dac0 Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/partner.png differ diff --git a/account_partner_ledger_filter/static/description/images/partner_main.png b/account_partner_ledger_filter/static/description/images/partner_main.png new file mode 100644 index 000000000..02927485a Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/partner_main.png differ diff --git a/account_partner_ledger_filter/static/description/images/project_custome_gantt_banner.gif b/account_partner_ledger_filter/static/description/images/project_custome_gantt_banner.gif new file mode 100644 index 000000000..3ee64f1c5 Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/project_custome_gantt_banner.gif differ diff --git a/account_partner_ledger_filter/static/description/images/report_maker_banner.gif b/account_partner_ledger_filter/static/description/images/report_maker_banner.gif new file mode 100644 index 000000000..db6305f39 Binary files /dev/null and b/account_partner_ledger_filter/static/description/images/report_maker_banner.gif differ diff --git a/account_partner_ledger_filter/static/description/index.html b/account_partner_ledger_filter/static/description/index.html new file mode 100644 index 000000000..61fcfc0b0 --- /dev/null +++ b/account_partner_ledger_filter/static/description/index.html @@ -0,0 +1,312 @@ +
cybrosys-logo
+
+
+
+

Partner Ledger Report with Partner Filter

+
+

Key Highlights

+
    +
  • Creates a partner ledger report by filtering partners
  • +
+
+
+
+
+
+
+
+ +
+
+ +

Overview

+
+

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

+
+
+ +

Partner Ledger Report with Partner Filter

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

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/account_partner_ledger_filter/views/report.xml b/account_partner_ledger_filter/views/report.xml new file mode 100644 index 000000000..e85928158 --- /dev/null +++ b/account_partner_ledger_filter/views/report.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/account_partner_ledger_filter/wizard/__init__.py b/account_partner_ledger_filter/wizard/__init__.py new file mode 100644 index 000000000..07e120247 --- /dev/null +++ b/account_partner_ledger_filter/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import account_report_partner_ledger diff --git a/account_partner_ledger_filter/wizard/account_report_general_ledger_view.xml b/account_partner_ledger_filter/wizard/account_report_general_ledger_view.xml new file mode 100644 index 000000000..c7e1364e7 --- /dev/null +++ b/account_partner_ledger_filter/wizard/account_report_general_ledger_view.xml @@ -0,0 +1,15 @@ + + + + Partner Ledger + account.report.partner.ledger + + + + + + + + + + diff --git a/account_partner_ledger_filter/wizard/account_report_partner_ledger.py b/account_partner_ledger_filter/wizard/account_report_partner_ledger.py new file mode 100644 index 000000000..704848784 --- /dev/null +++ b/account_partner_ledger_filter/wizard/account_report_partner_ledger.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import fields, models + + +class AccountPartnerLedger(models.TransientModel): + _inherit = "account.report.partner.ledger" + + partner_ids = fields.Many2many('res.partner', 'partner_ledger_partner_rel', 'id', 'partner_id', string='Partners') + + def _print_report(self, data): + data = self.pre_print_report(data) + data['form'].update({'reconciled': self.reconciled, 'amount_currency': self.amount_currency, + 'partner_ids': self.partner_ids.ids}) + return self.env.ref('base_accounting_kit.action_report_partnerledger').report_action(self, data=data) diff --git a/account_payment_instalment/README.rst b/account_payment_instalment/README.rst new file mode 100644 index 000000000..2a48e5c3c --- /dev/null +++ b/account_payment_instalment/README.rst @@ -0,0 +1,47 @@ +Instalment in Payment Terms +=========================== +This module will help you to manage the payment terms with instalments. + +Features +======== + +* Instalment option in the payment term will helps to manage the payments of customer in instalments. + +Installation +============ +- www.odoo.com/documentation/14.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Company +------- +* 'Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: V12 Tintuk Tomin, odoo@cybrosys.com + v13.0 Jibin James, odoo@cybrosys.com + v14.0 Jibin James, odoo@cybrosys.com + + +Contacts +-------- +* Mail Contact : odoo@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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/account_payment_instalment/__init__.py b/account_payment_instalment/__init__.py new file mode 100644 index 000000000..d679f52b8 --- /dev/null +++ b/account_payment_instalment/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# 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 diff --git a/account_payment_instalment/__manifest__.py b/account_payment_instalment/__manifest__.py new file mode 100644 index 000000000..8ec19a24e --- /dev/null +++ b/account_payment_instalment/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# 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': "Instalment in Payment Terms", + 'version': '14.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Accounting', + 'summary': 'Instalment in Payment Terms"', + 'description': """ + New type 'Instalment' in Odoo payment terms, Instalment in Payment Terms,Installment + """, + 'depends': ['account'], + 'data': [ + 'views/account_payment_term_view.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/account_payment_instalment/doc/RELEASE_NOTES.md b/account_payment_instalment/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..6d0aa7137 --- /dev/null +++ b/account_payment_instalment/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 01.04.2021 +#### Version 14.0.1.0.0 +##### ADD +- Initial commit diff --git a/account_payment_instalment/models/__init__.py b/account_payment_instalment/models/__init__.py new file mode 100644 index 000000000..f5749a99a --- /dev/null +++ b/account_payment_instalment/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import account_payment_term + + diff --git a/account_payment_instalment/models/account_payment_term.py b/account_payment_instalment/models/account_payment_term.py new file mode 100644 index 000000000..4c081801e --- /dev/null +++ b/account_payment_instalment/models/account_payment_term.py @@ -0,0 +1,125 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# 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 api, fields, models, _ +from odoo.exceptions import ValidationError +from dateutil.relativedelta import relativedelta + + +class AccountPaymentTermLine(models.Model): + _inherit = "account.payment.term.line" + + value = fields.Selection([ + ('balance', 'Balance'), + ('percent', 'Percent'), + ('fixed', 'Fixed Amount'), + ('instalment', 'Instalment') + ], string='Type', required=True, default='balance', + help="Select here the kind of valuation related to this payment term line.") + period_type = fields.Selection([ + ('daily', 'Day(s)'), + ('weekly', 'Week(s)'), + ('monthly', 'Month(s)'), + ('yearly', 'Year(s)'), + ], string='Period Type', default='monthly') + period_count = fields.Integer('Number of instalments', default=1) + + +class AccountPaymentTerm(models.Model): + _inherit = "account.payment.term" + + @api.constrains('line_ids') + def _check_lines(self): + print("djbdjbdbdik") + payment_term_lines = self.line_ids.sorted() + if payment_term_lines and payment_term_lines[-1].value not in ['balance', 'instalment']: + raise ValidationError(_('A Payment Term should have its last line of type Balance/Instalment.')) + lines = self.line_ids.filtered(lambda r: r.value == 'balance') or [] + if len(lines) > 1: + raise ValidationError(_('A Payment Term should have only one line of type Balance.')) + lines = self.line_ids.filtered(lambda r: r.value == 'instalment') or [] + if len(lines) > 1: + raise ValidationError(_('A Payment Term should have only one line of type Instalment.')) + lines = self.line_ids.filtered(lambda r: r.value in ['balance', 'instalment']) or [] + if len(lines) > 1: + raise ValidationError(_('A Payment Term should have only one of type Balance and Instalment.')) + lines = self.line_ids.filtered(lambda r: r.value == 'instalment') or [] + for line in lines: + if line.period_count == 0: + raise ValidationError(_('A Payment Term of type Instalment should have number of instalments more than 0.')) + + def compute(self, value, date_ref=False, currency=None): + # self.ensure_one() + date_ref = date_ref or fields.Date.today() + amount = value + sign = value < 0 and -1 or 1 + result = [] + if not currency and self.env.context.get('currency_id'): + currency = self.env['res.currency'].browse(self.env.context['currency_id']) + elif not currency: + currency = self.env.company.currency_id + for line in self.line_ids: + if line.value == 'fixed': + amt = sign * currency.round(line.value_amount) + elif line.value == 'percent': + amt = currency.round(value * (line.value_amount / 100.0)) + elif line.value == 'balance': + amt = currency.round(amount) + + if line.value != 'instalment' and amt: + next_date = fields.Date.from_string(date_ref) + if line.option == 'day_after_invoice_date': + next_date += relativedelta(days=line.days) + if line.day_of_the_month > 0: + months_delta = (line.day_of_the_month < next_date.day) and 1 or 0 + next_date += relativedelta(day=line.day_of_the_month, months=months_delta) + elif line.option == 'after_invoice_month': + next_first_date = next_date + relativedelta(day=1, months=1) # Getting 1st of next month + next_date = next_first_date + relativedelta(days=line.days - 1) + elif line.option == 'day_following_month': + next_date += relativedelta(day=line.days, months=1) + elif line.option == 'day_current_month': + next_date += relativedelta(day=line.days, months=0) + result.append((fields.Date.to_string(next_date), amt)) + amount -= amt + elif line.value == 'instalment': + amt = currency.round(amount) + count = line.period_count + instalment_amount = currency.round(amt/count) + while count > 0: + next_date = fields.Date.from_string(date_ref) + if line.period_type == 'daily': + next_date += relativedelta(days=count) + elif line.period_type == 'weekly': + next_date += relativedelta(weeks=count) + elif line.period_type == 'monthly': + next_date += relativedelta(months=count) + else: + next_date += relativedelta(years=count) + result.append([fields.Date.to_string(next_date), instalment_amount]) + count -= 1 + amount -= amt + amount = sum(amt for _, amt in result) + dist = currency.round(value - amount) + if dist: + result[0][1] += dist + return result diff --git a/account_payment_instalment/static/description/banner.png b/account_payment_instalment/static/description/banner.png new file mode 100644 index 000000000..4a3b685ab Binary files /dev/null and b/account_payment_instalment/static/description/banner.png differ diff --git a/account_payment_instalment/static/description/cybro_logo.png b/account_payment_instalment/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/account_payment_instalment/static/description/cybro_logo.png differ diff --git a/account_payment_instalment/static/description/icon.png b/account_payment_instalment/static/description/icon.png new file mode 100644 index 000000000..a09f1ae47 Binary files /dev/null and b/account_payment_instalment/static/description/icon.png differ diff --git a/account_payment_instalment/static/description/images/Installment-Payment-in-Odoo-1.png b/account_payment_instalment/static/description/images/Installment-Payment-in-Odoo-1.png new file mode 100644 index 000000000..cfb1c62d4 Binary files /dev/null and b/account_payment_instalment/static/description/images/Installment-Payment-in-Odoo-1.png differ diff --git a/account_payment_instalment/static/description/images/banner_account_reports_xlsx.png b/account_payment_instalment/static/description/images/banner_account_reports_xlsx.png new file mode 100644 index 000000000..60b9433b3 Binary files /dev/null and b/account_payment_instalment/static/description/images/banner_account_reports_xlsx.png differ diff --git a/account_payment_instalment/static/description/images/banner_accounting_dynamic_reports.png b/account_payment_instalment/static/description/images/banner_accounting_dynamic_reports.png new file mode 100644 index 000000000..b025b5c48 Binary files /dev/null and b/account_payment_instalment/static/description/images/banner_accounting_dynamic_reports.png differ diff --git a/account_payment_instalment/static/description/images/banner_bank_book_dynamic_reports.png b/account_payment_instalment/static/description/images/banner_bank_book_dynamic_reports.png new file mode 100644 index 000000000..66f5f2199 Binary files /dev/null and b/account_payment_instalment/static/description/images/banner_bank_book_dynamic_reports.png differ diff --git a/account_payment_instalment/static/description/images/banner_custom_gantt_view.png b/account_payment_instalment/static/description/images/banner_custom_gantt_view.png new file mode 100644 index 000000000..edc204b88 Binary files /dev/null and b/account_payment_instalment/static/description/images/banner_custom_gantt_view.png differ diff --git a/account_payment_instalment/static/description/images/checked.png b/account_payment_instalment/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/account_payment_instalment/static/description/images/checked.png differ diff --git a/account_payment_instalment/static/description/images/cybrosys.png b/account_payment_instalment/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/account_payment_instalment/static/description/images/cybrosys.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-1.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-1.png new file mode 100644 index 000000000..2a7a7d4be Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-1.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-1p.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-1p.png new file mode 100644 index 000000000..683af5f99 Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-1p.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-2.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-2.png new file mode 100644 index 000000000..f9c530c87 Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-2.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-21.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-21.png new file mode 100644 index 000000000..99c6ebc6d Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-21.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-3.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-3.png new file mode 100644 index 000000000..c689baaf6 Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-3.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-32.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-32.png new file mode 100644 index 000000000..087766985 Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-32.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-4.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-4.png new file mode 100644 index 000000000..4e449e0c9 Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-4.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-41.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-41.png new file mode 100644 index 000000000..f3caa138d Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-41.png differ diff --git a/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-5.png b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-5.png new file mode 100644 index 000000000..ce9c67b22 Binary files /dev/null and b/account_payment_instalment/static/description/images/instalment-payment-term-cybrosys-5.png differ diff --git a/account_payment_instalment/static/description/images/pos_re_print.png b/account_payment_instalment/static/description/images/pos_re_print.png new file mode 100644 index 000000000..65a113e60 Binary files /dev/null and b/account_payment_instalment/static/description/images/pos_re_print.png differ diff --git a/account_payment_instalment/static/description/images/stock_age.png b/account_payment_instalment/static/description/images/stock_age.png new file mode 100644 index 000000000..da82606ad Binary files /dev/null and b/account_payment_instalment/static/description/images/stock_age.png differ diff --git a/account_payment_instalment/static/description/index.html b/account_payment_instalment/static/description/index.html new file mode 100644 index 000000000..a65a55f34 --- /dev/null +++ b/account_payment_instalment/static/description/index.html @@ -0,0 +1,562 @@ +
+ cybrosys-logo
+ +
+
+
+

Instalment in Payment Types

+

Instalment feature in the payment terms of invoice

+
+

Key Highlights

+
    +
  • + Instalment payment method for customers. +
  • +
  • + Different types of instalments. +
  • +
  • + Post journal entries with due dates. +
  • +
+ +
+
+
+
+
+
+
+ +
+
+ +

Overview

+
+

+ Did you ever search for the provision to make the customer payment as instalments? + Here is the solution. You can configure a new payment term with the feature of instalment. +

+
+ +
+ +

Instalment in Payments

+
+
    + +
  • + + Provision for instalment in the payment terms. +
  • + +
  • + + Instalment by days, months and years. +
  • + +
  • + + Period type and number of instalments in the payment lines. + +
  • + + + +
+
+ + + +
+ +
+

Screenshots

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

Video

+
+

Intalment in payment terms

+ +
+ Cybrosys Cover Video +
+ +
+
+ + +
+
    +
+
+
+
+
+
+ +
+

Suggested Products

+
+ +
+ + +
+

Our Service

+
+ +
+ +
+
+

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.

+
+
+
+
+
+ +
+
+
+

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 +
+
+
+
+ +
+
+
+
+
+ +
+ + + + + + + + +
+
+
+
+ diff --git a/account_payment_instalment/views/account_payment_term_view.xml b/account_payment_instalment/views/account_payment_term_view.xml new file mode 100644 index 000000000..3ec66ad1f --- /dev/null +++ b/account_payment_instalment/views/account_payment_term_view.xml @@ -0,0 +1,60 @@ + + + + + account.payment.term.line.tree + account.payment.term.line + + + + + + + + + + + account.payment.term.form + account.payment.term + + +

+ The last line's computation type should be "Balance or Instalment" to ensure that the whole amount will be allocated. +

+
+
+ + + az.account.payment.term.line.form + account.payment.term.line + + + + {'invisible':[('value','in',['balance','instalment'])]} + + + {'invisible':[('value','in',['balance','instalment'])]} + + + {'invisible':[('value','=','instalment')]} + + + {'invisible':[('value','=','instalment')]} + + + {'invisible':[('value','=','instalment')]} + + + {'invisible':['|',('option','!=', 'day_after_invoice_date'),('value','=','instalment')]} + + + + + + + + + + +
+
\ No newline at end of file diff --git a/pos_product_creation/__init__.py b/pos_product_creation/__init__.py new file mode 100644 index 000000000..5d8a4f372 --- /dev/null +++ b/pos_product_creation/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Sayooj A O @cybrosys(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 controllers diff --git a/pos_product_creation/__manifest__.py b/pos_product_creation/__manifest__.py new file mode 100644 index 000000000..22cf8d7dd --- /dev/null +++ b/pos_product_creation/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Sayooj A O @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': 'Create Products From POS', + 'version': '14.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Create Products From POS Interface', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale'], + 'data': [ + 'views/assets.xml', + ], + 'qweb': [ + 'static/src/xml/product_create_button.xml', + 'static/src/xml/product_create_popup.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/pos_product_creation/controllers/__init__.py b/pos_product_creation/controllers/__init__.py new file mode 100644 index 000000000..de31fa4a1 --- /dev/null +++ b/pos_product_creation/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Sayooj A O @cybrosys(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/pos_product_creation/controllers/main.py b/pos_product_creation/controllers/main.py new file mode 100644 index 000000000..075ebdf27 --- /dev/null +++ b/pos_product_creation/controllers/main.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Sayooj A O @cybrosys(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 http +from odoo.http import request + + +class PosProductCreation(http.Controller): + + @http.route('/create_product', type="json", auth="none") + def create_product(self, category, name, price, product_reference, unit_measure, product_categories, **kwargs): + product_category = '' + if category == 'Consumable': + product_category = 'consu' + elif category == 'Service': + product_category = 'service' + elif category == 'Stockable': + product_category = 'product' + else: + product_category = '' + request.env['product.template'].sudo().create({ + 'name': name, + 'type': product_category, + 'default_code': product_reference, + 'list_price': float(price), + 'uom_id': int(unit_measure), + 'uom_po_id': int(unit_measure), + 'categ_id': int(product_categories), + 'available_in_pos': True, + }) diff --git a/pos_product_creation/static/description/banner.png b/pos_product_creation/static/description/banner.png new file mode 100644 index 000000000..21fc1e563 Binary files /dev/null and b/pos_product_creation/static/description/banner.png differ diff --git a/pos_product_creation/static/description/icon.png b/pos_product_creation/static/description/icon.png new file mode 100644 index 000000000..3ed80a200 Binary files /dev/null and b/pos_product_creation/static/description/icon.png differ diff --git a/pos_product_creation/static/description/images/1pos.png b/pos_product_creation/static/description/images/1pos.png new file mode 100644 index 000000000..d15561119 Binary files /dev/null and b/pos_product_creation/static/description/images/1pos.png differ diff --git a/pos_product_creation/static/description/images/2pos.png b/pos_product_creation/static/description/images/2pos.png new file mode 100644 index 000000000..67f2ef85f Binary files /dev/null and b/pos_product_creation/static/description/images/2pos.png differ diff --git a/pos_product_creation/static/description/images/banner_lifeline_for_task.jpeg b/pos_product_creation/static/description/images/banner_lifeline_for_task.jpeg new file mode 100644 index 000000000..4a467ea22 Binary files /dev/null and b/pos_product_creation/static/description/images/banner_lifeline_for_task.jpeg differ diff --git a/pos_product_creation/static/description/images/banner_project_report_xls_pdf.png b/pos_product_creation/static/description/images/banner_project_report_xls_pdf.png new file mode 100644 index 000000000..3c430a7eb Binary files /dev/null and b/pos_product_creation/static/description/images/banner_project_report_xls_pdf.png differ diff --git a/pos_product_creation/static/description/images/banner_project_status_report.png b/pos_product_creation/static/description/images/banner_project_status_report.png new file mode 100644 index 000000000..d1b689710 Binary files /dev/null and b/pos_product_creation/static/description/images/banner_project_status_report.png differ diff --git a/pos_product_creation/static/description/images/banner_subtask.jpeg b/pos_product_creation/static/description/images/banner_subtask.jpeg new file mode 100644 index 000000000..f2b224110 Binary files /dev/null and b/pos_product_creation/static/description/images/banner_subtask.jpeg differ diff --git a/pos_product_creation/static/description/images/banner_task_deadline_reminder.jpeg b/pos_product_creation/static/description/images/banner_task_deadline_reminder.jpeg new file mode 100644 index 000000000..998679818 Binary files /dev/null and b/pos_product_creation/static/description/images/banner_task_deadline_reminder.jpeg differ diff --git a/pos_product_creation/static/description/images/banner_task_statusbar.jpeg b/pos_product_creation/static/description/images/banner_task_statusbar.jpeg new file mode 100644 index 000000000..2c57cbb7b Binary files /dev/null and b/pos_product_creation/static/description/images/banner_task_statusbar.jpeg differ diff --git a/pos_product_creation/static/description/images/checked.png b/pos_product_creation/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/pos_product_creation/static/description/images/checked.png differ diff --git a/pos_product_creation/static/description/images/cybrosys.png b/pos_product_creation/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/pos_product_creation/static/description/images/cybrosys.png differ diff --git a/pos_product_creation/static/description/images/pos.png b/pos_product_creation/static/description/images/pos.png new file mode 100644 index 000000000..58fc50a48 Binary files /dev/null and b/pos_product_creation/static/description/images/pos.png differ diff --git a/pos_product_creation/static/description/index.html b/pos_product_creation/static/description/index.html new file mode 100644 index 000000000..09e545f5f --- /dev/null +++ b/pos_product_creation/static/description/index.html @@ -0,0 +1,285 @@ +
cybrosys-logo
+
+
+
+

POS Product Creation

+

Create Products From POS

+
+

Key Highlights

+
    + +
  • Allows you to create products from Point of Sale
  • + +
+
+
+
+ +
+
+
+
+ +
+
+ +

Overview

+
+

+ The module provisions the end user to create products directly from Point of Sale. The new button "Create Product", shall enable the end user to add details such as product name, internal reference, price, type, category and more from POS. Upon clicking the confirm button, a new product shall be created based on provided details.

+
+
+ +

POS Product Creation

+
+
    + +

    + Allows you to create products from Point of Sale +

    + +
+
+ +
+
+

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/pos_product_creation/static/src/img/content.png b/pos_product_creation/static/src/img/content.png new file mode 100644 index 000000000..a2d397083 Binary files /dev/null and b/pos_product_creation/static/src/img/content.png differ diff --git a/pos_product_creation/static/src/js/product_create_button.js b/pos_product_creation/static/src/js/product_create_button.js new file mode 100644 index 000000000..0f418270a --- /dev/null +++ b/pos_product_creation/static/src/js/product_create_button.js @@ -0,0 +1,71 @@ +odoo.define('owl_tutorials.product_create_button', function(require) { + 'use strict'; + + const PosComponent = require('point_of_sale.PosComponent'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { + useListener + } = require('web.custom_hooks'); + const Registries = require('point_of_sale.Registries'); + const ajax = require('web.ajax'); + + class ProductCreateButton extends PosComponent { + constructor() { + super(...arguments); + useListener('click', this.onClick); + } + async onClick() { + var self = this; + const { + confirmed, + payload + } = await this.showPopup('ProductCreatePopup', { + title: this.env._t('POS Product Creation'), + body: this.env._t('You can Create The product.'), + }); + if (confirmed) { + var product_category = payload[0]; + var product_name = payload[1]; + var product_reference = payload[2]; + var product_price = payload[3]; + var unit_measure = payload[4]; + var product_categories = payload[5]; + console.log(product_category, 'product_category') + console.log(product_name, 'product_name') + console.log(product_reference, 'product_reference') + console.log(product_price, 'product_price') + console.log(unit_measure, 'unit_measure') + if (!product_name){ + return this.showPopup('ErrorPopup', { + title: _('A Unit Of Measure Is Required'), + }); + } + if (!unit_measure){ + return this.showPopup('ErrorPopup', { + title: _('A Unit Of Measure Is Required'), + }); + } + ajax.jsonRpc('/create_product', 'call', { + 'category': product_category, + 'name': product_name, + 'price': product_price, + 'product_reference': product_reference, + 'unit_measure': unit_measure, + 'product_categories': product_categories, + }).then(function(response) {}); + } + } + } + ProductCreateButton.template = 'ProductCreateButton'; + ProductScreen.addControlButton({ + component: ProductCreateButton, + condition: function() { + return true; + }, + position: ['before', 'SetPricelistButton'], + }); + + Registries.Component.add(ProductCreateButton); + + return ProductCreateButton; +}); \ No newline at end of file diff --git a/pos_product_creation/static/src/js/product_create_popup.js b/pos_product_creation/static/src/js/product_create_popup.js new file mode 100644 index 000000000..2aa35a4d7 --- /dev/null +++ b/pos_product_creation/static/src/js/product_create_popup.js @@ -0,0 +1,54 @@ +odoo.define('pos_product_creation.product_create_popup', function(require) { + 'use strict'; + + const { + useState, + useRef + } = owl.hooks; + const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); + const Registries = require('point_of_sale.Registries'); + + class ProductCreatePopup extends AbstractAwaitablePopup { + constructor() { + super(...arguments); + console.log(this.env.pos, '<<<<<<<<<<<<<<<') + this.state = useState({ + typeValue: this.props.startingValue, + productValue: this.props.startingValue, + priceValue: this.props.priceValue, + productRef: this.props.startingValue + }); + } + getPayload() { + var selected_vals = []; + var category = this.state.typeValue; + var product = this.state.productValue; + var product_reference = this.state.productRef; + var price = this.state.priceValue; + var unit = this.state.unitValue; + var product_category = this.state.categoryValue; + selected_vals.push(category); + selected_vals.push(product); + selected_vals.push(product_reference); + selected_vals.push(price); + selected_vals.push(unit); + selected_vals.push(product_category); + return selected_vals + } + } + ProductCreatePopup.template = 'ProductCreatePopup'; + ProductCreatePopup.defaultProps = { + confirmText: 'Ok', + cancelText: 'Cancel', + array: [], + title: 'Create ?', + body: '', + startingValue: '', + priceValue: 1, + list: [], + }; + + Registries.Component.add(ProductCreatePopup); + + return ProductCreatePopup; +}); \ No newline at end of file diff --git a/pos_product_creation/static/src/xml/product_create_button.xml b/pos_product_creation/static/src/xml/product_create_button.xml new file mode 100644 index 000000000..ccdfc9302 --- /dev/null +++ b/pos_product_creation/static/src/xml/product_create_button.xml @@ -0,0 +1,9 @@ + + + +
+ + Create Product +
+
+
\ No newline at end of file diff --git a/pos_product_creation/static/src/xml/product_create_popup.xml b/pos_product_creation/static/src/xml/product_create_popup.xml new file mode 100644 index 000000000..85d4c49f1 --- /dev/null +++ b/pos_product_creation/static/src/xml/product_create_popup.xml @@ -0,0 +1,93 @@ + + + + + + \ No newline at end of file diff --git a/pos_product_creation/views/assets.xml b/pos_product_creation/views/assets.xml new file mode 100644 index 000000000..ced8a5a22 --- /dev/null +++ b/pos_product_creation/views/assets.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file