diff --git a/addons/account/account.py b/addons/account/account.py index 6cead2cddd3..485b085fbbe 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -312,7 +312,7 @@ class account_account(osv.osv): def _get_company_currency(self, cr, uid, ids, field_name, arg, context={}): result = {} for rec in self.browse(cr, uid, ids, context): - result[rec.id] = (rec.company_id.currency_id.id,rec.company_id.currency_id.code) + result[rec.id] = (rec.company_id.currency_id.id,rec.company_id.currency_id.symbol) return result def _get_child_ids(self, cr, uid, ids, field_name, arg, context={}): diff --git a/addons/account/account_unit_test.xml b/addons/account/account_unit_test.xml index e4178517361..c810e6a1080 100644 --- a/addons/account/account_unit_test.xml +++ b/addons/account/account_unit_test.xml @@ -1,7 +1,7 @@ - + @@ -19,8 +19,8 @@ 5.00 100.00 - - + + Basic computer with Dvorak keyboard and left-handed mouse @@ -34,19 +34,19 @@ 800 2 - - + + - EUR + € - + - + - + open @@ -62,7 +62,7 @@ - + paid diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 4eae61d90d7..0512b160a51 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1235,7 +1235,7 @@ class account_invoice(osv.osv): if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id: self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context) else: - code = invoice.currency_id.code + code = invoice.currency_id.symbol # TODO: use currency's formatting function msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)") % \ (name, pay_amount, code, invoice.amount_total, code, total, code) diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index 6ccfb9343a2..4656987cbeb 100644 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -90,15 +90,13 @@ class general_ledger(report_sxw.rml_parse, common_report_header): }) self.context = context - def _ellipsis(self, orig_str, maxlen=100, ellipsis='...'): - maxlen = maxlen - len(ellipsis) - if maxlen <= 0: - maxlen = 1 - new_str = orig_str[:maxlen] - return new_str + 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, ' ...') + return self._ellipsis(name, maxlen) def _sum_currency_amount_account(self, account): self.cr.execute('SELECT sum(l.amount_currency) AS tot_currency \ @@ -317,4 +315,4 @@ class general_ledger(report_sxw.rml_parse, common_report_header): report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal') report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal landscape') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index 5e2d445f772..fcf635e3a5c 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -271,6 +271,7 @@ [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] + Date diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 35d0c1356ef..68c976cb4fe 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -136,7 +136,7 @@ class common_report_header(object): def _get_currency(self, data): if data.get('form', False) and data['form'].get('chart_account_id', False): - return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code - return '' + return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol + return '' #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/crm/board_crm_statistical_view.xml b/addons/crm/board_crm_statistical_view.xml index ae76031ecc0..333a8684764 100644 --- a/addons/crm/board_crm_statistical_view.xml +++ b/addons/crm/board_crm_statistical_view.xml @@ -28,7 +28,7 @@ - + Opportunities By Stage Per User - Graph crm.lead.report @@ -43,12 +43,13 @@ - Opportunities By Categories + Opportunities by Categories crm.lead.report form graph,tree,form [('state', 'not in', ('done', 'cancel')), ('type', '=', 'opportunity')] + {'search_default_Category':1} @@ -57,6 +58,7 @@ graph,tree,form [('state', 'not in', ('done', 'cancel')), ('type', '=', 'opportunity')] + {'search_default_Stage':1} @@ -66,6 +68,7 @@ graph,tree,form [('state','!=','cancel')] + {'search_default_Stage':1} @@ -77,14 +80,14 @@ diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml index f316ed4e26a..80e7fbfed0c 100644 --- a/addons/crm/board_crm_view.xml +++ b/addons/crm/board_crm_view.xml @@ -18,17 +18,6 @@ - - crm.lead.report.tree - crm.lead.report - tree - - - - - - - crm.lead.report.graph crm.lead.report @@ -110,21 +99,9 @@ form graph,tree,form - ['&', '&', ('user_id','=',uid), ('type', '=', 'opportunity'), '!' , '&', ('state', '=', 'done'), ('date_closed','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))] - {'group_by_no_leaf':1,'group_by':['stage_id']} + ['&', '&', ('user_id','=',uid), ('type', '=', 'opportunity'), '!' , '&', ('state', '=', 'done'), ('date_closed','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))] + {'search_default_Stage':1} - - - graph - - - - - - tree - - - crm.lead.report diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index f099ceede8b..fd27e55fc2e 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -136,9 +136,9 @@ domain="[]" context="{'group_by':'company_id'}" /> - + - diff --git a/addons/sale/board_sale_view.xml b/addons/sale/board_sale_view.xml index 1473bf42f31..82fdc3d1d3b 100644 --- a/addons/sale/board_sale_view.xml +++ b/addons/sale/board_sale_view.xml @@ -14,11 +14,11 @@ - + - - + + diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml index 4f81fb4cb5d..a47ab2e73a9 100644 --- a/addons/sale/report/sale_report_view.xml +++ b/addons/sale/report/sale_report_view.xml @@ -97,11 +97,11 @@ - + - + @@ -133,24 +133,12 @@ - - sales.by.partner.tree - sale.report - tree - - - - - - - - sales.by.partner.graph sale.report graph - + @@ -158,37 +146,13 @@ - Sales By Partner + Sales by Partner sale.report form graph,tree [('state','in',('manual','progress')),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))] - {'group_by_no_leaf':1,'group_by':['partner_id']} - - - - graph - - - - - - tree - - - - - - sales.by.salesman.tree - sale.report - tree - - - - - - + {'search_default_Customer':1} @@ -196,7 +160,7 @@ sale.report graph - + @@ -204,36 +168,13 @@ - Sales By Salesman + Sales by Salesman sale.report form graph,tree [('state','in',('manual','progress','done')),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))] - {'group_by_no_leaf':1,'group_by':['user_id']} - - - - graph - - - - - - tree - - - - - sold.product.total.price.tree - sale.report - tree - - - - - - + {'search_default_User':1} @@ -255,20 +196,8 @@ graph,tree [('state','in',('manual','progress','done')),('date','>',(datetime.date.today()-datetime.timedelta(days=90)).strftime('%Y-%m-%d'))] - {'group_by_no_leaf':1,'group_by':['categ_id']} + {'search_default_Category':1} - - - graph - - - - - - tree - - - view.sales.by.month.tree @@ -283,7 +212,7 @@ - Sales By Month + Sales by Month sale.report form tree,graph