diff --git a/addons/account/account.py b/addons/account/account.py index 1b7727e9737..30a18ac6efe 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1442,7 +1442,8 @@ class account_model(osv.osv): } _defaults = { - 'legend':lambda *a:'''You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s : To Specify Year \n%(month)s : To Specify Month \n%(date)s : Current Date\n\ne.g. My model on %(date)s''', + 'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s : To Specify Year \n%(month)s : To Specify Month \n%(date)s : Current Date\n\ne.g. My model on %(date)s'), + } account_model() diff --git a/addons/account/invoice.py b/addons/account/invoice.py index e60c04d9851..c57626d5720 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -82,8 +82,8 @@ class account_invoice(osv.osv): res[id] = self.test_paid(cr, uid, [id]) return res - def _get_reference_type(self, cursor, user, context=None): - return [('none', 'Free Reference')] + def _get_reference_type(self, cr, uid, context=None): + return [('none', _('Free Reference'))] def _amount_residual(self, cr, uid, ids, name, args, context={}): res = {} diff --git a/addons/account/project/wizard/wizard_account_analytic_line.py b/addons/account/project/wizard/wizard_account_analytic_line.py index 59b1d7069e3..3c3a47e7cc6 100644 --- a/addons/account/project/wizard/wizard_account_analytic_line.py +++ b/addons/account/project/wizard/wizard_account_analytic_line.py @@ -23,6 +23,7 @@ import wizard import pooler import time +from tools.translate import _ def _action_open_window(self, cr, uid, data, context): domain=[] @@ -35,7 +36,7 @@ def _action_open_window(self, cr, uid, data, context): elif to_date: domain=[('date','<=',to_date)] return { - 'name': 'Analytic Entries', + 'name': _('Analytic Entries'), 'view_type': 'form', "view_mode": 'tree,form', 'res_model': 'account.analytic.line', diff --git a/addons/account/wizard/wizard_account_chart.py b/addons/account/wizard/wizard_account_chart.py index eeeeb85e30a..a2edc2fec2f 100644 --- a/addons/account/wizard/wizard_account_chart.py +++ b/addons/account/wizard/wizard_account_chart.py @@ -60,6 +60,11 @@ class wizard_account_chart(wizard.interface): result = mod_obj._get_id(cr, uid, 'account', 'action_account_tree') id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] result = act_obj.read(cr, uid, [id])[0] + if 'lang' in context: + import tools + trans_name = tools.translate(cr, 'ir.actions.act_window,name', 'model', context['lang'], result['name']) + if trans_name: + result['name'] = trans_name result['context'] = str({'fiscalyear': data['form']['fiscalyear'],'target_move':data['form']['target_move']}) if data['form']['fiscalyear']: result['name']+=':'+pooler.get_pool(cr.dbname).get('account.fiscalyear').read(cr,uid,[data['form']['fiscalyear']])[0]['code'] diff --git a/addons/account/wizard/wizard_bank_reconcile.py b/addons/account/wizard/wizard_bank_reconcile.py index 961ae553924..0c80ed5a7fb 100644 --- a/addons/account/wizard/wizard_bank_reconcile.py +++ b/addons/account/wizard/wizard_bank_reconcile.py @@ -40,7 +40,8 @@ def _action_open_window(self, cr, uid, data, context): raise Exception, _('You have to define the bank account\nin the journal definition for reconciliation.') return { 'domain': "[('journal_id','=',%d), ('account_id','=',%d), ('state','<>','draft')]" % (form['journal_id'],account_id), - 'name': 'Saisie Standard', + 'name': _('Standard Encoding'), + 'view_type': 'form', 'view_mode': 'tree,form', 'res_model': 'account.move.line', diff --git a/addons/account/wizard/wizard_general_ledger_report.py b/addons/account/wizard/wizard_general_ledger_report.py index 1d5896204db..57cf73b2941 100644 --- a/addons/account/wizard/wizard_general_ledger_report.py +++ b/addons/account/wizard/wizard_general_ledger_report.py @@ -25,32 +25,6 @@ import pooler import locale import time -#report_type = ''' -#
''' -# -#dates_form = ''' -#''' -# -#dates_fields = { -# 'date_from': {'string':"Start date",'type':'date','required':True ,'default': lambda *a: time.strftime('%Y-01-01')}, -# 'date_to': {'string':"End date",'type':'date','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')}, -# 'sortbydate':{'string':"Sort by",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Mouvement')]}, -# 'display_account':{'string':"Display accounts ",'type':'selection','selection':[('bal_mouvement','With movements'),('bal_all','All'),('bal_solde','With balance is not equal to 0')]}, -# 'landscape':{'string':"Print in Landscape Mode",'type':'boolean'}, -# 'soldeinit':{'string':"Inclure les soldes initiaux",'type':'boolean'}, -# 'amount_currency':{'string':"with amount in currency",'type':'boolean'} -# -#} - account_form = '''