[Imp]:Improve configuration warning msg
[imp]:remove space [rem]:remove code [imp]:remove changes [imp]:remove changes [rem]:remove unused changes
This commit is contained in:
parent
e1feec1c7c
commit
6cc4bd4312
|
@ -932,7 +932,9 @@ class account_fiscalyear(osv.osv):
|
||||||
ids = self.search(cr, uid, args, context=context)
|
ids = self.search(cr, uid, args, context=context)
|
||||||
if not ids:
|
if not ids:
|
||||||
if exception:
|
if exception:
|
||||||
raise osv.except_osv(_('Error!'), _('There is no fiscal year defined for this date.\nPlease create one from the configuration of the accounting menu.'))
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_fiscalyear')
|
||||||
|
msg = _('There is no period defined for this date: %s.\nPlease go to Configuration/Periods and configure a fiscal year.') % dt
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
return ids
|
return ids
|
||||||
|
@ -1021,10 +1023,9 @@ class account_period(osv.osv):
|
||||||
if not result:
|
if not result:
|
||||||
result = self.search(cr, uid, args, context=context)
|
result = self.search(cr, uid, args, context=context)
|
||||||
if not result:
|
if not result:
|
||||||
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_fiscalyear')
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_period')
|
||||||
msg = _('There is no period defined for this date: %s.\nPlease, go to Configuration/Periods and configure a fiscal year.') % dt
|
msg = _('There is no period defined for this date: %s.\nPlease go to Configuration/Periods.') % dt
|
||||||
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def action_draft(self, cr, uid, ids, *args):
|
def action_draft(self, cr, uid, ids, *args):
|
||||||
|
|
|
@ -471,7 +471,7 @@ class account_invoice(osv.osv):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
|
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
|
||||||
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
|
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False, context=None):
|
||||||
partner_payment_term = False
|
partner_payment_term = False
|
||||||
acc_id = False
|
acc_id = False
|
||||||
bank_id = False
|
bank_id = False
|
||||||
|
@ -496,8 +496,9 @@ class account_invoice(osv.osv):
|
||||||
rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False
|
rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False
|
||||||
pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False
|
pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False
|
||||||
if not rec_res_id and not pay_res_id:
|
if not rec_res_id and not pay_res_id:
|
||||||
raise osv.except_osv(_('Configuration Error!'),
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_config')
|
||||||
_('Cannot find a chart of accounts for this company, you should create one.'))
|
msg = _('Cannot find a chart of accounts for this company, You should configure it. \nPlease go to Account Configuration.')
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
account_obj = self.pool.get('account.account')
|
account_obj = self.pool.get('account.account')
|
||||||
rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id])
|
rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id])
|
||||||
pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id])
|
pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id])
|
||||||
|
@ -607,8 +608,9 @@ class account_invoice(osv.osv):
|
||||||
pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False
|
pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False
|
||||||
|
|
||||||
if not rec_res_id and not pay_res_id:
|
if not rec_res_id and not pay_res_id:
|
||||||
raise self.pool.get('res.config.settings').get_config_warning(cr, _('Cannot find any chart of account: you can create a new one from %(menu:account.menu_account_config)s.'), context=context)
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_config')
|
||||||
|
msg = _('Cannot find a chart of accounts for this company, You should configure it. \nPlease go to Account Configuration.')
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
if type in ('out_invoice', 'out_refund'):
|
if type in ('out_invoice', 'out_refund'):
|
||||||
acc_id = rec_res_id
|
acc_id = rec_res_id
|
||||||
else:
|
else:
|
||||||
|
@ -623,8 +625,9 @@ class account_invoice(osv.osv):
|
||||||
if line.account_id.company_id.id != company_id:
|
if line.account_id.company_id.id != company_id:
|
||||||
result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
|
result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
|
||||||
if not result_id:
|
if not result_id:
|
||||||
raise osv.except_osv(_('Configuration Error!'),
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_config')
|
||||||
_('Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu.'))
|
msg = _('Cannot find a chart of accounts for this company, You should configure it. \nPlease go to Account Configuration.')
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
inv_line_obj.write(cr, uid, [line.id], {'account_id': result_id[-1]})
|
inv_line_obj.write(cr, uid, [line.id], {'account_id': result_id[-1]})
|
||||||
else:
|
else:
|
||||||
if invoice_line:
|
if invoice_line:
|
||||||
|
@ -656,8 +659,9 @@ class account_invoice(osv.osv):
|
||||||
journal_type_label = self.pool['ir.translation']._get_source(cr, uid, None, ('code','selection'),
|
journal_type_label = self.pool['ir.translation']._get_source(cr, uid, None, ('code','selection'),
|
||||||
context.get('lang'),
|
context.get('lang'),
|
||||||
journal_type_map.get(journal_type))
|
journal_type_map.get(journal_type))
|
||||||
raise osv.except_osv(_('Configuration Error!'),
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_journal_form')
|
||||||
_('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Journals\Journals.') % ('"%s"' % journal_type_label))
|
msg = _("""Cannot find any account journal of type "%s" for this company, You should create one.\n Please go to Journal Configuration""") % journal_type_label
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
dom = {'journal_id': [('id', 'in', journal_ids)]}
|
dom = {'journal_id': [('id', 'in', journal_ids)]}
|
||||||
else:
|
else:
|
||||||
journal_ids = obj_journal.search(cr, uid, [])
|
journal_ids = obj_journal.search(cr, uid, [])
|
||||||
|
|
|
@ -31,6 +31,7 @@ from openerp.osv import fields, osv, orm
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
import openerp.addons.decimal_precision as dp
|
import openerp.addons.decimal_precision as dp
|
||||||
from openerp import tools
|
from openerp import tools
|
||||||
|
import openerp
|
||||||
|
|
||||||
class account_move_line(osv.osv):
|
class account_move_line(osv.osv):
|
||||||
_name = "account.move.line"
|
_name = "account.move.line"
|
||||||
|
@ -548,7 +549,9 @@ class account_move_line(osv.osv):
|
||||||
if context.get('journal_type', False):
|
if context.get('journal_type', False):
|
||||||
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
|
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
|
||||||
if not jids:
|
if not jids:
|
||||||
raise osv.except_osv(_('Configuration Error!'), _('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Journals/Journals.') % context.get('journal_type'))
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_journal_form')
|
||||||
|
msg = _("""Cannot find any account journal of "%s" type for this company, You should create one.\n Please go to Journal Configuration""") % context.get('journal_type').replace('_', ' ').title()
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
journal_id = jids[0]
|
journal_id = jids[0]
|
||||||
return journal_id
|
return journal_id
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import openerp.addons.decimal_precision as dp
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
from openerp.tools import float_compare
|
from openerp.tools import float_compare
|
||||||
from openerp.report import report_sxw
|
from openerp.report import report_sxw
|
||||||
|
import openerp
|
||||||
|
|
||||||
class res_currency(osv.osv):
|
class res_currency(osv.osv):
|
||||||
_inherit = "res.currency"
|
_inherit = "res.currency"
|
||||||
|
@ -1096,11 +1097,15 @@ class account_voucher(osv.osv):
|
||||||
if amount_residual > 0:
|
if amount_residual > 0:
|
||||||
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
|
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
|
||||||
if not account_id:
|
if not account_id:
|
||||||
raise osv.except_osv(_('Insufficient Configuration!'),_("You should configure the 'Loss Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_form')
|
||||||
|
msg = _("You should configure the 'Loss Exchange Rate Account' to manage automatically the booking of accounting entries related to differences between exchange rates.")
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
else:
|
else:
|
||||||
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
|
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
|
||||||
if not account_id:
|
if not account_id:
|
||||||
raise osv.except_osv(_('Insufficient Configuration!'),_("You should configure the 'Gain Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_form')
|
||||||
|
msg = _("You should configure the 'Gain Exchange Rate Account' to manage automatically the booking of accounting entries related to differences between exchange rates.")
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
|
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
|
||||||
# the receivable/payable account may have a secondary currency, which render this field mandatory
|
# the receivable/payable account may have a secondary currency, which render this field mandatory
|
||||||
if line.account_id.currency_id:
|
if line.account_id.currency_id:
|
||||||
|
|
|
@ -27,6 +27,7 @@ import werkzeug.urls
|
||||||
import urllib2
|
import urllib2
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
import openerp
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -63,7 +64,9 @@ class config(osv.Model):
|
||||||
user_is_admin = self.pool['res.users'].has_group(cr, uid, 'base.group_erp_manager')
|
user_is_admin = self.pool['res.users'].has_group(cr, uid, 'base.group_erp_manager')
|
||||||
if not google_drive_refresh_token:
|
if not google_drive_refresh_token:
|
||||||
if user_is_admin:
|
if user_is_admin:
|
||||||
raise self.pool.get('res.config.settings').get_config_warning(cr, _("You haven't configured 'Authorization Code' generated from google, Please generate and configure it in %(menu:base_setup.menu_general_configuration)s."), context=context)
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base_setup', 'action_general_configuration')
|
||||||
|
msg = _("You haven't configured 'Authorization Code' generated from google, Please generate and configure it .")
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
else:
|
else:
|
||||||
raise osv.except_osv(_('Error!'), _("Google Drive is not yet configured. Please contact your administrator."))
|
raise osv.except_osv(_('Error!'), _("Google Drive is not yet configured. Please contact your administrator."))
|
||||||
google_drive_client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_id')
|
google_drive_client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_id')
|
||||||
|
@ -81,7 +84,9 @@ class config(osv.Model):
|
||||||
content = urllib2.urlopen(req).read()
|
content = urllib2.urlopen(req).read()
|
||||||
except urllib2.HTTPError:
|
except urllib2.HTTPError:
|
||||||
if user_is_admin:
|
if user_is_admin:
|
||||||
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Something went wrong during the token generation. Please request again an authorization code in %(menu:base_setup.menu_general_configuration)s."), context=context)
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base_setup', 'action_general_configuration')
|
||||||
|
msg = _("Something went wrong during the token generation. Please request again an authorization code .")
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
else:
|
else:
|
||||||
raise osv.except_osv(_('Error!'), _("Google Drive is not yet configured. Please contact your administrator."))
|
raise osv.except_osv(_('Error!'), _("Google Drive is not yet configured. Please contact your administrator."))
|
||||||
content = json.loads(content)
|
content = json.loads(content)
|
||||||
|
@ -98,7 +103,7 @@ class config(osv.Model):
|
||||||
req = urllib2.Request(request_url, None, headers)
|
req = urllib2.Request(request_url, None, headers)
|
||||||
parents = urllib2.urlopen(req).read()
|
parents = urllib2.urlopen(req).read()
|
||||||
except urllib2.HTTPError:
|
except urllib2.HTTPError:
|
||||||
raise self.pool.get('res.config.settings').get_config_warning(cr, _("The Google Template cannot be found. Maybe it has been deleted."), context=context)
|
raise osv.except_osv(_('Warning!'), _("The Google Template cannot be found. Maybe it has been deleted."))
|
||||||
parents_dict = json.loads(parents)
|
parents_dict = json.loads(parents)
|
||||||
|
|
||||||
record_url = "Click on link to open Record in OpenERP\n %s/?db=%s#id=%s&model=%s" % (google_web_base_url, cr.dbname, res_id, res_model)
|
record_url = "Click on link to open Record in OpenERP\n %s/?db=%s#id=%s&model=%s" % (google_web_base_url, cr.dbname, res_id, res_model)
|
||||||
|
|
|
@ -24,6 +24,7 @@ import time
|
||||||
from openerp.osv import fields
|
from openerp.osv import fields
|
||||||
from openerp.osv import osv
|
from openerp.osv import osv
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
|
import openerp
|
||||||
|
|
||||||
class hr_employee(osv.osv):
|
class hr_employee(osv.osv):
|
||||||
_name = "hr.employee"
|
_name = "hr.employee"
|
||||||
|
@ -147,7 +148,9 @@ class hr_analytic_timesheet(osv.osv):
|
||||||
else:
|
else:
|
||||||
emp_id = emp_obj.search(cr, uid, [('user_id','=',context.get('user_id') or uid)], limit=1, context=context)
|
emp_id = emp_obj.search(cr, uid, [('user_id','=',context.get('user_id') or uid)], limit=1, context=context)
|
||||||
if not emp_id:
|
if not emp_id:
|
||||||
raise osv.except_osv(_('Warning!'), _('Please create an employee for this user, using the menu: Human Resources > Employees.'))
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'hr', 'open_view_employee_list_my')
|
||||||
|
msg = _("Employee is not created for this user. Please create one from configuration panel.")
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
|
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
|
||||||
if emp.journal_id:
|
if emp.journal_id:
|
||||||
return emp.journal_id.id
|
return emp.journal_id.id
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
from openerp import SUPERUSER_ID
|
from openerp import SUPERUSER_ID
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
|
import openerp
|
||||||
|
|
||||||
|
|
||||||
class res_users(osv.Model):
|
class res_users(osv.Model):
|
||||||
|
@ -68,7 +69,9 @@ class res_users(osv.Model):
|
||||||
|
|
||||||
def create(self, cr, uid, data, context=None):
|
def create(self, cr, uid, data, context=None):
|
||||||
if not data.get('login', False):
|
if not data.get('login', False):
|
||||||
raise osv.except_osv(_('Invalid Action!'), _('You may not create a user. To create new users, you should use the "Settings > Users" menu.'))
|
model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'base', 'action_res_users')
|
||||||
|
msg = _("You cannot create a new user from here.\n To create new user please go to configuration panel.")
|
||||||
|
raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
|
|
|
@ -376,6 +376,16 @@
|
||||||
display: inline;
|
display: inline;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
.openerp .oe_warning_redirect {
|
||||||
|
border: none !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin-left: 20px !important;
|
||||||
|
background: #f5f7f9 !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
.openerp .oe_warning_redirect:hover {
|
||||||
|
text-decoration: underline !important;
|
||||||
|
}
|
||||||
.openerp .oe_stat_button:hover {
|
.openerp .oe_stat_button:hover {
|
||||||
background: #7c7bad;
|
background: #7c7bad;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
|
@ -348,6 +348,14 @@ $sheet-padding: 16px
|
||||||
@include box-shadow(none)
|
@include box-shadow(none)
|
||||||
&:hover
|
&:hover
|
||||||
background: #ED6F6A
|
background: #ED6F6A
|
||||||
|
.oe_warning_redirect
|
||||||
|
border: none !important
|
||||||
|
padding: 0 !important
|
||||||
|
margin-left: 20px !important
|
||||||
|
background: #f5f7f9 !important
|
||||||
|
box-shadow: none !important
|
||||||
|
&:hover
|
||||||
|
text-decoration: underline !important
|
||||||
.oe_stat_button
|
.oe_stat_button
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
width: 132px !important
|
width: 132px !important
|
||||||
|
|
|
@ -124,11 +124,12 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
var $customButons = this.$buttons.find('.oe_dialog_custom_buttons').empty();
|
var $customButons = this.$buttons.find('.oe_dialog_custom_buttons').empty();
|
||||||
_.each(buttons, function(fn, text) {
|
_.each(buttons, function(fn, text) {
|
||||||
// buttons can be object or array
|
// buttons can be object or array
|
||||||
|
var oe_link_class = fn.oe_link_class;
|
||||||
if (!_.isFunction(fn)) {
|
if (!_.isFunction(fn)) {
|
||||||
text = fn.text;
|
text = fn.text;
|
||||||
fn = fn.click;
|
fn = fn.click;
|
||||||
}
|
}
|
||||||
var $but = $(QWeb.render('WidgetButton', { widget : { string: text, node: { attrs: {} }}}));
|
var $but = $(QWeb.render('WidgetButton', { widget : { string: text, node: { attrs: {'class': oe_link_class} }}}));
|
||||||
$customButons.append($but);
|
$customButons.append($but);
|
||||||
$but.on('click', function(ev) {
|
$but.on('click', function(ev) {
|
||||||
fn.call(self.$el, ev);
|
fn.call(self.$el, ev);
|
||||||
|
@ -330,6 +331,7 @@ instance.web.RedirectWarningHandler = instance.web.Dialog.extend(instance.web.Ex
|
||||||
this.error = error;
|
this.error = error;
|
||||||
},
|
},
|
||||||
display: function() {
|
display: function() {
|
||||||
|
var self = this;
|
||||||
error = this.error;
|
error = this.error;
|
||||||
error.data.message = error.data.arguments[0];
|
error.data.message = error.data.arguments[0];
|
||||||
|
|
||||||
|
@ -337,14 +339,15 @@ instance.web.RedirectWarningHandler = instance.web.Dialog.extend(instance.web.Ex
|
||||||
size: 'medium',
|
size: 'medium',
|
||||||
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
title: "OpenERP " + (_.str.capitalize(error.type) || "Warning"),
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }},
|
{text: _t("Ok"), click: function() { self.$el.parents('.modal').modal('hide'); self.destroy();}},
|
||||||
{text: error.data.arguments[2], click: function() {
|
{text: error.data.arguments[2],
|
||||||
|
oe_link_class: 'oe_link',
|
||||||
|
click: function() {
|
||||||
window.location.href='#action='+error.data.arguments[1];
|
window.location.href='#action='+error.data.arguments[1];
|
||||||
this.$el.parents('.modal').modal('hide');
|
self.destroy();
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
}, QWeb.render('CrashManager.warning', {error: error})).open();
|
}, QWeb.render('CrashManager.warning', {error: error})).open();
|
||||||
this.destroy();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
instance.web.crash_manager_registry.add('openerp.exceptions.RedirectWarning', 'instance.web.RedirectWarningHandler');
|
instance.web.crash_manager_registry.add('openerp.exceptions.RedirectWarning', 'instance.web.RedirectWarningHandler');
|
||||||
|
|
|
@ -1365,7 +1365,7 @@
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="WidgetButton">
|
<t t-name="WidgetButton">
|
||||||
<button type="button" t-att-class="widget.is_stat_button ? 'oe_stat_button btn btn-default' : 'oe_button oe_form_button'"
|
<button type="button" t-att-class="widget.is_stat_button ? 'oe_stat_button btn btn-default' : 'oe_button oe_form_button ' + (widget.node.attrs.class ? widget.node.attrs.class : '')"
|
||||||
t-att-style="widget.node.attrs.style"
|
t-att-style="widget.node.attrs.style"
|
||||||
t-att-tabindex="widget.node.attrs.tabindex"
|
t-att-tabindex="widget.node.attrs.tabindex"
|
||||||
t-att-autofocus="widget.node.attrs.autofocus"
|
t-att-autofocus="widget.node.attrs.autofocus"
|
||||||
|
|
Loading…
Reference in New Issue