diff --git a/payment_status_in_sale/README.rst b/payment_status_in_sale/README.rst new file mode 100644 index 000000000..199fa9d4f --- /dev/null +++ b/payment_status_in_sale/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Sale Order Payment Status +========================= +* This module provides sale order payment details such as invoice status, amount due, date of payment and amount etc. + +Configuration +============= +* No additional configuration is needed to use this module. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V14) Shyamgeeth PP, Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/payment_status_in_sale/__init__.py b/payment_status_in_sale/__init__.py new file mode 100644 index 000000000..381eab6c3 --- /dev/null +++ b/payment_status_in_sale/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Shyamgeeth P.P () +# +# 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 . +# +################################################################################### +from . import models diff --git a/payment_status_in_sale/__manifest__.py b/payment_status_in_sale/__manifest__.py new file mode 100644 index 000000000..9392dc645 --- /dev/null +++ b/payment_status_in_sale/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Shyamgeeth P.P () +# +# 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': 'Sale Order Payment Status', + 'version': '14.0.1.0.0', + 'category': 'Sales', + 'summary': 'Sale order payment status,payment details and amount due', + 'description': """This module used to get the information regarding invoice + of the corresponding sale order in the sale order page. It includes sale + order payment status, payment details and amount due.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'account'], + 'data': ['views/sale_order_views.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/payment_status_in_sale/doc/RELEASE_NOTES.md b/payment_status_in_sale/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..580d11960 --- /dev/null +++ b/payment_status_in_sale/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 02.12.2023 +#### Version 14.0.1.0.0 +##### ADD +- Initial commit for Sale Order Payment Status. diff --git a/payment_status_in_sale/models/__init__.py b/payment_status_in_sale/models/__init__.py new file mode 100644 index 000000000..e1e57d11f --- /dev/null +++ b/payment_status_in_sale/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Shyamgeeth P.P () +# +# 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 . +# +################################################################################ +from . import sale_order diff --git a/payment_status_in_sale/models/sale_order.py b/payment_status_in_sale/models/sale_order.py new file mode 100644 index 000000000..f2edfae5e --- /dev/null +++ b/payment_status_in_sale/models/sale_order.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Shyamgeeth P.P () +# +# 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 . +# +################################################################################ +import json + +from odoo import api, fields, models, _ + + +class SaleOrder(models.Model): + """Sale order model inherited for adding status of payment of sales.""" + + _inherit = "sale.order" + + payment_status = fields.Char(string="Payment Status", + compute="_compute_payment_status", + help="Field to check the payment status of " + "the sale order") + payment_details = fields.Text(string="Payment Details", + compute="_compute_payment_details", + help="Shows the payment done details " + "including date and amount") + amount_due = fields.Float(string="Amount Due", + compute='_compute_amount_due', + help="Shows the amount that in due for the " + "corresponding sale order") + invoice_state = fields.Char(string="Invoice State", + compute="_compute_invoice_state", + help="Field to check the invoice state of " + "sale order") + + @api.depends('invoice_ids') + def _compute_payment_status(self): + """ The function will compute the payment status of the sale order, + if an invoice is created for the corresponding sale order.Payment + status will be either in paid,not paid,partially paid, reversed etc.""" + for order in self: + order.payment_status = 'No invoice' + payment_states = order.invoice_ids.mapped('payment_state') + status_length = len(payment_states) + if 'partial' in payment_states: + order.payment_status = 'Partially Paid' + break + elif 'not_paid' in payment_states: + order.payment_status = 'Not Paid' + break + elif 'not_paid' in payment_states and \ + status_length == payment_states.count('not_paid'): + order.payment_status = 'Not Paid' + break + elif 'paid' in payment_states and \ + status_length == payment_states.count('paid'): + order.payment_status = 'Paid' + break + elif 'in_payment' in payment_states and \ + status_length == payment_states.count('in_payment'): + order.payment_status = 'In Payment' + break + elif 'reversed' in payment_states and \ + status_length == payment_states.count('reversed'): + order.payment_status = 'Reversed' + break + else: + order.payment_status = 'No invoice' + + @api.depends('invoice_ids') + def _compute_invoice_state(self): + """The function will compute the state of the invoice , Once an invoice + is existing in a sale order.""" + for rec in self: + rec.invoice_state = 'No invoice' + for order in rec.invoice_ids: + if order.state == 'posted': + rec.invoice_state = 'posted' + elif order.state != 'posted': + rec.invoice_state = 'draft' + else: + rec.invoice_state = 'No invoice' + + @api.depends('invoice_ids') + def _compute_amount_due(self): + """The function is used to compute the amount due from the invoice and + if payment is registered.""" + for rec in self: + rec.amount_due = 0 + for order in rec.invoice_ids: + rec.amount_due = rec.amount_due + order.amount_residual + + @api.depends('invoice_ids') + def _compute_payment_details(self): + """Compute the payment details from invoices and added into the sale + order form view.""" + for rec in self: + rec.payment_details = False + payment = [] + for order in rec.invoice_ids: + if order.invoice_payments_widget != 'false': + for pay in json.loads(order.invoice_payments_widget)['content']: + payment.append(pay) + for order in rec.invoice_ids: + if order.invoice_payments_widget != 'false': + payment_line = json.loads(order.invoice_payments_widget) + payment_line['content'] = payment + rec.payment_details = json.dumps(payment_line) + break + + def action_register_payment(self): + """ Open the account.payment.register wizard to pay the selected journal + entries. + :return: An action opening the account.payment.register wizard. + """ + self.ensure_one() + return { + 'name': _('Register Payment'), + 'res_model': 'account.payment.register', + 'view_mode': 'form', + 'context': { + 'active_model': 'account.move', + 'active_ids': self.invoice_ids.ids, + }, + 'target': 'new', + 'type': 'ir.actions.act_window', + } diff --git a/payment_status_in_sale/static/description/assets/icons/check.png b/payment_status_in_sale/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/check.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/cogs.png b/payment_status_in_sale/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/cogs.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/consultation.png b/payment_status_in_sale/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/consultation.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/ecom-black.png b/payment_status_in_sale/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/ecom-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/education-black.png b/payment_status_in_sale/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/education-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/hotel-black.png b/payment_status_in_sale/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/hotel-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/license.png b/payment_status_in_sale/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/license.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/lifebuoy.png b/payment_status_in_sale/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/lifebuoy.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/logo.png b/payment_status_in_sale/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/logo.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/manufacturing-black.png b/payment_status_in_sale/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/manufacturing-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/pos-black.png b/payment_status_in_sale/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/pos-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/puzzle.png b/payment_status_in_sale/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/puzzle.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/restaurant-black.png b/payment_status_in_sale/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/restaurant-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/service-black.png b/payment_status_in_sale/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/service-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/trading-black.png b/payment_status_in_sale/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/trading-black.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/training.png b/payment_status_in_sale/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/training.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/update.png b/payment_status_in_sale/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/update.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/user.png b/payment_status_in_sale/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/user.png differ diff --git a/payment_status_in_sale/static/description/assets/icons/wrench.png b/payment_status_in_sale/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/payment_status_in_sale/static/description/assets/icons/wrench.png differ diff --git a/payment_status_in_sale/static/description/assets/modules/barcode_scanning.png b/payment_status_in_sale/static/description/assets/modules/barcode_scanning.png new file mode 100644 index 000000000..4be2248a4 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/modules/barcode_scanning.png differ diff --git a/payment_status_in_sale/static/description/assets/modules/delivery_status.png b/payment_status_in_sale/static/description/assets/modules/delivery_status.png new file mode 100644 index 000000000..6122a2c42 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/modules/delivery_status.png differ diff --git a/payment_status_in_sale/static/description/assets/modules/dynamic_product.png b/payment_status_in_sale/static/description/assets/modules/dynamic_product.png new file mode 100644 index 000000000..8189b153b Binary files /dev/null and b/payment_status_in_sale/static/description/assets/modules/dynamic_product.png differ diff --git a/payment_status_in_sale/static/description/assets/modules/multi_warehouse.png b/payment_status_in_sale/static/description/assets/modules/multi_warehouse.png new file mode 100644 index 000000000..92bb04f71 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/modules/multi_warehouse.png differ diff --git a/payment_status_in_sale/static/description/assets/modules/sale_discount.png b/payment_status_in_sale/static/description/assets/modules/sale_discount.png new file mode 100644 index 000000000..924a65196 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/modules/sale_discount.png differ diff --git a/payment_status_in_sale/static/description/assets/modules/sale_report.png b/payment_status_in_sale/static/description/assets/modules/sale_report.png new file mode 100644 index 000000000..d881f99c6 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/modules/sale_report.png differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/amount_due.png b/payment_status_in_sale/static/description/assets/screenshots/amount_due.png new file mode 100644 index 000000000..a474a51b5 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/amount_due.png differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/paid.png b/payment_status_in_sale/static/description/assets/screenshots/paid.png new file mode 100644 index 000000000..c7df683d3 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/paid.png differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/partial.png b/payment_status_in_sale/static/description/assets/screenshots/partial.png new file mode 100644 index 000000000..b61b2beca Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/partial.png differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/payment.png b/payment_status_in_sale/static/description/assets/screenshots/payment.png new file mode 100644 index 000000000..2a6731eea Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/payment.png differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/payment_info.png b/payment_status_in_sale/static/description/assets/screenshots/payment_info.png new file mode 100644 index 000000000..7259b4a83 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/payment_info.png differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/saleorder.gif b/payment_status_in_sale/static/description/assets/screenshots/saleorder.gif new file mode 100644 index 000000000..2b5adea97 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/saleorder.gif differ diff --git a/payment_status_in_sale/static/description/assets/screenshots/status.png b/payment_status_in_sale/static/description/assets/screenshots/status.png new file mode 100644 index 000000000..521d21f86 Binary files /dev/null and b/payment_status_in_sale/static/description/assets/screenshots/status.png differ diff --git a/payment_status_in_sale/static/description/banner.jpg b/payment_status_in_sale/static/description/banner.jpg new file mode 100644 index 000000000..f0d03f459 Binary files /dev/null and b/payment_status_in_sale/static/description/banner.jpg differ diff --git a/payment_status_in_sale/static/description/icon.png b/payment_status_in_sale/static/description/icon.png new file mode 100644 index 000000000..53754c7fc Binary files /dev/null and b/payment_status_in_sale/static/description/icon.png differ diff --git a/payment_status_in_sale/static/description/index.html b/payment_status_in_sale/static/description/index.html new file mode 100644 index 000000000..d665e6253 --- /dev/null +++ b/payment_status_in_sale/static/description/index.html @@ -0,0 +1,708 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Sale Order Payment Status

