diff --git a/addons/account/account.py b/addons/account/account.py index 335822b7299..e56be49222c 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -624,7 +624,7 @@ class account_account(osv.osv): value = 'account.account,' + str(ids[0]) partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context) if partner_prop_acc: - raise osv.except_osv(_('Warning !'), _('You can not remove/desactivate an account which is set on a customer or supplier.')) + raise osv.except_osv(_('Warning !'), _('You cannot remove/deactivate an account which is set on a customer or supplier.')) return True def _check_allow_type_change(self, cr, uid, ids, new_type, context=None): @@ -913,7 +913,7 @@ class account_fiscalyear(osv.osv): return True _constraints = [ - (_check_duration, 'Error! The start date of the fiscal year must be before his end date.', ['date_start','date_stop']) + (_check_duration, 'Error! The start date of the fiscal year must be less than the end date.', ['date_start','date_stop']) ] def create_period3(self, cr, uid, ids, context=None): @@ -1031,7 +1031,7 @@ class account_period(osv.osv): _constraints = [ (_check_duration, 'Error ! The duration of the Period(s) is/are invalid. ', ['date_stop']), - (_check_year_limit, 'Invalid period ! Some periods overlap or the date period is not in the scope of the fiscal year. ', ['date_stop']) + (_check_year_limit, 'Invalid period ! Some periods overlap or the date period which is not in the scope of the fiscal year. ', ['date_stop']) ] def next(self, cr, uid, period, step, context=None): @@ -1078,7 +1078,7 @@ class account_period(osv.osv): if 'company_id' in vals: move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)]) if move_lines: - raise osv.except_osv(_('Warning !'), _('You can not modify company of this period as some journal items exists.')) + raise osv.except_osv(_('Warning !'), _('You cannot modify company of this period as some journal items exist.')) return super(account_period, self).write(cr, uid, ids, vals, context=context) def build_ctx_periods(self, cr, uid, period_from_id, period_to_id): @@ -1091,9 +1091,9 @@ class account_period(osv.osv): period_date_stop = period_to.date_stop company2_id = period_to.company_id.id if company1_id != company2_id: - raise osv.except_osv(_('Error'), _('You should have chosen periods that belongs to the same company')) + raise osv.except_osv(_('Error'), _('You should choose the periods that belong to the same company.')) if period_date_start > period_date_stop: - raise osv.except_osv(_('Error'), _('Start period should be smaller then End period')) + raise osv.except_osv(_('Error'), _('Start period should be smaller than End period.')) #for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search). if period_from.special: return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) @@ -1473,14 +1473,14 @@ class account_move(osv.osv): mode2 = 'debit' if not account_id: raise osv.except_osv(_('UserError'), - _('There is no default default debit account defined \n' \ + _('No default debit account is defined \n' \ 'on journal "%s"') % move.journal_id.name) else: account_id = move.journal_id.default_credit_account_id.id mode2 = 'credit' if not account_id: raise osv.except_osv(_('UserError'), - _('There is no default default credit account defined \n' \ + _('No default credit account is defined \n' \ 'on journal "%s"') % move.journal_id.name) # find the first line of this move with the current mode @@ -1575,11 +1575,11 @@ class account_move(osv.osv): if not company_id: company_id = line.account_id.company_id.id if not company_id == line.account_id.company_id.id: - raise osv.except_osv(_('Error'), _("Couldn't create move between different companies")) + raise osv.except_osv(_('Error'), _("Cannot create moves for different companies")) if line.account_id.currency_id and line.currency_id: if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id): - raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""") % (line.account_id.code, line.account_id.name)) + raise osv.except_osv(_('Error'), _("""Cannot create move with currency different from ..""") % (line.account_id.code, line.account_id.name)) if abs(amount) < 10 ** -4: # If the move is balanced @@ -2520,7 +2520,7 @@ class account_account_template(osv.osv): _check_recursion = check_cycle _constraints = [ (_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']), - (_check_type, 'Configuration Error!\nYou can not define children to an account with internal type different of "View"! ', ['type']), + (_check_type, 'Configuration Error!\nYou can not define children to an account that has internal type other than "View"!', ['type']), ] diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 927ce94db31..9660c888b3f 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -256,6 +256,13 @@ class account_cash_statement(osv.osv): self.write(cr, uid, [statement.id], vals, context=context) return True + def balance_check(self, cr, uid, cash_id, journal_type='bank', context=None): + if journal_type == 'bank': + return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context) + if not self._equal_balance(cr, uid, cash_id, context): + raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on this cash register !')) + return True + def statement_close(self, cr, uid, ids, journal_type='bank', context=None): if journal_type == 'bank': return super(account_cash_statement, self).statement_close(cr, uid, ids, journal_type, context) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 6a0a29cb2fe..c529ffbd1b9 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -364,7 +364,7 @@ class account_invoice(osv.osv): except Exception, e: if '"journal_id" viol' in e.args[0]: raise orm.except_orm(_('Configuration Error!'), - _('There is no Accounting Journal of type Sale/Purchase defined!')) + _('No Sale/Purchase Journal(s) is defined !')) else: raise orm.except_orm(_('Unknown Error'), str(e)) @@ -459,7 +459,7 @@ class account_invoice(osv.osv): pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False if not rec_res_id and not pay_res_id: raise osv.except_osv(_('Configuration Error !'), - _('Can not find a chart of accounts for this company, you should create one.')) + _('Cannot find a chart of accounts for this company, you should create one.')) account_obj = self.pool.get('account.account') rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id]) pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id]) @@ -554,7 +554,7 @@ class account_invoice(osv.osv): pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False if not rec_res_id and not pay_res_id: raise osv.except_osv(_('Configuration Error !'), - _('Can not find a chart of account, you should create one from the configuration of the accounting menu.')) + _('Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu.')) if type in ('out_invoice', 'out_refund'): acc_id = rec_res_id else: @@ -569,7 +569,7 @@ class account_invoice(osv.osv): result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)]) if not result_id: raise osv.except_osv(_('Configuration Error !'), - _('Can not find a chart of account, you should create one from the configuration of the accounting menu.')) + _('Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu.')) inv_line_obj.write(cr, uid, [line.id], {'account_id': result_id[-1]}) else: if invoice_line: @@ -577,7 +577,7 @@ class account_invoice(osv.osv): obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configuration Error !'), - _('Invoice line account company does not match with invoice company.')) + _('Company of invoice line account and the company of invoice does not match.')) else: continue if company_id and type: @@ -598,7 +598,7 @@ class account_invoice(osv.osv): if r[1] == 'journal_id' and r[2] in journal_ids: val['journal_id'] = r[2] if not val.get('journal_id', False): - raise osv.except_osv(_('Configuration Error !'), (_('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Financial Accounting\Accounts\Journals.') % (journal_type))) + raise osv.except_osv(_('Configuration Error !'), (_('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Journals\Journals.') % (journal_type))) dom = {'journal_id': [('id', 'in', journal_ids)]} else: journal_ids = obj_journal.search(cr, uid, []) @@ -1475,7 +1475,7 @@ class account_invoice_line(osv.osv): if prod.uom_id.category_id.id != prod_uom.category_id.id: warning = { 'title': _('Warning!'), - 'message': _('You selected an Unit of Measure which is not compatible with the product.') + 'message': _('Selected a Unit of Measure is not compatible with the Unit of Measure of the product.') } return {'value': res['value'], 'warning': warning} return res diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 5eb56bfa645..555a682ca0b 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -577,7 +577,7 @@ class account_move_line(osv.osv): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'view': - raise osv.except_osv(_('Error :'), _('You can not create journal items on a "view" account %s %s') % (l.account_id.code, l.account_id.name)) + raise osv.except_osv(_('Error :'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) return True def _check_no_closed(self, cr, uid, ids, context=None): @@ -611,7 +611,7 @@ class account_move_line(osv.osv): _constraints = [ (_check_no_view, 'You can not create journal items on an account of type view.', ['account_id']), (_check_no_closed, 'You can not create journal items on closed account.', ['account_id']), - (_check_company_id, 'Company must be the same for its related account and period.', ['company_id']), + (_check_company_id, 'Account and Period must belong to the same company.', ['company_id']), (_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']), (_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']), ] diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index e218d0838d4..a29dd5fdfa6 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -1564,7 +1564,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:1429 #, python-format -msgid "You selected an Unit of Measure which is not compatible with the product." +msgid "Selected a Unit of Measure is not compatible with the Unit of Measure of the product." msgstr "" #. module: account @@ -1934,7 +1934,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1461 #, python-format -msgid "There is no default default debit account defined \n" +msgid "No default debit account is defined \n" "on journal \"%s\"" msgstr "" @@ -2112,7 +2112,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1468 #, python-format -msgid "There is no default default credit account defined \n" +msgid "No default credit account is defined \n" "on journal \"%s\"" msgstr "" diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 66f634bd59f..4a47775c80b 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -60,7 +60,7 @@ class account_move_journal(osv.osv_memory): if context.get('journal_type', False): jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))]) if not jids: - raise osv.except_osv(_('Configuration Error !'), _('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Financial Accounting/Accounts/Journals.') % context.get('journal_type')) + raise osv.except_osv(_('Configuration Error !'), _('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Journals/Journals.') % context.get('journal_type')) journal_id = jids[0] return journal_id diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py index 9b89b30c93b..c54ce3cb18e 100644 --- a/addons/account/wizard/account_report_aged_partner_balance.py +++ b/addons/account/wizard/account_report_aged_partner_balance.py @@ -53,7 +53,7 @@ class account_aged_trial_balance(osv.osv_memory): period_length = data['form']['period_length'] if period_length<=0: - raise osv.except_osv(_('UserError'), _('You must enter a period length that cannot be 0 or below !')) + raise osv.except_osv(_('UserError'), _('You must enter a period length greater than 0 !')) if not data['form']['date_from']: raise osv.except_osv(_('UserError'), _('Enter a Start date !'))