diff --git a/sales_contract_and_recurring_invoices/README.rst b/sales_contract_and_recurring_invoices/README.rst new file mode 100644 index 000000000..e98920f3e --- /dev/null +++ b/sales_contract_and_recurring_invoices/README.rst @@ -0,0 +1,48 @@ +.. 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 +===================================== +This module enables to create sale contracts and recurring invoices. + +Configuration +============= +* No Additional configuration is needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, Version 3 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers : (V16) Vishnu P, + (V17) Aysha Shalin, + 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/sales_contract_and_recurring_invoices/__init__.py b/sales_contract_and_recurring_invoices/__init__.py new file mode 100644 index 000000000..52b359b52 --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import controllers +from . import models diff --git a/sales_contract_and_recurring_invoices/__manifest__.py b/sales_contract_and_recurring_invoices/__manifest__.py new file mode 100644 index 000000000..cd682e7ef --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': 'Sales Contract and Recurring Invoices', + 'version': '17.0.1.0.0', + 'category': 'Sales,Accounting', + 'summary': """Create sale contracts and recurring invoices.""", + 'description': """This module helps to create sale contracts with recurring + invoices and enable to access all 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.png'], + '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..7aa8040a3 --- /dev/null +++ b/sales_contract_and_recurring_invoices/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import 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..31216a1b5 --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import http +from odoo.http import request +from odoo.addons.portal.controllers.portal import CustomerPortal + + +class PortalAccount(CustomerPortal): + """ Super customer portal and get count of contracts """ + def _prepare_home_portal_values(self, counters): + """ Prepares values for the home portal """ + 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): + """ Displays Contracts in portal """ + 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='user', + csrf=False, website=True) + def action_print_report(self, contract_id): + """ Print subscription contract report """ + data = { + 'records': request.env['subscription.contracts'].browse(contract_id) + } + report = request.env.ref( + 'sales_contract_and_recurring_invoices.action_report_subscription_contracts') + pdf = request.env['ir.actions.report'].sudo()._render_qweb_pdf( + 'sales_contract_and_recurring_invoices.action_report_subscription_contracts', + [report.id], data=data)[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..356dbc07b --- /dev/null +++ b/sales_contract_and_recurring_invoices/data/ir_cron_data.xml @@ -0,0 +1,17 @@ + + + + + + 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..a5a846330 --- /dev/null +++ b/sales_contract_and_recurring_invoices/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 27.03.2024 +#### Version 17.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..aac508c97 --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import account_move +from . import sale_order_line +from . import subscription_contract_line +from . import subscription_contracts 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..7911eb0d5 --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import fields, models + + +class AccountMove(models.Model): + """ Inheriting account move model to add id of subscription """ + _inherit = 'account.move' + + contract_origin = fields.Integer(string='Subscription Contract', + help='Reference of Subscription Contract') 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..7cad7f1aa --- /dev/null +++ b/sales_contract_and_recurring_invoices/models/sale_order_line.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import 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..38a358f2f --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import 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='Subscription Contract Reference') + product_id = fields.Many2one('product.product', + string='Products', + help='Products to be added in contract') + currency_id = fields.Many2one(string='Currency', + related='subscription_contract_id.currency_id', + depends=[ + 'subscription_contract_id.currency_id']) + description = fields.Text( + string="Description", compute='_compute_description', store=True, + readonly=False, precompute=True, help='Product description') + qty_ordered = fields.Float(string="Quantity", + digits='Product Unit of Measure', default=1.0, + help='Ordered Quantity') + product_uom_id = fields.Many2one('uom.uom', string='Unit of Measure', + compute='_compute_product_uom', store=True, + help='Unit of measure of product') + price_unit = fields.Float(string="Unit Price", + compute='_compute_price_unit', + digits='Product Price', + store=True, readonly=False, precompute=True, + help='Unit price of product') + tax_ids = fields.Many2many(comodel_name='account.tax', string="Taxes", + context={'active_test': False}, + help='Taxes to be added') + discount = fields.Float(string="Discount (%)", digits='Discount', + store=True, readonly=False, help='Discount in %') + sub_total = fields.Monetary( + string="Total", compute='_compute_amount', store=True, precompute=True, + help='Sub Total Amount') + + @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..dc62e4394 --- /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: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import 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='Name of Contract') + reference = fields.Char(string='Reference', help='Contract reference') + partner_id = fields.Many2one('res.partner', string="Customer", + help='Customer for this contract') + recurring_period = fields.Integer(string='Recurring Period', + help='Recurring period of ' + 'subscription contract') + recurring_period_interval = fields.Selection([ + ('Days', 'Days'), + ('Weeks', 'Weeks'), + ('Months', 'Months'), + ('Years', 'Years'), + ], help='Recurring interval of subscription contract') + contract_reminder = fields.Integer( + string='Contract Expiration Reminder (Days)', + help='Expiry reminder of subscription contract in days.') + recurring_invoice = fields.Integer( + string='Recurring Invoice Interval (Days)', + help='Recurring invoice interval in days') + next_invoice_date = fields.Date(string='Next Invoice Date', store=True, + compute='_compute_next_invoice_date', + help='Date of next invoice') + company_id = fields.Many2one('res.company', string='Company', + default=lambda self: self.env.company) + currency_id = fields.Many2one( + 'res.currency', string='Currency', + required=True, default=lambda self: self.env.company.currency_id) + date_start = fields.Date(string='Start Date', default=fields.Date.today(), + help='Subscription contract start date') + invoice_count = fields.Integer(store=True, + compute='_compute_invoice_count', + string='Invoice count', + help='Number of invoices generated') + 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='Current Subscription id') + lock = fields.Boolean(string='Lock', default=False, + help='Lock subscription contract so that further' + ' modifications are not possible.') + 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', + string='Contract lines', help='Products to be added in the contract') + amount_total = fields.Monetary(string="Total", store=True, + compute='_compute_amount_total', tracking=4, + help='Total amount') + sale_order_line_ids = fields.One2many( + 'sale.order.line', 'contract_id', + string='Sale Order Lines', + help='Order lines of Sale Orders which belongs to this contract') + note = fields.Html(string="Terms and conditions", + help='Add any notes', translate=True) + invoices_active = fields.Boolean( + 'Invoice active', default=False, + compute='_compute_invoice_active', + help='Compute invoices are active or not') + + def action_to_confirm(self): + """ Confirm the Contract """ + self.write({'state': 'Ongoing'}) + + def action_to_cancel(self): + """ Cancel the Contract """ + self.write({'state': 'Cancelled'}) + + def action_generate_invoice(self): + """ 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): + """ Lock subscription contract """ + self.lock = True + + def action_to_unlock(self): + """ Unlock subscription contract """ + self.lock = False + + def action_get_invoice(self): + """ Access generated invoices """ + 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 of Contract """ + 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 the count of invoices generated """ + 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 display 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 of contract """ + 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 of contract lines """ + 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/subscription_contract_reports.xml b/sales_contract_and_recurring_invoices/report/subscription_contract_reports.xml new file mode 100644 index 000000000..5d90b74e9 --- /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_subscription_contracts + sales_contract_and_recurring_invoices.report_subscription_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..c8e76f498 --- /dev/null +++ b/sales_contract_and_recurring_invoices/report/subscription_contract_templates.xml @@ -0,0 +1,186 @@ + + + + + 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..89d9eaec6 --- /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/capture (1).png b/sales_contract_and_recurring_invoices/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/capture (1).png differ 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/img.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/img.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/photo-capture.png b/sales_contract_and_recurring_invoices/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/sales_contract_and_recurring_invoices/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/misc/Cybrosys R.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/email.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/phone.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/star (1) 2.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/support (1) 1.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/support-email.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/tick-mark.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp 1.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp.svg b/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/dynamic_product_fields.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/dynamic_product_fields.png new file mode 100644 index 000000000..1a341f010 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/dynamic_product_fields.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_discount_total.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_discount_total.png new file mode 100644 index 000000000..aba6bdbe6 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_discount_total.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_product_image.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_product_image.png new file mode 100644 index 000000000..2ab801d1d Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_product_image.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_purchase_automated.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_purchase_automated.png new file mode 100644 index 000000000..06221b1ad Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_purchase_automated.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_purchase_previous_product_cost.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_purchase_previous_product_cost.png new file mode 100644 index 000000000..d748d6468 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/sale_purchase_previous_product_cost.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/modules/subscription_package.png b/sales_contract_and_recurring_invoices/static/description/assets/modules/subscription_package.png new file mode 100644 index 000000000..389363b5a Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/modules/subscription_package.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/1.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..412d37efa Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/1.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/10.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..c89fcb43f Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/10.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/11.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..88068b380 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/11.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/12.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..c2a49e402 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/12.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/13.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..7c90c1e2e Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/13.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/14.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..652c5ea10 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/14.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/15.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..c8ee0c40a Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/15.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/16.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..453171955 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/16.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/17.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..03c50c59a Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/17.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/18.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..992be5a89 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/18.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/2.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..dbb92cb44 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/2.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/3.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..69025f06b Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/3.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/4.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..de7054031 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/4.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/5.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..ca9ebad13 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/5.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/6.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..99dc93976 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/6.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/7.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..fcd9625bd Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/7.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/8.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..b2b867308 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/8.png differ diff --git a/sales_contract_and_recurring_invoices/static/description/assets/screenshots/9.png b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..690c353f3 Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/assets/screenshots/9.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..c21333bf2 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.png b/sales_contract_and_recurring_invoices/static/description/banner.png new file mode 100644 index 000000000..d14e1006a Binary files /dev/null and b/sales_contract_and_recurring_invoices/static/description/banner.png 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..a8a2bc187 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..b4697105f --- /dev/null +++ b/sales_contract_and_recurring_invoices/static/description/index.html @@ -0,0 +1,733 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Sales Contract and Recurring Invoices

+

+ Create Sale Contracts and Recurring Invoices. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Access Contracts from Customer Portal.

+

Enables Customers to Access Sales Contracts from Customer Portal. +

+
+
+
+
+
+
+ +
+
+

Recurring Invoices for Contracts.

+

Automatically Generates Recurring Invoices for Subscription Contracts. +

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

+ To Create New Contracts go to Sales -> Configuration -> Contracts.

+
+
+
+
+
+
+ +
+
+

+ Confirm the Contract by Clicking the 'Confirm' Button and add Contract Lines.

+
+
+
+
+
+
+ +
+
+

+ Now the State of the Contract has been moved from 'New' into 'Ongoing'.

+
+
+
+
+
+
+ +
+
+

+ Invoices can be Generated by Clicking the 'Generate Invoice' Button and the Count of + Generated Invoices will be Visible in the Smart tab.

+
+
+
+
+
+
+ +
+
+

+ Able to Lock the Contract by Clicking 'Lock' Button, so Further Modifications will not Possible.

+
+
+
+
+
+
+ +
+
+

+ To Reset the Contract and Modify, Click Unlock Button.

+
+
+
+
+
+
+ +
+
+

+ When the Next Invoice Date of the Contract Reaches the Current Date, the Invoice will be + Automatically Generated.

+
+
+
+
+
+
+ +
+
+

+ All the Created Invoices can be Accessed from Invoices Smart tab.

+
+
+
+
+
+
+ +
+
+

+ When the Contract Reaches the Contract Expiration Reminder Period, it's State Automatically Changes to 'Expire Soon'.

+
+
+
+
+
+
+ +
+
+

+ When the Contract Reaches the Contract End Date, it's State Automatically Changes to 'Expired'.

+
+
+
+
+
+
+ +
+
+

+ Contract can be Cancelled by Clicking 'Cancel' Button.

+
+
+
+
+
+
+ +
+
+

State is Moved into 'Cancelled'.

+
+
+
+
+
+
+ +
+
+

Sale Orders Created for the Partner in Contract for the Corresponding Contract Lines are + Visible Under Sale Order Lines tab.

+
+
+
+
+
+
+ +
+
+

Access Contracts from Customer Portal.

+
+
+
+
+
+
+ +
+
+

Portal User's Contracts will Display here.

+
+
+
+
+
+
+ +
+
+

Clicking on Contract Name will Open the Contract.

+
+
+
+
+
+
+ +
+
+

+ Contract Report can be Downloaded from Portal by Clicking this 'Report' Button.

+
+
+
+
+
+
+ +
+
+

+ Downloaded pdf Report of Contract.

+
+
+
+
+
+
+
    +
  • + Access Sale Contracts from Portal. +
  • +
  • + Download the Contract Subscription Report. +
  • +
  • + Automatically Generate Recurring Invoices. +
  • +
  • + Automatically Changes the State of Invoices based on Contract Period. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:26th April 2024 +
+

+ Initial Commit for Sales Contract and Recurring Invoices.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + 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..d45df899a --- /dev/null +++ b/sales_contract_and_recurring_invoices/views/account_move_views.xml @@ -0,0 +1,14 @@ + + + + + account.move.view.form.inherit.sales.contract.and.recurring.invoices + 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..7dfe68b20 --- /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..23165265e --- /dev/null +++ b/sales_contract_and_recurring_invoices/views/subscription_contracts_views.xml @@ -0,0 +1,170 @@ + + + + + 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 + + + + + + + + + + + + + +