diff --git a/sales_contract_and_recurring_invoices/README.rst b/sales_contract_and_recurring_invoices/README.rst new file mode 100644 index 000000000..b084f6338 --- /dev/null +++ b/sales_contract_and_recurring_invoices/README.rst @@ -0,0 +1,53 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Sales Contract and Recurring Invoices +===================================== +* Sales Contract and Recurring Invoices module helps to create sale contracts and recurring invoices + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Configuration +============= +*No Additional configuration is needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Credits +------- +* Developer:(V15) Ranjith R, +(V16) Vishnu P, +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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/sales_contract_and_recurring_invoices/__init__.py b/sales_contract_and_recurring_invoices/__init__.py new file mode 100644 index 000000000..1b4a459e0 --- /dev/null +++ b/sales_contract_and_recurring_invoices/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from . import controllers +from . import models +from . import report diff --git a/sales_contract_and_recurring_invoices/__manifest__.py b/sales_contract_and_recurring_invoices/__manifest__.py new file mode 100644 index 000000000..bb31674c5 --- /dev/null +++ b/sales_contract_and_recurring_invoices/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +{ + 'name': 'Sales Contract and Recurring Invoices', + 'version': '15.0.1.0.0', + 'category': 'Sales,Accounting', + 'summary': """Module helps to create sale contracts and recurring + invoices""", + 'description': """This module helps to create sale contracts with recurring + invoices and we can access all your sale contracts from website portal""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'website'], + 'data': [ + 'security/subscription_contracts_security.xml', + 'security/ir.model.access.csv', + 'data/ir_cron_data.xml', + 'report/subscription_contract_reports.xml', + 'views/subscription_contracts_views.xml', + 'views/account_move_views.xml', + 'views/subscription_contracts_templates.xml', + 'report/subscription_contract_templates.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/sales_contract_and_recurring_invoices/controllers/__init__.py b/sales_contract_and_recurring_invoices/controllers/__init__.py new file mode 100644 index 000000000..14479cceb --- /dev/null +++ b/sales_contract_and_recurring_invoices/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from . import sales_contract_and_recurring_invoices diff --git a/sales_contract_and_recurring_invoices/controllers/sales_contract_and_recurring_invoices.py b/sales_contract_and_recurring_invoices/controllers/sales_contract_and_recurring_invoices.py new file mode 100644 index 000000000..fe74261a7 --- /dev/null +++ b/sales_contract_and_recurring_invoices/controllers/sales_contract_and_recurring_invoices.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from odoo import http +from odoo.http import request +from odoo.addons.portal.controllers.portal import CustomerPortal + + +class PortalAccount(CustomerPortal): + """ Super customer portal and get count """ + + def _prepare_home_portal_values(self, counters): + """ Function to get count of contracts """ + values = super()._prepare_home_portal_values(counters) + partner = request.env.user.partner_id.id + contract_count = request.env['subscription.contracts'].search([ + ('partner_id', '=', partner)]) + values['contract_count'] = len(contract_count) + return values + + +class ContractsController(http.Controller): + """ Sale contract in customer portal controller""" + + @http.route(['/my/contracts'], type='http', auth='user', csrf=False, + website=True) + def portal_my_quotes(self): + """ Customer portal my contracts """ + partner = request.env.user.partner_id.id + values = { + 'records': request.env['subscription.contracts'].search( + [('partner_id', '=', partner)]), + } + return request.render( + 'sales_contract_and_recurring_invoices.tmp_contract_details', + values) + + @http.route(['/contracts//'], type='http', + auth='user', + csrf=False, website=True) + def portal_manufacture(self, contract_id): + """ Customer portal subscription contract """ + values = { + 'records': request.env['subscription.contracts'].browse( + contract_id), + } + return request.render( + 'sales_contract_and_recurring_invoices.contract_details', + values) + + @http.route(['/report/pdf//'], type='http', + auth='public', + csrf=False, website=True) + def action_print_report(self, contract_id): + """ Print subscription contract report """ + report = request.env.ref( + 'sales_contract_and_recurring_invoices.action_report_contracts') + pdf = report.sudo()._render_qweb_pdf([contract_id])[0] + pdfhttpheaders = [('Content-Type', 'application/pdf'), + ('Content-Length', len(pdf))] + return request.make_response(pdf, headers=pdfhttpheaders) diff --git a/sales_contract_and_recurring_invoices/data/ir_cron_data.xml b/sales_contract_and_recurring_invoices/data/ir_cron_data.xml new file mode 100644 index 000000000..2c88f5841 --- /dev/null +++ b/sales_contract_and_recurring_invoices/data/ir_cron_data.xml @@ -0,0 +1,18 @@ + + + + + + Subscription Contract State Change + + code + model.subscription_contract_state_change() + + + 1 + days + -1 + 1 + + + diff --git a/sales_contract_and_recurring_invoices/doc/RELEASE_NOTES.md b/sales_contract_and_recurring_invoices/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..996cb6f0a --- /dev/null +++ b/sales_contract_and_recurring_invoices/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 28.03.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Sales Contract and Recurring Invoices diff --git a/sales_contract_and_recurring_invoices/models/__init__.py b/sales_contract_and_recurring_invoices/models/__init__.py new file mode 100644 index 000000000..43b8ef6b1 --- /dev/null +++ b/sales_contract_and_recurring_invoices/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from . import account_move +from . import sale_order_line +from . import subscription_contracts +from . import subscription_contract_line + diff --git a/sales_contract_and_recurring_invoices/models/account_move.py b/sales_contract_and_recurring_invoices/models/account_move.py new file mode 100644 index 000000000..733367a97 --- /dev/null +++ b/sales_contract_and_recurring_invoices/models/account_move.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from odoo import fields, models + + +class AccountMove(models.Model): + """ Add contract_origin in account move""" + _inherit = 'account.move' + + contract_origin = fields.Integer(string='Subscription Contract', + help='to add Subscription Contract' + 'id in account move') diff --git a/sales_contract_and_recurring_invoices/models/sale_order_line.py b/sales_contract_and_recurring_invoices/models/sale_order_line.py new file mode 100644 index 000000000..396b40af4 --- /dev/null +++ b/sales_contract_and_recurring_invoices/models/sale_order_line.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from odoo import fields, models + + +class SaleOrderLine(models.Model): + """ Add contract reference in sale order line""" + _inherit = 'sale.order.line' + + contract_id = fields.Many2one( + 'subscription.contracts', string='Contracts', + help='For adding Contracts in sale order line') diff --git a/sales_contract_and_recurring_invoices/models/subscription_contract_line.py b/sales_contract_and_recurring_invoices/models/subscription_contract_line.py new file mode 100644 index 000000000..1eb69c83a --- /dev/null +++ b/sales_contract_and_recurring_invoices/models/subscription_contract_line.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from odoo import api, fields, models + + +class SubscriptionContractLines(models.Model): + """ Add subscription contract line""" + _name = 'subscription.contracts.line' + _description = 'Subscription Contracts Line' + + subscription_contract_id = fields.Many2one( + 'subscription.contracts', string='Subscription Contracts', + help='To add Subscription') + product_id = fields.Many2one( + 'product.product', string='Products', + help='To add products') + currency_id = fields.Many2one( + related='subscription_contract_id.currency_id', + depends=['subscription_contract_id.currency_id'], + help='To get the currency', + string='Currency') + description = fields.Text( + string="Description", compute='_compute_description', store=True, + readonly=False, precompute=True, help='To get the product description') + qty_ordered = fields.Float( + string="Quantity", digits='Product Unit of Measure', default=1.0, + help='To add ordered Quantity') + product_uom_id = fields.Many2one( + 'uom.uom', string='Unit of Measure', + compute='_compute_product_uom', + store=True, help='To get product unit of measure') + price_unit = fields.Float(string="Unit Price", help='to get unit price', + compute='_compute_price_unit', + digits='Product Price', + store=True, readonly=False, precompute=True, ) + tax_ids = fields.Many2many(comodel_name='account.tax', string="Taxes", + context={'active_test': False}, + help='To Add taxes') + discount = fields.Float(string="Discount (%)", digits='Discount', + store=True, readonly=False, help='To add discount') + sub_total = fields.Monetary( + string="Total", compute='_compute_amount', store=True, precompute=True, + help='Sub Total') + + @api.depends('product_id') + def _compute_description(self): + """ Compute product description """ + for option in self: + if not option.product_id: + continue + product_lang = option.product_id.with_context( + lang=self.subscription_contract_id.partner_id.lang) + option.description =\ + product_lang.get_product_multiline_description_sale() + + @api.depends('product_id') + def _compute_product_uom(self): + """ Compute product uom """ + for rec in self: + rec.product_uom_id = rec.product_id.uom_id + + @api.depends('product_id') + def _compute_price_unit(self): + """ Compute unit price""" + for rec in self: + rec.price_unit = rec.product_id.lst_price + + @api.depends('product_id', 'qty_ordered', 'discount', 'price_unit') + def _compute_amount(self): + """ Compute total amount """ + for rec in self: + total = rec.price_unit * rec.qty_ordered + discount = total * rec.discount / 100 + rec.sub_total = total - discount diff --git a/sales_contract_and_recurring_invoices/models/subscription_contracts.py b/sales_contract_and_recurring_invoices/models/subscription_contracts.py new file mode 100644 index 000000000..8903da06a --- /dev/null +++ b/sales_contract_and_recurring_invoices/models/subscription_contracts.py @@ -0,0 +1,250 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from odoo import api, fields, models +from odoo.tools import date_utils +from odoo.tools.safe_eval import datetime + + +class SubscriptionContracts(models.Model): + """ Model for subscription contracts """ + _name = 'subscription.contracts' + _description = 'Subscription Contracts' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string='Contract Name', required=True, + help='To add contract name') + reference = fields.Char(string='Reference', help='To add contract reference' + ) + partner_id = fields.Many2one('res.partner', string="Customer", + help='To add Customer') + recurring_period = fields.Integer(string='Recurring Period', + help='To add recurring period of ' + 'subscription contract') + recurring_period_interval = fields.Selection([ + ('Days', 'Days'), + ('Weeks', 'Weeks'), + ('Months', 'Months'), + ('Years', 'Years'), + ], help='To add recurring interval of subscription contract') + contract_reminder = fields.Integer( + string='Contract Expiration Reminder (Days)', + help='Add expiry reminder of subscription contract in days.') + recurring_invoice = fields.Integer( + string='Recurring Invoice Interval (Days)', + help='Add recurring invoice interval in days') + next_invoice_date = fields.Date(string='Next Invoice Date', store=True, + compute='_compute_next_invoice_date', + help='Add date of next invoice') + company_id = fields.Many2one('res.company', string='Company', + default=lambda self: self.env.company, + help='To get company') + currency_id = fields.Many2one('res.currency', string='Currency', + help='To get currency', required=True, + default=lambda + self: self.env.company.currency_id) + date_start = fields.Date(string='Start Date', default=fields.Date.today(), + help='To Add subscription contract start date') + invoice_count = fields.Integer(store=True, + compute='_compute_invoice_count', + string='Invoice count', + help='To get subscription contract end date') + date_end = fields.Date(string='End Date', help='Subscription End Date') + current_reference = fields.Integer(compute='_compute_sale_order_lines', + string='Current Subscription Id', + help='To add current Subscription id') + lock = fields.Boolean(string='Lock', default=False, + help='To lock subscription contract') + state = fields.Selection([ + ('New', 'New'), + ('Ongoing', 'Ongoing'), + ('Expire Soon', 'Expire Soon'), + ('Expired', 'Expired'), + ('Cancelled', 'Cancelled'), + ], string='Stage', default='New', copy=False, tracking=True, + readonly=True, help='Status of subscription contract') + contract_line_ids = fields.One2many( + 'subscription.contracts.line', + 'subscription_contract_id', + help='To Add Subscription Contract', string='Contract lines') + amount_total = fields.Monetary(string="Total", store=True, + compute='_compute_amount_total', tracking=4, + help='To get total amount') + sale_order_line_ids = fields.One2many('sale.order.line', + 'contract_id', + help='Sale Order Lines', + string='To add order lines') + note = fields.Html(string="Terms and conditions", + help='To add terms and conditions', translate=True) + invoices_active = fields.Boolean('Invoice active', default=False, + help='To active invoices smart button', + compute='_compute_invoice_active') + + def action_to_confirm(self): + """ Button to confirm """ + self.write({'state': 'Ongoing'}) + + def action_to_cancel(self): + """ Button to cancel """ + self.write({'state': 'Cancelled'}) + + def action_generate_invoice(self): + """ Button to generate invoice """ + self.env['account.move'].create( + { + 'move_type': 'out_invoice', + 'partner_id': self.partner_id.id, + 'invoice_date': fields.date.today(), + 'contract_origin': self.id, + 'invoice_line_ids': [(0, 0, { + 'product_id': line.product_id.id, + 'name': line.description, + 'quantity': line.qty_ordered, + 'price_unit': line.price_unit, + 'tax_ids': line.tax_ids, + 'discount': line.discount, + }) for line in self.contract_line_ids] + }) + self.invoice_count = self.env['account.move'].search_count([ + ('contract_origin', '=', self.id)]) + + def action_lock(self): + """ Button to lock subscription contract """ + self.lock = True + + def action_to_unlock(self): + """ Button to unlock subscription contract """ + self.lock = False + + def action_get_invoice(self): + """ Invoices smart button """ + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Invoices', + 'view_mode': 'tree,form', + 'res_model': 'account.move', + 'domain': [('contract_origin', '=', self.id)], + } + + @api.depends('contract_line_ids.sub_total') + def _compute_amount_total(self): + """ Compute total amount """ + for order in self: + order_lines = order.contract_line_ids + order.amount_total = sum(order_lines.mapped('sub_total')) + + @api.depends('partner_id') + def _compute_invoice_count(self): + """ Compute invoice count """ + self.invoice_count = self.env['account.move'].search_count([ + ('contract_origin', '=', self.id) + ]) + + @api.depends('invoices_active') + def _compute_invoice_active(self): + """ Check invoice count to show the invoice smart button """ + invoice_count = self.env['account.move'].search_count([ + ('contract_origin', '=', self.id) + ]) + if invoice_count != 0: + self.invoices_active = True + else: + self.invoices_active = False + + @api.depends('date_start', 'recurring_invoice', 'recurring_period', + 'recurring_period_interval') + def _compute_next_invoice_date(self): + """ Compute next invoice date """ + self.next_invoice_date = fields.Date.today() + start_date = self.date_start + interval = self.recurring_invoice + recurring_period = self.recurring_period + recurring_period_interval = self.recurring_period_interval + self.next_invoice_date = date_utils.add(start_date, + days=int(interval)) + if recurring_period_interval == 'Days': + next_schedule = date_utils.add(start_date, + days=int(recurring_period)) + self.date_end = next_schedule + elif recurring_period_interval == 'Weeks': + next_schedule = date_utils.add(start_date, + weeks=int(recurring_period)) + self.date_end = next_schedule + elif recurring_period_interval == 'Months': + next_schedule = date_utils.add(start_date, + months=int(recurring_period)) + self.date_end = next_schedule + else: + next_schedule = date_utils.add(start_date, + years=int(recurring_period)) + self.date_end = next_schedule + + @api.model + def subscription_contract_state_change(self): + """ Automatic state change and create invoice """ + records = self.env['subscription.contracts'].search([]) + for rec in records: + end_date = rec.date_end + expiry_reminder = rec.contract_reminder + expiry_warning_date = date_utils.subtract(end_date, + days=int( + expiry_reminder)) + current_date = fields.Date.today() + next_invoice_date = rec.next_invoice_date + if expiry_warning_date <= current_date <= end_date: + rec.write({'state': 'Expire Soon'}) + if end_date < current_date: + rec.write({'state': 'Expired'}) + if next_invoice_date == current_date and rec.state != 'Cancelled': + data = rec.env['account.move'].create([ + { + 'move_type': 'out_invoice', + 'partner_id': rec.partner_id.id, + 'invoice_date': fields.date.today(), + 'contract_origin': rec.id, + }]) + for line in rec.contract_line_ids: + data.write({ + 'invoice_line_ids': [(0, 0, { + 'product_id': line.product_id.id, + 'name': line.description, + 'quantity': line.qty_ordered, + 'price_unit': line.price_unit, + 'tax_ids': line.tax_ids, + 'discount': line.discount, + })], + }) + rec.invoice_count = rec.env['account.move'].search_count([ + ('contract_origin', '=', rec.id)]) + + @api.depends('current_reference') + def _compute_sale_order_lines(self): + """ Get sale order line""" + self.current_reference = self.id + product_id = self.contract_line_ids.mapped('product_id') + sale_order_line = self.env['sale.order.line'].search([ + ('order_partner_id', '=', self.partner_id.id) + ]) + for rec in sale_order_line: + if self.date_start <= datetime.datetime.date( + rec.create_date) <= self.date_end: + if rec.product_id in product_id: + rec.contract_id = self.id diff --git a/sales_contract_and_recurring_invoices/report/__init__.py b/sales_contract_and_recurring_invoices/report/__init__.py new file mode 100644 index 000000000..a4eaa99f3 --- /dev/null +++ b/sales_contract_and_recurring_invoices/report/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from . import subscription_contracts_report diff --git a/sales_contract_and_recurring_invoices/report/subscription_contract_reports.xml b/sales_contract_and_recurring_invoices/report/subscription_contract_reports.xml new file mode 100644 index 000000000..d17e0b26f --- /dev/null +++ b/sales_contract_and_recurring_invoices/report/subscription_contract_reports.xml @@ -0,0 +1,14 @@ + + + + + Subscription Contract Report + subscription.contracts + qweb-pdf + + sales_contract_and_recurring_invoices.report_contracts + sales_contract_and_recurring_invoices.report_contracts + 'Subscription Contracts Report - %s' %(object.name) + + diff --git a/sales_contract_and_recurring_invoices/report/subscription_contract_templates.xml b/sales_contract_and_recurring_invoices/report/subscription_contract_templates.xml new file mode 100644 index 000000000..37ddfc07f --- /dev/null +++ b/sales_contract_and_recurring_invoices/report/subscription_contract_templates.xml @@ -0,0 +1,187 @@ + + + + + diff --git a/sales_contract_and_recurring_invoices/report/subscription_contracts_report.py b/sales_contract_and_recurring_invoices/report/subscription_contracts_report.py new file mode 100755 index 000000000..98ad6e76a --- /dev/null +++ b/sales_contract_and_recurring_invoices/report/subscription_contracts_report.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ranjith R(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. + +############################################################################### +from odoo import api, models + + +class SubscriptionContractsReport(models.AbstractModel): + """Class to print form view""" + _name = 'report.sales_contract_and_recurring_invoices.report_contracts' + _description = "Contract report" + + @api.model + def _get_report_values(self, docids, data=None): + """Function to print report """ + records = self.env['subscription.contracts'].browse(docids) + return { + 'records': records, + } diff --git a/sales_contract_and_recurring_invoices/security/ir.model.access.csv b/sales_contract_and_recurring_invoices/security/ir.model.access.csv new file mode 100644 index 000000000..6a6ebdd80 --- /dev/null +++ b/sales_contract_and_recurring_invoices/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_subscription_contracts_user,access.subscription.contracts.user,model_subscription_contracts,base.group_user,1,1,1,1 +access_subscription_contracts_line_user,access.subscription.contracts.user.line,model_subscription_contracts_line,base.group_user,1,1,1,1 diff --git a/sales_contract_and_recurring_invoices/security/subscription_contracts_security.xml b/sales_contract_and_recurring_invoices/security/subscription_contracts_security.xml new file mode 100644 index 000000000..fc14d2d28 --- /dev/null +++ b/sales_contract_and_recurring_invoices/security/subscription_contracts_security.xml @@ -0,0 +1,11 @@ + + + + + + Subscription Contract Company Rule + + [('company_id', '=', company_id)] + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/check.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/check.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/chevron.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/chevron.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/cogs.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/cogs.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/consultation.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/consultation.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/ecom-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/ecom-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/education-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/education-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/hotel-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/hotel-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/license.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/license.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/lifebuoy.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/lifebuoy.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/manufacturing-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/manufacturing-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/pos-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/pos-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/puzzle.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/puzzle.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/restaurant-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/restaurant-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/service-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/service-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/trading-black.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/trading-black.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/training.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/training.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/update.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/update.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/user.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/user.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/icons/wrench.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/wrench.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/categories.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/categories.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/check-box.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/check-box.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/compass.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/compass.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/corporate.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/corporate.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/customer-support.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/customer-support.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/cybrosys-logo.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/cybrosys-logo.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/features.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/features.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/logo.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/logo.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/pictures.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/pictures.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/pie-chart.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/pie-chart.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/right-arrow.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/right-arrow.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/star.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/star.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/support.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/support.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/1.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/1.png new file mode 100755 index 000000000..baaef2807 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/1.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/2.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/2.png new file mode 100755 index 000000000..fb65048fe Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/2.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/3.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/3.png new file mode 100755 index 000000000..65f9d71a9 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/3.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/4.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/4.png new file mode 100755 index 000000000..e9baebd5d Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/4.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/5.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/5.png new file mode 100755 index 000000000..5c8646fae Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/5.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/6.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/6.png new file mode 100755 index 000000000..be8dd200b Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/6.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_01.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_01.png new file mode 100644 index 000000000..f31a8a002 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_01.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_02.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_02.png new file mode 100644 index 000000000..e070d92eb Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_02.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_03.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_03.png new file mode 100644 index 000000000..69def80d4 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_03.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_04.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_04.png new file mode 100644 index 000000000..6718675ce Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_04.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_05.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_05.png new file mode 100644 index 000000000..8d42eafa6 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_05.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_06.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_06.png new file mode 100644 index 000000000..8d37e3619 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_06.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_07.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_07.png new file mode 100644 index 000000000..c7ddf390a Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_07.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_08.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_08.png new file mode 100644 index 000000000..09ca32e3b Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_08.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_09.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_09.png new file mode 100644 index 000000000..333ebec48 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_09.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_10.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_10.png new file mode 100644 index 000000000..ae5ccc3bc Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_10.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_11.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_11.png new file mode 100644 index 000000000..8b8b61a8b Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_11.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_12.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_12.png new file mode 100644 index 000000000..b5b8b9797 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_12.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_13.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_13.png new file mode 100644 index 000000000..385a0b94e Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_13.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_14.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_14.png new file mode 100644 index 000000000..f9a1e185f Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_14.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_15.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_15.png new file mode 100644 index 000000000..ad9d248db Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_15.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_16.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_16.png new file mode 100644 index 000000000..e10058355 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_16.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_17.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_17.png new file mode 100644 index 000000000..c2377c60e Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_17.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_18.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_18.png new file mode 100644 index 000000000..f9256272d Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_18.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_19.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_19.png new file mode 100644 index 000000000..9d8c9a625 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_19.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_20.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_20.png new file mode 100644 index 000000000..b7af0eba5 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_20.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_21.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_21.png new file mode 100644 index 000000000..c4b7932d4 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_21.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_22.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_22.png new file mode 100644 index 000000000..44d53b041 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_22.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_23.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_23.png new file mode 100644 index 000000000..493119622 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_23.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_24.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_24.png new file mode 100644 index 000000000..6811133e7 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/Subscription_contract_24.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/hero.gif b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..a381c4b97 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/hero.gif differ diff --git a/sales_contract_and_recurring_invoices/static/description/banner.jpg b/sales_contract_and_recurring_invoices/static/description/banner.jpg new file mode 100644 index 000000000..ca20850ef Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/banner.jpg differ diff --git a/sales_contract_and_recurring_invoices/static/description/icon.png b/sales_contract_and_recurring_invoices/static/description/icon.png new file mode 100644 index 000000000..596b4a2d9 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/icon.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/index.html b/sales_contract_and_recurring_invoices/static/description/index.html new file mode 100644 index 000000000..dd12d34ff --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/index.html @@ -0,0 +1,810 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +
+
+
+

+ Sales Contract and Recurring Invoices

+

+ Access All Sales Contacts from Portal My Account.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps your customer to access all your sales contract from + Website Customer Portal. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ +
+ Allow your customers to access all sales contracts from Portal My Account. + +
+
+
+ +
+ Allow your customer to download the contract subscription report. + +
+
+ +
+
+ +
+ Automatically generate recurring invoice for subscription contracts. + + + +
+
+ + +
+
+ + + + +

+ Screenshots +

+
+
+
+ +
+

+ In Sales -> Configuration -> Contracts, can see all + subscription contracts.

+ +
+ +
+

+ We can create new subscription contracts using CREATE button. +

+ +
+ +
+ +

+ The created Contract in 'New' stage has option to select the + contract lines and have button to confirm the contract.

+ +
+ +
+

+ When we click 'Confirm' button the subscription contract is + changed to + 'Ongoing' stage.

+ +
+ +
+

+ There have button to Generate Invoice for contract lines.

+ +
+ +
+

+ When we click 'Generate Invoice' button, it creates invoice for + contract lines and shows the count in smart tab.

+ +
+ +
+

+ When we click the Smart tab can see all created invoices for + this subscription contract.

+ +
+ +
+

+ There has 'LOCK' button to lock the subscription contract. When + we click this button we do not modify the subscription + contract.

+ + + +
+ +
+

+ There has a 'UNLOCK' Button to Unlock the Subscription + Contract. When we click Unlock button we can modify the + Subscription Contract.

+ +
+ +
+

+ When contract reaches 'Next Invoice Date' it + automatically + generate invoice for this subscription contract and shows the + invoice count in smart tab, when we click the smart tab can see + all created invoice for this subscription contract.

+ + +
+ +
+

+ When contract reaches 'Contract Expiration Reminder Period' it + automatically + change the stage of this subscription contract into 'Expire + Soon'.

+ +
+ +
+

+ When contract reaches 'Contract End Date' it automatically + change the stage Of this subscription contract into + 'Expired'.

+ +
+ +
+

+ There has 'CANCEL' button to cancel the subscription + contract.

+ +
+ +
+

+ When we click cancel button, the subscription contract changes + into 'Cancelled' state.

+ +
+ +
+

+ Under 'Sale Order Lines' tab can see all sale order lines of + this + subscription contract.

+ +
+ +
+

+ In Website -> My Account can see My Contracts option.

+ + +
+ +
+

+ When we click "My Contracts" can see all subscription + Contract.

+ +
+ +
+

+ When we click Contract Name, possible to access the + Subscription Contract.

+ + +
+ +
+

+ In website customer portal there has option to Print the + subscription contract PDF report.

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

+ Related + 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

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need + help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/sales_contract_and_recurring_invoices/views/account_move_views.xml b/sales_contract_and_recurring_invoices/views/account_move_views.xml new file mode 100644 index 000000000..9591518db --- /dev/null +++ b/sales_contract_and_recurring_invoices/views/account_move_views.xml @@ -0,0 +1,17 @@ + + + + + + account.move.view.form.inherit.sales.contract.recurring.invoice + + account.move + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/views/subscription_contracts_templates.xml b/sales_contract_and_recurring_invoices/views/subscription_contracts_templates.xml new file mode 100644 index 000000000..8e2828e90 --- /dev/null +++ b/sales_contract_and_recurring_invoices/views/subscription_contracts_templates.xml @@ -0,0 +1,196 @@ + + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/views/subscription_contracts_views.xml b/sales_contract_and_recurring_invoices/views/subscription_contracts_views.xml new file mode 100644 index 000000000..563aaefd8 --- /dev/null +++ b/sales_contract_and_recurring_invoices/views/subscription_contracts_views.xml @@ -0,0 +1,169 @@ + + + + + Contracts + ir.actions.act_window + subscription.contracts + tree,form + +

+ Create a new record! +

+
+
+ + + + + subscription.contracts.view.form + subscription.contracts + +
+
+ +
+ +
+ +
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + + subscription.contracts.view.tree + subscription.contracts + + + + + + + + + + + + + + + subscription.contracts.line.view.tree + subscription.contracts.line + + + + + + + + + + + + + +