diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml index 01869e6a6a6..143d2e26b07 100644 --- a/bin/addons/base/base_data.xml +++ b/bin/addons/base/base_data.xml @@ -1044,7 +1044,7 @@ - + OpenERP S.A. @@ -1170,7 +1170,7 @@ - + Kč CZK @@ -1213,7 +1213,7 @@ - + Rs IDR @@ -1290,7 +1290,7 @@ - + kr SEK @@ -1304,7 +1304,7 @@ - + GBP GBP @@ -1326,7 +1326,7 @@ 0.01 4 - + 5.0881 diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index a2ed3c05840..098d8b9b50e 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -203,16 +203,16 @@ class res_company(osv.osv): return """
- + - [[ formatLang(time.strftime("%Y-%m-%d"), date=True) ]] [[ time.strftime("%H:%M") ]] + [[ formatLang(time.strftime("%Y-%m-%d"), date=True) ]] [[ time.strftime("%H:%M") ]] - [[ company.partner_id.name ]] + [[ company.partner_id.name ]] - 25 720 1085 720 + 25 550 818 550
""" @@ -220,16 +220,16 @@ class res_company(osv.osv): return """
- + - [[ formatLang(time.strftime("%Y-%m-%d"), date=True) ]] [[ time.strftime("%H:%M") ]] + [[ formatLang(time.strftime("%Y-%m-%d"), date=True) ]] [[ time.strftime("%H:%M") ]] - [[ company.partner_id.name ]] + [[ company.partner_id.name ]] - 1.3cm 28.1cm 20cm 28.1cm + 1.0cm 28.1cm 20.1cm 28.1cm
""" diff --git a/bin/addons/base/res/res_config.py b/bin/addons/base/res/res_config.py index 5b3b0755f96..83b4c2b68d3 100644 --- a/bin/addons/base/res/res_config.py +++ b/bin/addons/base/res/res_config.py @@ -393,7 +393,7 @@ class res_config_installer(osv.osv_memory): cr, uid, modules.search(cr, uid, [('name','in',to_install)]), 'to install', ['uninstalled'], context=context) - cr.commit() #TOFIX: after remove this statement, installation wizard is fail + cr.commit() #TOFIX: after remove this statement, installation wizard is fail pooler.restart_pool(cr.dbname, update_module=True) res_config_installer() diff --git a/bin/addons/base/res/res_currency.py b/bin/addons/base/res/res_currency.py index 1a233df4f19..30beb8a2219 100644 --- a/bin/addons/base/res/res_currency.py +++ b/bin/addons/base/res/res_currency.py @@ -48,7 +48,6 @@ class res_currency(osv.osv): _description = "Currency" _columns = { 'name': fields.char('Currency', size=32, required=True), - 'code': fields.char('Code', size=3), 'symbol': fields.char('Symbol', size=3), 'rate': fields.function(_current_rate, method=True, string='Current Rate', digits=(12,6), help='The rate of the currency to the currency of rate 1'), @@ -65,7 +64,7 @@ class res_currency(osv.osv): 'active': lambda *a: 1, 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'res.currency', context=c) } - _order = "code" + _order = "name" def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'): res=super(osv.osv, self).read(cr, user, ids, fields, context, load) @@ -102,12 +101,12 @@ class res_currency(osv.osv): if from_currency['rate'] == 0 or to_currency['rate'] == 0: date = context.get('date', time.strftime('%Y-%m-%d')) if from_currency['rate'] == 0: - code = from_currency.code + currency_symbol = from_currency.symbol else: - code = to_currency.code + currency_symbol = to_currency.symbol raise osv.except_osv(_('Error'), _('No rate found \n' \ 'for the currency: %s \n' \ - 'at the date: %s') % (code, date)) + 'at the date: %s') % (currency_symbol, date)) rate = to_currency.rate/from_currency.rate if account and (account.currency_mode=='average') and account.currency_id: q = self.pool.get('account.move.line')._query_get(cr, uid, context=context) @@ -133,9 +132,7 @@ class res_currency(osv.osv): args2 = args[:] if name: args += [('name', operator, name)] - args2 += [('code', operator, name)] ids = self.search(cr, uid, args, limit=limit) - ids += self.search(cr, uid, args2, limit=limit) res = self.name_get(cr, uid, ids, context) return res res_currency() diff --git a/bin/addons/base/res/res_currency_view.xml b/bin/addons/base/res/res_currency_view.xml index 60ddf0d98e8..37a8693e5b3 100644 --- a/bin/addons/base/res/res_currency_view.xml +++ b/bin/addons/base/res/res_currency_view.xml @@ -9,7 +9,6 @@ - @@ -28,7 +27,6 @@
- diff --git a/bin/report/render/rml2pdf/trml2pdf.py b/bin/report/render/rml2pdf/trml2pdf.py index 4e85ac2b0db..c8b64f4075b 100644 --- a/bin/report/render/rml2pdf/trml2pdf.py +++ b/bin/report/render/rml2pdf/trml2pdf.py @@ -73,7 +73,7 @@ class NumberedCanvas(canvas.Canvas): while not self.pages.get(key,False): key = key + 1 self.setFont("Helvetica", 8) - self.drawRightString((self._pagesize[0]-35), (self._pagesize[1]-43), + self.drawRightString((self._pagesize[0]-30), (self._pagesize[1]-40), "Page %(this)i of %(total)i" % { 'this': self._pageNumber+1, 'total': self.pages.get(key,False), diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index fe34b67dc4c..b3f5e66e995 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -164,6 +164,7 @@ class rml_parse(object): 'lang' : user.company_id.partner_id.lang, 'translate' : self._translate, 'setHtmlImage' : self.set_html_image, + 'strip_name' : self._strip_name, 'time' : time } self.localcontext.update(context) @@ -184,6 +185,14 @@ class rml_parse(object): def setTag(self, oldtag, newtag, attrs=None): return newtag, attrs + def _ellipsis(self, char, size=100, truncation_str='...'): + if len(char) <= size: + return char + return char[:size-len(truncation_str)] + truncation_str + + def _strip_name(self, name, maxlen=50): + return self._ellipsis(name, maxlen) + def format(self, text, oldtag=None): return text.strip()