Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
{
'name': 'Disable Publisher Warranty',
'version': '19.0.1.0.0',
'category': 'Tools',
'summary': 'Disables all communication with Odoo publisher warranty servers',
'description': """
This module completely disables:
- Publisher warranty server communication
- Subscription expiration checks
- Automatic license updates
For local development use only.
""",
'author': 'Development',
'depends': ['mail'],
'data': [],
'installable': True,
'auto_install': True,
'license': 'LGPL-3',
}

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import publisher_warranty

View File

@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
# Disable all publisher warranty / subscription checks for local development
import logging
from odoo import api, models
_logger = logging.getLogger(__name__)
class PublisherWarrantyContractDisabled(models.AbstractModel):
_inherit = "publisher_warranty.contract"
@api.model
def _get_sys_logs(self):
"""
DISABLED: Do not contact Odoo servers.
Returns fake successful response.
"""
_logger.info("Publisher warranty check DISABLED - not contacting Odoo servers")
return {
"messages": [],
"enterprise_info": {
"expiration_date": "2099-12-31 23:59:59",
"expiration_reason": "renewal",
"enterprise_code": self.env['ir.config_parameter'].sudo().get_param('database.enterprise_code', ''),
}
}
def update_notification(self, cron_mode=True):
"""
DISABLED: Do not send any data to Odoo servers.
Just update local parameters with permanent values.
"""
_logger.info("Publisher warranty update_notification DISABLED - no server contact")
# Set permanent valid subscription parameters
set_param = self.env['ir.config_parameter'].sudo().set_param
set_param('database.expiration_date', '2099-12-31 23:59:59')
set_param('database.expiration_reason', 'renewal')
# Clear any "already linked" parameters
set_param('database.already_linked_subscription_url', False)
set_param('database.already_linked_email', False)
set_param('database.already_linked_send_mail_url', False)
return True