diff --git a/addons/crm_partner_assign/report/crm_partner_report.py b/addons/crm_partner_assign/report/crm_partner_report.py index f2194f597e5..dce0342250b 100644 --- a/addons/crm_partner_assign/report/crm_partner_report.py +++ b/addons/crm_partner_assign/report/crm_partner_report.py @@ -66,3 +66,13 @@ class crm_partner_report_assign(osv.osv): left join account_invoice_report i on (i.partner_id=p.id and i.type in ('out_invoice','out_refund') and i.state in ('open','paid')) )""") + +class account_invoice_report(osv.osv): + _inherit = 'account.invoice.report' + + def init(self, cr): + # ensure we re-create the crm_partner_report_assign view whenever + # the underlying account_invoice_report view is changed + super(account_invoice_report, self).init(cr) + self.pool['crm.partner.report.assign'].init(cr) + diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index 43e80ec3894..4cc12f81278 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -59,14 +59,14 @@ class ir_http(orm.AbstractModel): def get_nearest_lang(self, lang): # Try to find a similar lang. Eg: fr_BE and fr_FR - if lang in request.website.get_languages(): - return lang - - short = lang.split('_')[0] + short = lang.partition('_')[0] + short_match = False for code, name in request.website.get_languages(): - if code.startswith(short): - return code - return False + if code == lang: + return lang + if not short_match and code.startswith(short): + short_match = code + return short_match def _geoip_setup_resolver(self): if self._geoip_resolver is None: diff --git a/doc/reference/cmdline.rst b/doc/reference/cmdline.rst index 626906951a2..e71a3bb5fd0 100644 --- a/doc/reference/cmdline.rst +++ b/doc/reference/cmdline.rst @@ -335,7 +335,7 @@ Some conversions don't match the pattern: :option:`--log-handler` and :option:`--log-db`) just add content to ``log_handler``, use that directly in the configuration file * :option:`--smtp` is stored as ``smtp_server`` -* :option:`--database` is stored as ``dbname`` +* :option:`--database` is stored as ``db_name`` * :option:`--debug` is stored as ``debug_mode`` (a boolean) * :option:`--i18n-import` and :option:`--i18n-export` aren't available at all from configuration files diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index 5e74dca28ac..57a076c1689 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -548,7 +548,7 @@ class res_partner(osv.Model, format_address): result = super(res_partner, self).write(vals) for partner in self: - if any(u.has_group('base.group_user') for u in partner.user_ids): + if any(u.has_group('base.group_user') for u in partner.user_ids if u != self.env.user): self.env['res.users'].check_access_rights('write') self._fields_sync(partner, vals) return result