|
|
@ -25,3 +25,4 @@ class ResUsers(models.Model):
|
|||
def get_res_users_id(self):
|
||||
for rec in self:
|
||||
rec.res_users_id = rec.id
|
||||
|
||||
|
|
@ -80,14 +80,16 @@ class RejectButton(models.Model):
|
|||
class MailThread(models.AbstractModel):
|
||||
_inherit = 'mail.thread'
|
||||
|
||||
reason = fields.Text(string='Reason/Justification')
|
||||
reason = fields.Text(string='Reason/Justification',
|
||||
tracking=True
|
||||
)
|
||||
|
||||
def action_reject_workflow(self):
|
||||
return {
|
||||
'name': _('Reject'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'reject.wizard',
|
||||
'res_model': 'all.reject.wizard',
|
||||
'target': 'new',
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_reject_workflow_manager,reject_workflow_manager,model_reject_workflow,reject_group_manager,1,1,1,1
|
||||
access_all_reject_wizard_manager,all_reject_wizard_manager,model_all_reject_wizard,reject_group_manager,1,1,1,1
|
||||
access_reject_button,reject_button,model_reject_button,base.group_user,1,1,1,1
|
||||
access_reject_workflow,reject_workflow,model_reject_workflow,base.group_user,1,0,0,0
|
||||
access_reject_button_wizard_manager,reject_button_wizard_manager,model_reject_button_wizard,reject_group_manager,1,1,1,1
|
||||
|
|
|
|||
|
|
|
@ -3,12 +3,13 @@ from odoo import models, fields
|
|||
|
||||
|
||||
class RejectWizard(models.TransientModel):
|
||||
_name = 'reject.wizard'
|
||||
_description = 'Reject Wizard'
|
||||
_name = 'all.reject.wizard'
|
||||
_description = 'All Reject Wizard'
|
||||
|
||||
reason = fields.Text(string='Reason/Justification')
|
||||
|
||||
def button_confirm(self):
|
||||
print("*************RejectWizard*******************button_confirm**************")
|
||||
context = dict(self._context)
|
||||
active_model = context.get('active_model')
|
||||
active_id = context.get('active_id')
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<record id="reject_wizard_view" model="ir.ui.view">
|
||||
<field name="name">reject.wizard.view</field>
|
||||
<field name="model">reject.wizard</field>
|
||||
<field name="name">all.reject.wizard.view</field>
|
||||
<field name="model">all.reject.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reject Wizard">
|
||||
<group>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/../../../../../../../:\Users\Adnan Usmani\Downloads\Compressed\inbox_notif_email\.idea/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_CONFIGURATION" value="Web2Py" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="pyparsing" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/inbox_notif_email.iml" filepath="$PROJECT_DIR$/.idea/inbox_notif_email.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "inbox_notif_email",
|
||||
|
||||
'summary': """
|
||||
odoo notification and email notification both""",
|
||||
|
||||
'description': """
|
||||
It will add one more option to send notification via email and odoo notification both
|
||||
""",
|
||||
|
||||
'author': "odoozone",
|
||||
'website': 'http://odoozone.com/',
|
||||
|
||||
# Categories can be used to filter modules in modules listing
|
||||
# Check https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/ir_module_category_data.xml
|
||||
# for the full list
|
||||
'category': 'Discuss',
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
'depends': ['mail'],
|
||||
'license': 'LGPL-3',
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
# 'security/ir.model.access.csv',
|
||||
'views/views.xml',
|
||||
'views/templates.xml',
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
'demo': [
|
||||
'demo/demo.xml',],
|
||||
|
||||
'images': [
|
||||
'static/description/banner.PNG',
|
||||
'static/description/icon.png',
|
||||
'static/description/image1.png',
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# from odoo import http
|
||||
|
||||
|
||||
# class InboxNotifEmail(http.Controller):
|
||||
# @http.route('/inbox_notif_email/inbox_notif_email/', auth='public')
|
||||
# def index(self, **kw):
|
||||
# return "Hello, world"
|
||||
|
||||
# @http.route('/inbox_notif_email/inbox_notif_email/objects/', auth='public')
|
||||
# def list(self, **kw):
|
||||
# return http.request.render('inbox_notif_email.listing', {
|
||||
# 'root': '/inbox_notif_email/inbox_notif_email',
|
||||
# 'objects': http.request.env['inbox_notif_email.inbox_notif_email'].search([]),
|
||||
# })
|
||||
|
||||
# @http.route('/inbox_notif_email/inbox_notif_email/objects/<model("inbox_notif_email.inbox_notif_email"):obj>/', auth='public')
|
||||
# def object(self, obj, **kw):
|
||||
# return http.request.render('inbox_notif_email.object', {
|
||||
# 'object': obj
|
||||
# })
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<record id="object0" model="inbox_notif_email.inbox_notif_email">
|
||||
<field name="name">Object 0</field>
|
||||
<field name="value">0</field>
|
||||
</record>
|
||||
|
||||
<record id="object1" model="inbox_notif_email.inbox_notif_email">
|
||||
<field name="name">Object 1</field>
|
||||
<field name="value">10</field>
|
||||
</record>
|
||||
|
||||
<record id="object2" model="inbox_notif_email.inbox_notif_email">
|
||||
<field name="name">Object 2</field>
|
||||
<field name="value">20</field>
|
||||
</record>
|
||||
|
||||
<record id="object3" model="inbox_notif_email.inbox_notif_email">
|
||||
<field name="name">Object 3</field>
|
||||
<field name="value">30</field>
|
||||
</record>
|
||||
|
||||
<record id="object4" model="inbox_notif_email.inbox_notif_email">
|
||||
<field name="name">Object 4</field>
|
||||
<field name="value">40</field>
|
||||
</record>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_inbox_notif_email_inbox_notif_email,inbox_notif_email.inbox_notif_email,model_inbox_notif_email_inbox_notif_email,base.group_user,1,1,1,1
|
||||
|
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
|
@ -0,0 +1,93 @@
|
|||
<section class="oe_container lead mt64">
|
||||
<div>
|
||||
<div class="col-md-12 mt16" style="padding:0;">
|
||||
<div class="col-md-12" style="padding:0;">
|
||||
<div class="panel-group mb0 mt0" role="tablist" id="priceAccordeon" style="padding:0;">
|
||||
<div class="panel-heading mb0 mt0 collapsed" role="tab" data-toggle="collapse" data-parent="#priceAccordeon" data-target="#priceAccordeon_area" aria-expanded="false" style="margin-left:0;padding:0 0 2px 0;text-align:right;">
|
||||
<strong>
|
||||
<div style="background-color:#875A7B;color:white;padding:5px;margin-bottom:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
|
||||
<strong style="color:white;">
|
||||
Supported :
|
||||
</strong>
|
||||
</div>
|
||||
<div style="background-color:#875A7B;color:white;padding:5px;margin-bottom:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
|
||||
<strong style="color:white;" title="The tool is compatible with the Odoo Enterprise version">
|
||||
<i class="fa fa-check" style="margin-left:4px;"> </i>
|
||||
Enterprise
|
||||
</strong>
|
||||
</div>
|
||||
<div style="background-color:#875A7B;padding:5px;margin-top:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
|
||||
<strong style="color:white;" title="The tool is compatible with the Odoo Community version">
|
||||
<i class="fa fa-check" style="margin-left:4px;"> </i>
|
||||
Community
|
||||
</strong>
|
||||
</div>
|
||||
<div style="background-color:#875A7B;color:white;padding:5px;margin-bottom:3px;text-align:center;border-radius:5px;white-space:nowrap;display: inline-block;">
|
||||
<strong style="color:white;" title="The tool might be installed to Odoo.sh if you have a linked private git repository">
|
||||
<i class="fa fa-check" style="margin-left:4px;"> </i>
|
||||
Odoo.sh
|
||||
</strong>
|
||||
</div>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container lead bi_title_box">
|
||||
<div >
|
||||
<div >
|
||||
<h2 class="oe_slogan bi_title" style="color:#5082c4;">
|
||||
<b> odoo notification and email notification both</b>
|
||||
</h2>
|
||||
<p class="oe_slogan">
|
||||
The Problem
|
||||
By default, Odoo provides two options for Notification Management:
|
||||
|
||||
Handle by Emails: notifications are sent to the users' email. This is the default option for new user creation <br>
|
||||
Handle in Odoo: notifications appear in the users' Odoo Inbox but no email sent to the users<br>
|
||||
This module does the following<br>
|
||||
Handle by both now offers both inbox and email notifications
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container lead bi_features">
|
||||
<div >
|
||||
|
||||
<div class="row">
|
||||
<div class="col" style="margin: 10px;">
|
||||
<div class="row">
|
||||
|
||||
<div>
|
||||
<h4><b> Handle by both</b></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col" style="margin: 10px;">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<img class="img img-responsive" style="max-width:100%;" src="image1.png"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="oe_container lead">
|
||||
<div>
|
||||
Please contact mdadnanusmani@gmail.com for any query
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<template id="listing">
|
||||
<ul>
|
||||
<li t-foreach="objects" t-as="object">
|
||||
<a t-attf-href="#{ root }/objects/#{ object.id }">
|
||||
<t t-esc="object.display_name"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<template id="object">
|
||||
<h1><t t-esc="object.display_name"/></h1>
|
||||
<dl>
|
||||
<t t-foreach="object._fields" t-as="field">
|
||||
<dt><t t-esc="field"/></dt>
|
||||
<dd><t t-esc="object[field]"/></dd>
|
||||
</t>
|
||||
</dl>
|
||||
</template>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<!-- explicit list view definition -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="inbox_notif_email.list">
|
||||
<field name="name">inbox_notif_email list</field>
|
||||
<field name="model">inbox_notif_email.inbox_notif_email</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- actions opening views on models -->
|
||||
<!--
|
||||
<record model="ir.actions.act_window" id="inbox_notif_email.action_window">
|
||||
<field name="name">inbox_notif_email window</field>
|
||||
<field name="res_model">inbox_notif_email.inbox_notif_email</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- server action to the one above -->
|
||||
<!--
|
||||
<record model="ir.actions.server" id="inbox_notif_email.action_server">
|
||||
<field name="name">inbox_notif_email server</field>
|
||||
<field name="model_id" ref="model_inbox_notif_email_inbox_notif_email"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
action = {
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "tree,form",
|
||||
"res_model": model._name,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- Top menu item -->
|
||||
<!--
|
||||
<menuitem name="inbox_notif_email" id="inbox_notif_email.menu_root"/>
|
||||
-->
|
||||
<!-- menu categories -->
|
||||
<!--
|
||||
<menuitem name="Menu 1" id="inbox_notif_email.menu_1" parent="inbox_notif_email.menu_root"/>
|
||||
<menuitem name="Menu 2" id="inbox_notif_email.menu_2" parent="inbox_notif_email.menu_root"/>
|
||||
-->
|
||||
<!-- actions -->
|
||||
<!--
|
||||
<menuitem name="List" id="inbox_notif_email.menu_1_list" parent="inbox_notif_email.menu_1"
|
||||
action="inbox_notif_email.action_window"/>
|
||||
<menuitem name="Server to list" id="inbox_notif_email" parent="inbox_notif_email.menu_2"
|
||||
action="inbox_notif_email.action_server"/>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -11,9 +11,9 @@ class BaseModuleUninstall(models.TransientModel):
|
|||
is_restrict = fields.Boolean()
|
||||
password = fields.Char(required=True)
|
||||
|
||||
def action_uninstall(self):
|
||||
if not tools.config.get('uninstall_password'):
|
||||
raise ValidationError("Uninstall password not yet set!")
|
||||
if self.password != tools.config.get('uninstall_password').replace('\'', ''):
|
||||
raise ValidationError("Invalid Password!")
|
||||
return super(BaseModuleUninstall, self).action_uninstall()
|
||||
# def action_uninstall(self):
|
||||
# if not tools.config.get('uninstall_password'):
|
||||
# raise ValidationError("Uninstall password not yet set!")
|
||||
# if self.password != tools.config.get('uninstall_password').replace('\'', ''):
|
||||
# raise ValidationError("Invalid Password!")
|
||||
# return super(BaseModuleUninstall, self).action_uninstall()
|
||||
|
|
|
|||