+

+ Shows the Payment Status of the Sale Order

+ +
+
+



+
+
+
+ +
+
+

+ Overview +

+
+ +
+

+ The module will enables you to check the payment status on Sales + page.

+
+
+
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Shows Payment Status in Sale Order tree view.

+
+
+ +
+
+ +
+
+

+ Shows Amount Due in Sale Order form.

+
+
+
+
+ +
+
+

+ Shows Payment Details in the Sale Order form.

+
+
+
+
+ +
+
+

+ Payment can do from Sale Order form.

+
+
+
+
+ +
+
+

+ Shows Payment Status in the Sale Order form view.

+
+
+
+
+
+

+ Screenshots +

+
+
+

+ 1.Shows Payment Status in Sale Order tree view

+

+ This module will display the Payment Status in tree view of Sales. +

+ +
+ +
+

+ 2.Shows Amount Due in Sale Order form.

+

+ Once an invoice is generated,the Payment Status is updated + to "Not Paid" and Amount Due is displayed on the form. +

+ +
+ + +
+

+ 3.Shows Payment Details in the Sale Order form.

+

+ Upon creating an invoice and registering the payment using "REGISTER PAYMENT" Button.The status will be + changed to either "PAID" or "PARTIALLY PAID" state, + and Payment + details will showed on the form. +

+ +
+ + +
+

+ 4.Payment can do from Sale Order form.

+

+ Once an invoice is created and confirmed.Then the + "REGISTER PAYMENT" + button enable on the Sale Order + form view and user can register the payment from the Sale + Order + form. +

+ +
+ + +
+

+ 5.Shows Payment status in the Sale Order form view.

+

+ Once an invoice is created and confirmed, it will shows the + Payment status on the Sale Order form view. +

+

+ Example 1 : PAID +

+ +

+ Example 2 : NOT PAID +

+ +

+ Example 3 : PARTIALLY PAID +

+ +
+ + +
+
+

Suggested Products

+
+ +
+
+ + + +
+
+
+

Our Services

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

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

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

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

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

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+
diff --git a/payment_status_in_sale/views/sale_order_views.xml b/payment_status_in_sale/views/sale_order_views.xml new file mode 100644 index 000000000..20ca6d2c2 --- /dev/null +++ b/payment_status_in_sale/views/sale_order_views.xml @@ -0,0 +1,86 @@ + + + + + sales.order.view.form.inherit.payment.status.in + .sale + + sale.order + + + + + + + + + + + + + + + + +