@ -0,0 +1,51 @@ | 
				
			|||
.. image:: https://img.shields.io/badge/licenses-AGPL--3-blue.svg | 
				
			|||
    :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html | 
				
			|||
    :alt: License: AGPL-3 | 
				
			|||
 | 
				
			|||
Due Date Reminder for Invoicing and Sales | 
				
			|||
========================================= | 
				
			|||
This module will help you to send reminder mail for all the partners with due on sale order and invoicing. | 
				
			|||
 | 
				
			|||
Configuration | 
				
			|||
============= | 
				
			|||
* Set Sale Reminder and also set due days gap to send mail | 
				
			|||
* Set Invoice Reminder and also set due days gap to send mail | 
				
			|||
 | 
				
			|||
Company | 
				
			|||
------- | 
				
			|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
License | 
				
			|||
------- | 
				
			|||
Affero General Public License v3.0 (AGPL v3) | 
				
			|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) | 
				
			|||
 | 
				
			|||
Credits | 
				
			|||
------- | 
				
			|||
Developer : | 
				
			|||
(V16) Amaya Aravind, | 
				
			|||
(V17) Anjhana A k, | 
				
			|||
(V18) Manasa T 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 `Our Website <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
Further information | 
				
			|||
=================== | 
				
			|||
HTML Description: `<static/description/index.html>`__ | 
				
			|||
@ -0,0 +1,22 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################### | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Manasa T P (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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################### | 
				
			|||
from . import models | 
				
			|||
@ -0,0 +1,48 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################### | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Manasa T P (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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################### | 
				
			|||
{ | 
				
			|||
    'name': 'Due Date Reminder for Invoicing and Sales', | 
				
			|||
    'version': '18.0.1.0.0', | 
				
			|||
    'category': 'Sales,Accounting', | 
				
			|||
    'summary': """Send reminder mail for all the partners with due on sale | 
				
			|||
    order and invoicing.""", | 
				
			|||
    'description': """This module crafted by Cybrosys Technologies provides an | 
				
			|||
    option to send reminder mail for all the partners with due on sale order | 
				
			|||
    and invoicing.By using scheduled  action, it will send reminder mail in | 
				
			|||
    the exact time.""", | 
				
			|||
    'author': 'Cybrosys Techno Solutions', | 
				
			|||
    'company': 'Cybrosys Techno Solutions', | 
				
			|||
    'maintainer': 'Cybrosys Techno Solutions', | 
				
			|||
    'website': "https://www.cybrosys.com", | 
				
			|||
    'depends': ['base', 'sale_management', 'account'], | 
				
			|||
    'data': [ | 
				
			|||
        'data/ir_cron_data.xml', | 
				
			|||
        'data/mail_template_data.xml', | 
				
			|||
        'views/sale_order_views.xml', | 
				
			|||
        'views/res_config_settings_views.xml', | 
				
			|||
    ], | 
				
			|||
    'images': ['static/description/banner.jpg'], | 
				
			|||
    'license': 'AGPL-3', | 
				
			|||
    'installable': True, | 
				
			|||
    'auto_install': False, | 
				
			|||
    'application': False, | 
				
			|||
} | 
				
			|||
@ -0,0 +1,25 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
<!--    Scheduled action for sale order due date reminder--> | 
				
			|||
    <data noupdate="1"> | 
				
			|||
        <record id="ir_cron_scheduler_recurring_action_due_sale_order" model="ir.cron"> | 
				
			|||
            <field name="name">Sale Order: Due Reminder Email</field> | 
				
			|||
            <field name="model_id" ref="model_sale_order"/> | 
				
			|||
            <field name="state">code</field> | 
				
			|||
            <field name="code">model.action_send_mail_sale_order()</field> | 
				
			|||
            <field name="user_id" ref="base.user_root"/> | 
				
			|||
            <field name="interval_number">1</field> | 
				
			|||
            <field name="interval_type">days</field> | 
				
			|||
        </record> | 
				
			|||
<!--        Scheduled action for invoice due date reminder--> | 
				
			|||
        <record id="ir_cron_scheduler_recurring_action_due_invoice" model="ir.cron"> | 
				
			|||
            <field name="name">Invoice: Due Reminder Email</field> | 
				
			|||
            <field name="model_id" ref="model_account_move"/> | 
				
			|||
            <field name="state">code</field> | 
				
			|||
            <field name="code">model.action_send_mail_invoice()</field> | 
				
			|||
            <field name="user_id" ref="base.user_root"/> | 
				
			|||
            <field name="interval_number">1</field> | 
				
			|||
            <field name="interval_type">days</field> | 
				
			|||
        </record> | 
				
			|||
    </data> | 
				
			|||
</odoo> | 
				
			|||
@ -0,0 +1,66 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
<!--    Template for sale order due reminder--> | 
				
			|||
    <data> | 
				
			|||
        <record id="sale_order_due_mail_template" model="mail.template"> | 
				
			|||
            <field name="name">Sale Order: Due Reminder Email</field> | 
				
			|||
            <field name="model_id" ref="model_sale_order"/> | 
				
			|||
            <field name="email_from">{{ object.company_id.partner_id.email }}</field> | 
				
			|||
            <field name="email_to">{{ object.partner_id.email }}</field> | 
				
			|||
            <field name="subject">Reminder for {{ object.name }} Expiration</field> | 
				
			|||
            <field name="body_html" type="html"> | 
				
			|||
                <div style="margin: 0px; padding: 0px;"> | 
				
			|||
                    <p style="margin: 0px; padding: 0px; font-size: 13px;"> | 
				
			|||
                        <h4><b>Dear <t t-out="object.partner_id.name"/>,</b></h4> | 
				
			|||
                        <br/> | 
				
			|||
                        Sale Order - <b><t t-out="object.name"/></b> is going to expire. | 
				
			|||
                        The due date is on <b><t t-out="object.due_date_order"/></b>. | 
				
			|||
                        <br/> | 
				
			|||
                        Please take necessary actions. | 
				
			|||
                        <br/> | 
				
			|||
                        <br/> | 
				
			|||
                        <b>More details of Order <t t-out="object.name"/></b> :<br/> | 
				
			|||
                        Order Name : <t t-out="object.name"/><br/> | 
				
			|||
                        Created Date : <t t-out="object.date_order"/><br/> | 
				
			|||
                        Sales Person : <t t-out="object.user_id.partner_id.name"/><br/> | 
				
			|||
                        Partner Name :  <t t-out="object.partner_id.name"/><br/> | 
				
			|||
                        Total Order Amount : <t t-out="format_amount(object.amount_total, object.currency_id) or ''"/><br/> | 
				
			|||
                        <br/> | 
				
			|||
                    </p> | 
				
			|||
                </div> | 
				
			|||
            </field> | 
				
			|||
        </record> | 
				
			|||
<!--        Template for invoice due reminder--> | 
				
			|||
         <record id="invoice_due_mail_template" model="mail.template"> | 
				
			|||
            <field name="name">Invoice: Due Reminder Email</field> | 
				
			|||
            <field name="model_id" ref="model_account_move"/> | 
				
			|||
            <field name="email_from">{{ object.company_id.partner_id.email }}</field> | 
				
			|||
            <field name="email_to">{{ object.partner_id.email }}</field> | 
				
			|||
            <field name="subject">Reminder for {{ object.name }} Expiration</field> | 
				
			|||
            <field name="body_html" type="html"> | 
				
			|||
                <div style="margin: 0px; padding: 0px;"> | 
				
			|||
                    <p style="margin: 0px; padding: 0px; font-size: 13px;"> | 
				
			|||
                        <h4><b>Dear <t t-out="object.partner_id.name"/>,</b></h4> | 
				
			|||
                        <br/> | 
				
			|||
                        Invoice - <b><t t-out="object.name"/></b> is going to expire. | 
				
			|||
                        The due date is on <b><t t-out="object.invoice_date_due"/></b>. | 
				
			|||
                        <br/> | 
				
			|||
                        Please take necessary actions. | 
				
			|||
                        <br/> | 
				
			|||
                        <br/> | 
				
			|||
                        <b>More details of Invoice <t t-out="object.name"/></b> :<br/> | 
				
			|||
                        Invoice Name : <t t-out="object.name"/><br/> | 
				
			|||
                        Created Date : <t t-out="object.invoice_date"/><br/> | 
				
			|||
                        Sales Person : <t t-out="object.user_id.partner_id.name"/><br/> | 
				
			|||
                        Partner Name :  <t t-out="object.partner_id.name"/><br/> | 
				
			|||
                        Total Order Amount : <t t-out="format_amount(object.amount_paid, object.currency_id) or ''"/><br/> | 
				
			|||
                        Amount Paid : <t t-out="format_amount(object.amount_paid, object.currency_id) or ''"/><br/> | 
				
			|||
                        Amount Due : <t t-out="format_amount(object.amount_residual, object.currency_id) or ''"/><br/> | 
				
			|||
 | 
				
			|||
                        <br/> | 
				
			|||
                    </p> | 
				
			|||
                </div> | 
				
			|||
            </field> | 
				
			|||
        </record> | 
				
			|||
    </data> | 
				
			|||
</odoo> | 
				
			|||
@ -0,0 +1,5 @@ | 
				
			|||
## Module <sale_invoice_due_date_reminder> | 
				
			|||
#### 17.10.2024 | 
				
			|||
#### Version 18.0.1.0.0 | 
				
			|||
#### ADD | 
				
			|||
- Initial Commit for Due Date Reminder for Invoicing and Sales. | 
				
			|||
@ -0,0 +1,24 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################### | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Manasa T P (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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################### | 
				
			|||
from . import account_move | 
				
			|||
from . import res_config_settings | 
				
			|||
from . import sale_order | 
				
			|||
@ -0,0 +1,55 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################### | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Manasa T P (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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################### | 
				
			|||
from datetime import timedelta | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class AccountMove(models.Model): | 
				
			|||
    """Class for the inherited model account. move""" | 
				
			|||
    _inherit = 'account.move' | 
				
			|||
 | 
				
			|||
    def action_send_mail_invoice(self): | 
				
			|||
        """Function for sending mail by checking date in settings. """ | 
				
			|||
        values = self.env['res.config.settings'].default_get( | 
				
			|||
            list(self.env['res.config.settings'].fields_get())) | 
				
			|||
        if values['reminder_invoicing'] is not False: | 
				
			|||
            for record in self.search([]): | 
				
			|||
                if (record.invoice_date_due and | 
				
			|||
                        record.move_type == 'out_invoice'): | 
				
			|||
                    if record.state == 'draft': | 
				
			|||
                        if (record.invoice_date_due == timedelta(int( | 
				
			|||
                                values['set_date_invoicing'])) + | 
				
			|||
                                fields.Date.today()): | 
				
			|||
                            mail_template = self.env.ref( | 
				
			|||
                                'sale_invoice_due_date_reminder.invoice_due' | 
				
			|||
                                '_mail_template') | 
				
			|||
                            mail_template.send_mail(record.id, force_send=True) | 
				
			|||
                    elif (record.state == 'posted' and | 
				
			|||
                          record.payment_state != 'paid' and | 
				
			|||
                          record.invoice_date_due == timedelta( | 
				
			|||
                            int(values[ | 
				
			|||
                                    'set_date_invoicing'])) + | 
				
			|||
                          fields.Date.today()): | 
				
			|||
                        mail_template = self.env.ref( | 
				
			|||
                            'sale_invoice_due_date_reminder.invoice_due_mail_' | 
				
			|||
                            'template') | 
				
			|||
                        m = mail_template.send_mail(record.id, force_send=True) | 
				
			|||
@ -0,0 +1,46 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################### | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Manasa T P (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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################### | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class ResConfigSettings(models.TransientModel): | 
				
			|||
    """Class for the inherited transient model res.config.settings.""" | 
				
			|||
    _inherit = 'res.config.settings' | 
				
			|||
 | 
				
			|||
    reminder_sales = fields.Boolean( | 
				
			|||
        string='Reminder for Sales', | 
				
			|||
        help='Enable this field to get reminder of due in Sale Order.', | 
				
			|||
        config_parameter='sale_invoice_due_date_reminder.reminder_sale') | 
				
			|||
    set_date_sales = fields.Integer( | 
				
			|||
        string='Set Days', | 
				
			|||
        help='Reminder will send according to this number of days set in this ' | 
				
			|||
             'field.', | 
				
			|||
        config_parameter='sale_invoice_due_date_reminder.set_date_sales') | 
				
			|||
    reminder_invoicing = fields.Boolean( | 
				
			|||
        string='Reminder for Invoicing', | 
				
			|||
        help='Enable this field to get reminder of due in Invoicing.', | 
				
			|||
        config_parameter='sale_invoice_due_date_reminder.reminder_invoicing') | 
				
			|||
    set_date_invoicing = fields.Integer( | 
				
			|||
        string='Set Days', | 
				
			|||
        help='Reminder will send according to this number of days set in this ' | 
				
			|||
        'field.', | 
				
			|||
        config_parameter='sale_invoice_due_date_reminder.set_date_invoicing') | 
				
			|||
@ -0,0 +1,77 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################### | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Manasa T P (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 <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################### | 
				
			|||
from datetime import timedelta | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class SaleOrder(models.Model): | 
				
			|||
    """Class for inherited model sale order.""" | 
				
			|||
    _inherit = 'sale.order' | 
				
			|||
 | 
				
			|||
    due_date_order = fields.Date(string="Due Date", | 
				
			|||
                                 help='Set a due date for the Order') | 
				
			|||
 | 
				
			|||
    def action_send_mail_sale_order(self): | 
				
			|||
        """Function for sending mail by checking date in settings. """ | 
				
			|||
        values = self.env['res.config.settings'].default_get( | 
				
			|||
            list(self.env['res.config.settings'].fields_get())) | 
				
			|||
        if values['reminder_sales'] is not False: | 
				
			|||
            for record in self.search([]): | 
				
			|||
                if (record.due_date_order and | 
				
			|||
                        record.invoice_status != 'invoiced'): | 
				
			|||
                    if (record.invoice_status == 'upselling' or | 
				
			|||
                            record.invoice_status == 'to invoice'): | 
				
			|||
                        if (record.due_date_order == timedelta(int( | 
				
			|||
                                values['set_date_sales'])) + | 
				
			|||
                                fields.Date.today()): | 
				
			|||
                            mail_template = self.env.ref( | 
				
			|||
                                'sale_invoice_due_date_reminder.sale_order_due' | 
				
			|||
                                '_mail_template') | 
				
			|||
                            mail_template.send_mail(record.id, | 
				
			|||
                                                    force_send=True) | 
				
			|||
                    elif record.invoice_status == 'no': | 
				
			|||
                        if record.invoice_count == 0: | 
				
			|||
                            if (record.due_date_order == timedelta( | 
				
			|||
                                    int(values[ | 
				
			|||
                                            'set_date_sales'])) + | 
				
			|||
                                    fields.Date.today()): | 
				
			|||
                                mail_template = self.env.ref( | 
				
			|||
                                    'sale_invoice_due_date_reminder.sale_order' | 
				
			|||
                                    '_due_mail_template') | 
				
			|||
                                mail_template.send_mail(record.id, | 
				
			|||
                                                        force_send=True) | 
				
			|||
                        else: | 
				
			|||
                            payment_list = record.invoice_ids.mapped( | 
				
			|||
                                'payment_state') | 
				
			|||
                            if ( | 
				
			|||
                                    'not_paid' or 'in_payment' or | 
				
			|||
                                    'partial' or 'reversed' or | 
				
			|||
                                    'invoicing_legacy') in payment_list: | 
				
			|||
                                if (record.due_date_order == timedelta( | 
				
			|||
                                        int(values[ | 
				
			|||
                                                'set_date_sales'])) + | 
				
			|||
                                        fields.Date.today()): | 
				
			|||
                                    mail_template = self.env.ref( | 
				
			|||
                                        'sale_invoice_due_date_reminder.sale_' | 
				
			|||
                                        'order_due_mail_template') | 
				
			|||
                                    mail_template.send_mail(record.id, | 
				
			|||
                                                            force_send=True) | 
				
			|||
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 28 KiB  | 
| 
		 After Width: | Height: | Size: 628 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 210 KiB  | 
| 
		 After Width: | Height: | Size: 209 KiB  | 
| 
		 After Width: | Height: | Size: 109 KiB  | 
| 
		 After Width: | Height: | Size: 495 B  | 
| 
		 After Width: | Height: | Size: 1.0 KiB  | 
| 
		 After Width: | Height: | Size: 624 B  | 
| 
		 After Width: | Height: | Size: 136 KiB  | 
| 
		 After Width: | Height: | Size: 214 KiB  | 
| 
		 After Width: | Height: | Size: 36 KiB  | 
| 
		 After Width: | Height: | Size: 3.6 KiB  | 
| 
		 After Width: | Height: | Size: 310 B  | 
| 
		 After Width: | Height: | Size: 929 B  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 3.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 17 KiB  | 
| 
		 After Width: | Height: | Size: 542 B  | 
| 
		 After Width: | Height: | Size: 576 B  | 
| 
		 After Width: | Height: | Size: 733 B  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 4.0 KiB  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 738 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 911 B  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 600 B  | 
| 
		 After Width: | Height: | Size: 673 B  | 
| 
		 After Width: | Height: | Size: 2.0 KiB  | 
| 
		 After Width: | Height: | Size: 462 B  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 926 B  | 
| 
		 After Width: | Height: | Size: 9.0 KiB  | 
| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
		 After Width: | Height: | Size: 7.0 KiB  | 
| 
		 After Width: | Height: | Size: 878 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 653 B  | 
| 
		 After Width: | Height: | Size: 800 B  | 
| 
		 After Width: | Height: | Size: 905 B  | 
| 
		 After Width: | Height: | Size: 189 KiB  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 839 B  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 5.9 KiB  | 
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
| 
		 After Width: | Height: | Size: 34 KiB  | 
| 
		 After Width: | Height: | Size: 26 KiB  | 
| 
		 After Width: | Height: | Size: 3.8 KiB  | 
| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
		 After Width: | Height: | Size: 1.9 KiB  | 
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
| 
		 After Width: | Height: | Size: 427 B  | 
| 
		 After Width: | Height: | Size: 627 B  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 988 B  | 
| 
		 After Width: | Height: | Size: 3.7 KiB  | 
| 
		 After Width: | Height: | Size: 5.0 KiB  | 
| 
		 After Width: | Height: | Size: 875 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 912 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 MiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 44 KiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 85 KiB  | 
| 
		 After Width: | Height: | Size: 71 KiB  | 
| 
		 After Width: | Height: | Size: 88 KiB  | 
| 
		 After Width: | Height: | Size: 37 KiB  | 
| 
		 After Width: | Height: | Size: 85 KiB  | 
| 
		 After Width: | Height: | Size: 69 KiB  | 
| 
		 After Width: | Height: | Size: 41 KiB  | 
| 
		 After Width: | Height: | Size: 146 KiB  | 
| 
		 After Width: | Height: | Size: 880 KiB  | 
| 
		 After Width: | Height: | Size: 759 KiB  | 
| 
		 After Width: | Height: | Size: 50 KiB  | 
@ -0,0 +1,74 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
<!--    Inherited form view of res config settings of sales inorder to add new | 
				
			|||
        fields for sale due date reminder--> | 
				
			|||
    <record id="res_config_settings_view_form_sale" model="ir.ui.view"> | 
				
			|||
        <field name="name">res.config.settings.view.form.inherit.sale.invoice.due.date.reminder</field> | 
				
			|||
        <field name="model">res.config.settings</field> | 
				
			|||
        <field name="inherit_id" ref="sale.res_config_settings_view_form"/> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <xpath expr="//block[@name='invoicing_setting_container']" | 
				
			|||
                   position="after"> | 
				
			|||
                <h2>Order Due Reminder</h2> | 
				
			|||
                <div class="row mt16 o_settings_container" | 
				
			|||
                     name="sale_order_due_reminder_container"> | 
				
			|||
                    <div class="col-12 col-lg-6 o_setting_box" | 
				
			|||
                         id="order_due_reminder"> | 
				
			|||
                        <div class="o_setting_left_pane"> | 
				
			|||
                            <field name="reminder_sales"/> | 
				
			|||
                        </div> | 
				
			|||
                        <div class="o_setting_right_pane"> | 
				
			|||
                            <label for="reminder_sales"/> | 
				
			|||
                            <div class="text-muted"> | 
				
			|||
                                Enable this to get reminder of due in Sale | 
				
			|||
                                Order. | 
				
			|||
                            </div> | 
				
			|||
                            <div class="row mt16" | 
				
			|||
                                 invisible="reminder_sales == False"> | 
				
			|||
                                <label for="set_date_sales" | 
				
			|||
                                       class="col-lg-4 o_light_label"/> | 
				
			|||
                                <field name="set_date_sales" | 
				
			|||
                                       class="oe_inline"/> | 
				
			|||
                            </div> | 
				
			|||
                        </div> | 
				
			|||
                    </div> | 
				
			|||
                </div> | 
				
			|||
            </xpath> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
<!--    Inherited form view of res config settings of invoice, inorder to add | 
				
			|||
        new fields for invoice due date reminder--> | 
				
			|||
    <record id="res_config_settings_view_form" model="ir.ui.view"> | 
				
			|||
        <field name="name">res.config.settings.view.form.inherit.sale.invoice.due.date.reminder</field> | 
				
			|||
        <field name="model">res.config.settings</field> | 
				
			|||
        <field name="inherit_id" ref="account.res_config_settings_view_form"/> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <xpath expr="//block[@id='invoicing_settings']" position="after"> | 
				
			|||
                <h2>Invoice Due Reminder</h2> | 
				
			|||
                <div class="row mt16 o_settings_container" | 
				
			|||
                     name="invoice_due_reminder_container"> | 
				
			|||
                    <div class="col-12 col-lg-6 o_setting_box" | 
				
			|||
                         id="invoice_due_reminder"> | 
				
			|||
                        <div class="o_setting_left_pane"> | 
				
			|||
                            <field name="reminder_invoicing"/> | 
				
			|||
                        </div> | 
				
			|||
                        <div class="o_setting_right_pane"> | 
				
			|||
                            <label for="reminder_invoicing"/> | 
				
			|||
                            <div class="text-muted"> | 
				
			|||
                                Enable this to get reminder of due in Sale | 
				
			|||
                                Order. | 
				
			|||
                            </div> | 
				
			|||
                            <div class="row mt16" | 
				
			|||
                                 invisible="reminder_invoicing == False"> | 
				
			|||
                                <label for="set_date_invoicing" | 
				
			|||
                                       class="col-lg-4 o_light_label"/> | 
				
			|||
                                <field name="set_date_invoicing" | 
				
			|||
                                       class="oe_inline"/> | 
				
			|||
                            </div> | 
				
			|||
                        </div> | 
				
			|||
                    </div> | 
				
			|||
                </div> | 
				
			|||
            </xpath> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
</odoo> | 
				
			|||
@ -0,0 +1,14 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
<!--    Inherited form view of sale order to add a new field for due date--> | 
				
			|||
    <record id="view_order_form" model="ir.ui.view"> | 
				
			|||
        <field name="name">sale.order.view.form.inherit.sale.invoice.due.date.reminder</field> | 
				
			|||
        <field name="model">sale.order</field> | 
				
			|||
        <field name="inherit_id" ref="sale.view_order_form"/> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <xpath expr="//field[@name='date_order']" position="after"> | 
				
			|||
                <field name="due_date_order" string="Due Date"/> | 
				
			|||
            </xpath> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
</odoo> | 
				
			|||