diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml index 949d03324f3..9d2e65a3a4c 100644 --- a/addons/account/data/account_data.xml +++ b/addons/account/data/account_data.xml @@ -30,7 +30,6 @@ - 15 Days balance @@ -48,7 +47,6 @@ - 30 Net Days balance diff --git a/addons/account/demo/account_demo.xml b/addons/account/demo/account_demo.xml index 6918ad44702..8a450c0b6aa 100644 --- a/addons/account/demo/account_demo.xml +++ b/addons/account/demo/account_demo.xml @@ -135,7 +135,6 @@ 30 Days End of Month - 30 Days End of Month balance @@ -147,16 +146,13 @@ 30% Advance End 30 Days - 30% Advance procent - - Remaining Balance balance diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index 3c477b5556f..6f670b2c6b9 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -276,7 +276,7 @@ form tree,form [('invoice_id','=',False)] - {'search_default_to_invoice': 1, 'search_default_sales': 1} + {'search_default_to_invoice': 1}

diff --git a/addons/account_payment/account_invoice.py b/addons/account_payment/account_invoice.py index 7c8560fc9e8..916aa07afa0 100644 --- a/addons/account_payment/account_invoice.py +++ b/addons/account_payment/account_invoice.py @@ -43,26 +43,11 @@ class Invoice(osv.osv): raise osv.except_osv(_('Error!'), _("You cannot cancel an invoice which has already been imported in a payment order. Remove it from the following payment order : %s."%(payment_order_name))) return super(Invoice, self).action_cancel(cr, uid, ids, context=context) - def _amount_to_pay(self, cursor, user, ids, name, args, context=None): - '''Return the amount still to pay regarding all the payment orders''' - if not ids: - return {} - res = {} - for invoice in self.browse(cursor, user, ids, context=context): - res[invoice.id] = 0.0 - if invoice.move_id: - for line in invoice.move_id.line_id: - if not line.date_maturity or \ - datetime.strptime(line.date_maturity, '%Y-%m-%d') \ - < datetime.today(): - res[invoice.id] += line.amount_to_pay - return res _columns = { - 'amount_to_pay': fields.function(_amount_to_pay, + 'amount_to_pay': fields.related('residual', type='float', string='Amount to be paid', - help='The amount which should be paid at the current date\n' \ - 'minus the amount which is already in payment order'), + help='The amount which should be paid at the current date. '), } Invoice() diff --git a/addons/auth_openid/static/src/css/openid.css b/addons/auth_openid/static/src/css/openid.css index ab01ffd2f60..57c745f0aca 100644 --- a/addons/auth_openid/static/src/css/openid.css +++ b/addons/auth_openid/static/src/css/openid.css @@ -1,25 +1,15 @@ -.login .pane { - width: 260px; - height: 175px; -} - -.login .pane input[name='openid_url'] { +.oe_login .oe_login_pane input[name='openid_url'] { background: #fff url(../img/login-bg.gif) no-repeat 1px; padding-left: 20px; } -.auth_choice { - position: static; - display: none; +.openerp .oe_login .openid_providers { + text-align: center; } - -.openid_providers { - padding: 0; - list-style: none; - float: right; +.openerp .oe_login .openid_providers ul { + display: inline-block; } - -.openid_providers li { +.openerp .oe_login .openid_providers ul li { display: block; float: left; margin: 0 1px 3px 2px; @@ -29,7 +19,6 @@ display: block; width: 24px; height: 24px; - border: 1px solid #ddd; background: #fff url(../img/openid_16.png) no-repeat 50%; text-indent: -9999px; overflow: hidden; @@ -37,20 +26,16 @@ } .openid_providers a.selected { - border-color: #9A0404; + background-color: #DC5F59; } -.openid_providers a[title="Password"] { background-image: url(../img/textfield_key.png); } -.openid_providers a[title="AOL"] { background-image: url(../img/aol.png); } -.openid_providers a[title="ClaimID"] { background-image: url(../img/claimid.png); } -.openid_providers a[title="Google"] { background-image: url(../img/googlefav.png); } -.openid_providers a[title="Google Apps"] { background-image: url(../img/marketplace.gif); } -.openid_providers a[title="MyOpenID"] { background-image: url(../img/myopenid.png); } -.openid_providers a[title="VeriSign"] { background-image: url(../img/verisign.png); } -.openid_providers a[title="Yahoo!"] { background-image: url(../img/yahoo.png); } -.openid_providers a[title="Launchpad"] { background-image: url(../img/launchpad.png); } +.openid_providers a[data-provider="Password"] { background-image: url(../img/textfield_key.png); } +.openid_providers a[data-provider="AOL"] { background-image: url(../img/aol.png); } +.openid_providers a[data-provider="ClaimID"] { background-image: url(../img/claimid.png); } +.openid_providers a[data-provider="Google"] { background-image: url(../img/googlefav.png); } +.openid_providers a[data-provider="Google Apps"] { background-image: url(../img/marketplace.gif); } +.openid_providers a[data-provider="MyOpenID"] { background-image: url(../img/myopenid.png); } +.openid_providers a[data-provider="VeriSign"] { background-image: url(../img/verisign.png); } +.openid_providers a[data-provider="Yahoo!"] { background-image: url(../img/yahoo.png); } +.openid_providers a[data-provider="Launchpad"] { background-image: url(../img/launchpad.png); } - -li.auth_choice.selected { - display: table-row; -} diff --git a/addons/auth_openid/static/src/js/auth_openid.js b/addons/auth_openid/static/src/js/auth_openid.js index f8615481a40..ac2804cb130 100644 --- a/addons/auth_openid/static/src/js/auth_openid.js +++ b/addons/auth_openid/static/src/js/auth_openid.js @@ -14,6 +14,16 @@ instance.web.Login = instance.web.Login.extend({ self.$openid_selected_input = $(); self.$openid_selected_provider = null; + + // Hook auth_signup events. noop if module is not installed. + self.on('change:login_mode', self, function() { + var mode = self.get('login_mode') || 'default'; + if (mode !== 'default') { + return; + } + self.do_openid_select(self.$openid_selected_button, self.$openid_selected_provider, true); + }); + var openIdProvider = null; if (self.has_local_storage && self.remember_credentials) { @@ -21,12 +31,10 @@ instance.web.Login = instance.web.Login.extend({ } if (openIdProvider) { - $openid_selected_provider = openIdProvider; + self.$openid_selected_provider = openIdProvider; self.do_openid_select('a[href="#' + openIdProvider + '"]', openIdProvider, true); - if (self.has_local_storage && self.remember_credentials) { - self.$openid_selected_input.find('input').val(localStorage.getItem('openid-login')); - } + self.$openid_selected_input.find('input').val(localStorage.getItem('openid-login') || ''); } else { self.do_openid_select('a[data-url=""]', 'login,password', true); @@ -49,11 +57,12 @@ instance.web.Login = instance.web.Login.extend({ do_openid_select: function (button, provider, noautosubmit) { var self = this; + self.$('li[data-provider]').hide(); self.$openid_selected_button.add(self.$openid_selected_input).removeClass('selected'); self.$openid_selected_button = self.$el.find(button).addClass('selected'); var input = _(provider.split(',')).map(function(p) { return 'li[data-provider="'+p+'"]'; }).join(','); - self.$openid_selected_input = self.$el.find(input).addClass('selected'); + self.$openid_selected_input = self.$el.find(input).show(); self.$openid_selected_input.find('input:first').focus(); self.$openid_selected_provider = (self.$openid_selected_button.attr('href') || '').substr(1); @@ -62,7 +71,7 @@ instance.web.Login = instance.web.Login.extend({ localStorage.setItem('openid-provider', self.$openid_selected_provider); } - if (!noautosubmit && self.$openid_selected_input.length == 0) { + if (!noautosubmit && self.$openid_selected_input.length === 0) { self.$el.find('form').submit(); } diff --git a/addons/auth_openid/static/src/xml/auth_openid.xml b/addons/auth_openid/static/src/xml/auth_openid.xml index 6a40439a012..75fd2a8fe45 100644 --- a/addons/auth_openid/static/src/xml/auth_openid.xml +++ b/addons/auth_openid/static/src/xml/auth_openid.xml @@ -4,44 +4,53 @@ -

+ - -
  • + +
  • Google Apps Domain
  • -
  • +
  • -
  • +
  • Username
  • -
  • +
  • -
  • +
  • OpenID URL
  • -
  • +
  • - + + this.each(function() { + var $i = $(this); + $i.add($i.prev()).attr('data-provider', 'password'); + }); + + this.each(function() { var $i = $(this), - dp = $i.find('input').attr('name'); - $i.add($i.prev()).attr('class', 'auth_choice').attr('data-provider', dp); + dp = $i.find('input').attr('name'), + $p = $i.prev(); + // $p may not be the correct label when auth_signup is installed. + while(($p.attr('data-modes') || 'default') !== 'default') { $p = $p.prev(); } + $i.add($p).attr('data-provider', dp); }); diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index 4e86de5b474..b5383e41775 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -161,14 +161,12 @@ class res_users(osv.Model): def _get_state(self, cr, uid, ids, name, arg, context=None): res = {} for user in self.browse(cr, uid, ids, context): - res[user.id] = ('reset' if user.signup_valid else - 'active' if user.login_date else - 'new') + res[user.id] = ('active' if user.login_date else 'new') return res _columns = { 'state': fields.function(_get_state, string='Status', type='selection', - selection=[('new', 'New'), ('active', 'Active'), ('reset', 'Resetting Password')]), + selection=[('new', 'Never Connected'), ('active', 'Activated')]), } def signup(self, cr, uid, values, token=None, context=None): @@ -270,16 +268,7 @@ class res_users(osv.Model): if mail_state and mail_state['state'] == 'exception': raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context) else: - return { - 'type': 'ir.actions.client', - 'name': '_(Server Notification)', - 'tag': 'action_notify', - 'params': { - 'title': 'Mail Sent to: %s' % user.name, - 'text': 'You can reset the password by yourself using this link' % user.partner_id.signup_url, - 'sticky': True, - } - } + return True def create(self, cr, uid, values, context=None): # overridden to automatically invite user to sign up diff --git a/addons/auth_signup/res_users_view.xml b/addons/auth_signup/res_users_view.xml index 201abba140b..f0c51de1619 100644 --- a/addons/auth_signup/res_users_view.xml +++ b/addons/auth_signup/res_users_view.xml @@ -17,11 +17,26 @@
    +
    +

    + A password reset has been requested for this user. An email containing the following link has been sent: +

    +

    + An invitation email containing the following subscription link has been sent: +

    +

    + +