parent
1e973a8151
commit
19b50c4902
|
@ -1,2 +1 @@
|
||||||
import res_users
|
import auth_reset_password
|
||||||
import controllers
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class res_users(osv.osv):
|
||||||
('email_uniq', 'UNIQUE (user_email)', 'You can not have two users with the same email!')
|
('email_uniq', 'UNIQUE (user_email)', 'You can not have two users with the same email!')
|
||||||
]
|
]
|
||||||
|
|
||||||
def _auth_reset_password_secret(self, cr, uid, ids, context=None)
|
def _auth_reset_password_secret(self, cr, uid, ids, context=None):
|
||||||
uuid = self.pool.get('ir.config_parameter').get_param(cr, uid, 'database.uuid')
|
uuid = self.pool.get('ir.config_parameter').get_param(cr, uid, 'database.uuid')
|
||||||
res = {
|
res = {
|
||||||
'dbname': cr.dbname,
|
'dbname': cr.dbname,
|
||||||
|
@ -95,7 +95,7 @@ class auth_reset_password(osv.TransientModel):
|
||||||
raise osv.except_osv('Error', 'Passwords missmatch')
|
raise osv.except_osv('Error', 'Passwords missmatch')
|
||||||
|
|
||||||
Users = self.pool.get('res.users')
|
Users = self.pool.get('res.users')
|
||||||
data = Users._auth_reset_password_check_token(self, cr, uid, values['token']):
|
data = Users._auth_reset_password_check_token(self, cr, uid, values['token'])
|
||||||
if data:
|
if data:
|
||||||
Users.write(cr, 1, data['uid'], {'password': pw}, context=context)
|
Users.write(cr, 1, data['uid'], {'password': pw}, context=context)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
openerp.reset_password = function(instance) {
|
openerp.auth_reset_password = function(instance) {
|
||||||
var _t = instance.web._t;
|
var _t = instance.web._t;
|
||||||
instance.web.Login.include({
|
instance.web.Login.include({
|
||||||
start: function() {
|
start: function() {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
import res_config
|
import res_config
|
||||||
import signup
|
import auth_signup
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'depends': ['anonymous', 'base_setup'],
|
'depends': ['anonymous', 'base_setup'],
|
||||||
'data': [
|
'data': [
|
||||||
|
'auth_signup.xml',
|
||||||
'res_config.xml',
|
'res_config.xml',
|
||||||
'signup.xml',
|
|
||||||
],
|
],
|
||||||
'js': [
|
'js': [
|
||||||
'static/src/js/auth_signup.js',
|
'static/src/js/auth_signup.js',
|
||||||
|
|
|
@ -9,7 +9,7 @@ openerp.auth_signup = function(instance) {
|
||||||
var am = p.action_manager;
|
var am = p.action_manager;
|
||||||
am.do_action({
|
am.do_action({
|
||||||
type:'ir.actions.act_window',
|
type:'ir.actions.act_window',
|
||||||
res_model: 'signup.signup',
|
res_model: 'auth.signup',
|
||||||
views: [[false, 'form']],
|
views: [[false, 'form']],
|
||||||
target: 'new',
|
target: 'new',
|
||||||
name: 'Sign Up'
|
name: 'Sign Up'
|
Loading…
Reference in New Issue