diff --git a/addons/account/account.py b/addons/account/account.py index e018546f897..14eccafbc7b 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -125,7 +125,7 @@ class account_payment_term_line(osv.osv): return True _constraints = [ - (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% .', ['value_amount']), + (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2%.', ['value_amount']), ] account_payment_term_line() @@ -409,7 +409,7 @@ class account_account(osv.osv): period_obj = self.pool.get('account.period') pids = period_obj.search(cr, uid, [('special','=',True),('company_id','=',account.company_id.id)], context=context) if not pids: - raise osv.except_osv(_('Error!'),_("No opening/closing period is defined, please create one to set the initial balance!")) + raise osv.except_osv(_('Error!'),_("There is no opening/closing period defined, please create one to set the initial balance.")) move_obj = self.pool.get('account.move.line') move_id = move_obj.search(cr, uid, [ @@ -619,9 +619,9 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): if method == 'write': - raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains some journal items.')) + raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains journal items.')) elif method == 'unlink': - raise osv.except_osv(_('Error !'), _('You cannot remove an account containing journal items.')) + raise osv.except_osv(_('Error !'), _('You cannot remove an account that contains journal items.')) #Checking whether the account is set as a property to any Partner or not value = 'account.account,' + str(ids[0]) partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context) @@ -790,7 +790,7 @@ class account_journal(osv.osv): if 'company_id' in vals and journal.company_id.id != vals['company_id']: move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)]) if move_lines: - raise osv.except_osv(_('Warning !'), _('You cannot modify the company of this journal as its related record exist in journal items.')) + raise osv.except_osv(_('Warning !'), _('This journal already contains items, therefore you cannot modify its company field.')) return super(account_journal, self).write(cr, uid, ids, vals, context=context) def create_sequence(self, cr, uid, vals, context=None): @@ -915,7 +915,7 @@ class account_fiscalyear(osv.osv): return True _constraints = [ - (_check_duration, 'Error! The start date of the fiscal year must be less than the end date.', ['date_start','date_stop']) + (_check_duration, 'Error! The start date of a fiscal year must precede its end date.', ['date_start','date_stop']) ] def create_period3(self, cr, uid, ids, context=None): @@ -966,7 +966,7 @@ class account_fiscalyear(osv.osv): ids = self.search(cr, uid, args, context=context) if not ids: if exception: - raise osv.except_osv(_('Error !'), _('No fiscal year is defined for this date !\nPlease create one from the configuration of the accounting menu.')) + raise osv.except_osv(_('Error !'), _('There is no fiscal year defined for this date.\nPlease create one from the configuration of the accounting menu.')) else: return [] return ids @@ -1033,7 +1033,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 which is not in the scope of the fiscal year. ', ['date_stop']) + (_check_year_limit, 'Error ! The period is invalid. Either some periods are overlapping or the period\'s dates are not matching the scope of the fiscal year.', ['date_stop']) ] def next(self, cr, uid, period, step, context=None): @@ -1055,7 +1055,7 @@ class account_period(osv.osv): args.append(('company_id', '=', company_id)) ids = self.search(cr, uid, args, context=context) if not ids: - raise osv.except_osv(_('Error !'), _('No period is defined for this date: %s !\nPlease create one.')%dt) + raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt) return ids def action_draft(self, cr, uid, ids, *args): @@ -1080,7 +1080,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 cannot modify company of this period as some journal items exist.')) + raise osv.except_osv(_('Warning !'), _('This journal already contains items for this period, therefore you cannot modify its company field.')) 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): @@ -1095,7 +1095,7 @@ class account_period(osv.osv): if company1_id != company2_id: 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 than End period.')) + raise osv.except_osv(_('Error!'), _('Start period should precede then 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)]) @@ -1134,7 +1134,7 @@ class account_journal_period(osv.osv): cr.execute('select * from account_move_line where journal_id=%s and period_id=%s limit 1', (obj.journal_id.id, obj.period_id.id)) res = cr.fetchall() if res: - raise osv.except_osv(_('Error !'), _('You cannot modify/delete a journal with entries for this period !')) + raise osv.except_osv(_('Error !'), _('You cannot modify/delete a journal with entries for this period.')) return True def write(self, cr, uid, ids, vals, context=None): @@ -1303,7 +1303,7 @@ class account_move(osv.osv): _constraints = [ (_check_centralisation, - 'You cannot create more than one move per period on centralized journal.', + 'You cannot create more than one move per period on a centralized journal.', ['journal_id']), ] @@ -1314,7 +1314,7 @@ class account_move(osv.osv): valid_moves = self.validate(cr, uid, ids, context) if not valid_moves: - raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry !\nMake sure you have configured payment terms properly !\nThe latest payment term line should be of the type "Balance" !')) + raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry.\nMake sure you have configured payment terms properly.\nThe latest payment term line should be of the "Balance" type.')) obj_sequence = self.pool.get('ir.sequence') for move in self.browse(cr, uid, valid_moves, context=context): if move.name =='/': @@ -1328,7 +1328,7 @@ class account_move(osv.osv): c = {'fiscalyear_id': move.period_id.fiscalyear_id.id} new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c) else: - raise osv.except_osv(_('Error'), _('Please define sequence on the journal !')) + raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal.')) if new_name: self.write(cr, uid, [move.id], {'name':new_name}) @@ -1358,7 +1358,7 @@ class account_move(osv.osv): def button_cancel(self, cr, uid, ids, context=None): for line in self.browse(cr, uid, ids, context=context): if not line.journal_id.update_posted: - raise osv.except_osv(_('Error !'), _('You cannot modify a posted entry of this journal !\nYou should set the journal to allow cancelling entries if you want to do that.')) + raise osv.except_osv(_('Error !'), _('You cannot modify a posted entry of this journal.\nFirst you should set the journal to allow cancelling entries.')) if ids: cr.execute('UPDATE account_move '\ 'SET state=%s '\ @@ -1446,7 +1446,7 @@ class account_move(osv.osv): for move in self.browse(cr, uid, ids, context=context): if move['state'] != 'draft': raise osv.except_osv(_('UserError!'), - _('You cannot delete a posted journal entry "%s"!') % \ + _('You cannot delete a posted journal entry "%s".') % \ move['name']) line_ids = map(lambda x: x.id, move.line_id) context['journal_id'] = move.journal_id.id @@ -1475,14 +1475,14 @@ class account_move(osv.osv): mode2 = 'debit' if not account_id: raise osv.except_osv(_('UserError'), - _('No default debit account is defined \n' \ + _('There is no default debit account 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'), - _('No default credit account is defined \n' \ + _('There is no default credit account defined \n' \ 'on journal "%s".') % move.journal_id.name) # find the first line of this move with the current mode @@ -2623,7 +2623,7 @@ class account_add_tmpl_wizard(osv.osv_memory): ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]], ['code']) res = None if not ptids or not ptids[0]['code']: - raise osv.except_osv(_('Error !'), _('I cannot locate a parent code for the template account!')) + raise osv.except_osv(_('Error !'), _('There is no parent code for the template account.')) res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])]) return res and res[0] or False diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 8dc7fb8abf4..e56629644ea 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -88,7 +88,7 @@ class account_analytic_line(osv.osv): a = prod.categ_id.property_account_expense_categ.id if not a: raise osv.except_osv(_('Error !'), - _('No expense account is defined ' \ + _('There is no expense account defined ' \ 'for this product: "%s" (id:%d).') % \ (prod.name, prod.id,)) else: @@ -97,7 +97,7 @@ class account_analytic_line(osv.osv): a = prod.categ_id.property_account_income_categ.id if not a: raise osv.except_osv(_('Error !'), - _('No income account is defined ' \ + _('There is no income account defined ' \ 'for this product: "%s" (id:%d).') % \ (prod.name, prod_id,)) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index a5141cd6b3f..af0a772e239 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -260,7 +260,7 @@ class account_cash_statement(osv.osv): 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 the cash register !')) + raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on the cash register.')) return True def statement_close(self, cr, uid, ids, journal_type='bank', context=None): @@ -289,8 +289,8 @@ class account_cash_statement(osv.osv): for item_label, item_account in TALBES: if getattr(obj.journal_id, item_account): - raise osv.except_osv(_('Error !'), - _('No %s Account on the Journal %s.') % (item_label, obj.journal_id.name,)) + raise osv.except_osv(_('Error !'), + _('There is no %s Account on the journal %s.') % (item_label, obj.journal_id.name,)) is_profit = obj.difference < 0.0 diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 6a63f129396..79e5bc10c17 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -319,7 +319,7 @@ class account_invoice(osv.osv): res['fields'][field]['selection'] = journal_select doc = etree.XML(res['arch']) - + if context.get('type', False): for node in doc.xpath("//field[@name='partner_bank_id']"): if context['type'] == 'in_refund': @@ -327,7 +327,7 @@ class account_invoice(osv.osv): elif context['type'] == 'out_refund': node.set('domain', "[('partner_id', '=', partner_id)]") res['arch'] = etree.tostring(doc) - + if view_type == 'search': if context.get('type', 'in_invoice') in ('out_invoice', 'out_refund'): for node in doc.xpath("//group[@name='extended filter']"): @@ -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!'), - _('No Sale/Purchase Journal(s) is defined!')) + _('There is no Sale/Purchase Journal(s) defined.')) else: raise orm.except_orm(_('Unknown Error!'), str(e)) @@ -425,7 +425,7 @@ class account_invoice(osv.osv): if t['state'] in ('draft', 'cancel') and t['internal_number']== False: unlink_ids.append(t['id']) else: - raise osv.except_osv(_('Invalid action !'), _('You cannot delete an invoice which is open or paid. We suggest you to refund it instead.')) + raise osv.except_osv(_('Invalid action !'), _('You cannot delete an invoice which is open or paid. You should refund it instead.')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True @@ -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 !'), - _('Company of invoice line account and the company of invoice does not match.')) + _('Invoice line account\'s company and invoice\'s compnay does not match.')) else: continue if company_id and type: @@ -840,7 +840,7 @@ class account_invoice(osv.osv): raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.')) if inv.move_id: continue - + ctx = context.copy() ctx.update({'lang': inv.partner_id.lang}) if not inv.date_invoice: @@ -866,7 +866,7 @@ class account_invoice(osv.osv): total_percent += line.value_amount total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0) if (total_fixed + total_percent) > 100: - raise osv.except_osv(_('Error !'), _("Cannot create the invoice !\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. The latest line of your payment term must be of type 'balance' to avoid rounding issues.")) + raise osv.except_osv(_('Error !'), _("Cannot create the invoice.\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. In order to avoid rounding issues, the latest line of your payment term must be of type 'balance'.")) # one move line per tax line iml += ait_obj.move_line_get(cr, uid, inv.id) @@ -979,7 +979,7 @@ class account_invoice(osv.osv): move_obj.post(cr, uid, [move_id], context=ctx) self._log_event(cr, uid, ids) return True - + def invoice_validate(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'open'}, context=context) return True @@ -1061,7 +1061,7 @@ class account_invoice(osv.osv): pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids']) for move_line in pay_ids: if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids: - raise osv.except_osv(_('Error !'), _('You cannot cancel an invoice which is partially paid! You need to unreconcile related payment entries first!')) + raise osv.except_osv(_('Error !'), _('You cannot cancel an invoice which is partially paid. You need to unreconcile related payment entries first.')) # First, set the invoices as cancelled and detach the move ids self.write(cr, uid, ids, {'state':'cancel', 'move_id':False}) @@ -1281,11 +1281,11 @@ class account_invoice(osv.osv): # Update the stored value (fields.function), so we write to trigger recompute self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) return True - + # ----------------------------------------- # OpenChatter notifications and need_action # ----------------------------------------- - + def _get_document_type(self, type): type_dict = { 'out_invoice': 'Customer invoice', @@ -1294,19 +1294,19 @@ class account_invoice(osv.osv): 'in_refund': 'Supplier Refund', } return type_dict.get(type, 'Invoice') - + def create_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id],body=_("%s created.") % (self._get_document_type(obj.type)), context=context) - + def confirm_paid_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id], body=_("%s paid.") % (self._get_document_type(obj.type)), context=context) - + def invoice_cancel_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id], body=_("%s cancelled.") % (self._get_document_type(obj.type)), context=context) - + account_invoice() class account_invoice_line(osv.osv): @@ -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': _('Selected Unit of Measure is not compatible with the Unit of Measure of the product.') + 'message': _('The selected 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 645dd16c541..6ce15529842 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -95,7 +95,7 @@ class account_move_line(osv.osv): if initial_bal and not context.get('periods', False) and not where_move_lines_by_date: #we didn't pass any filter in the context, and the initial balance can't be computed using only the fiscalyear otherwise entries will be summed twice #so we have to invalidate this query - raise osv.except_osv(_('Warning !'),_("You havenot supplied enough argument to compute the initial balance, please select a period and journal in the context.")) + raise osv.except_osv(_('Warning !'),_("You have not supplied enough arguments to compute the initial balance, please select a period and a journal in the context.")) if context.get('journal_ids', False): @@ -752,7 +752,7 @@ class account_move_line(osv.osv): else: currency_id = line.company_id.currency_id if line.reconcile_id: - raise osv.except_osv(_('Warning !'), _('Already Reconciled!')) + raise osv.except_osv(_('Warning !'), _('Already reconciled.')) if line.reconcile_partial_id: for line2 in line.reconcile_partial_id.line_partial_ids: if not line2.reconcile_id: @@ -823,15 +823,15 @@ class account_move_line(osv.osv): r = cr.fetchall() #TODO: move this check to a constraint in the account_move_reconcile object if not unrec_lines: - raise osv.except_osv(_('Error !'), _('Entry is already reconciled!')) + raise osv.except_osv(_('Error !'), _('Entry is already reconciled.')) account = account_obj.browse(cr, uid, account_id, context=context) if r[0][1] != None: - raise osv.except_osv(_('Error !'), _('Some entries are already reconciled !')) + raise osv.except_osv(_('Error !'), _('Some entries are already reconciled.')) if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \ (account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))): if not writeoff_acc_id: - raise osv.except_osv(_('Warning !'), _('You have to provide an account for the write off/exchange difference entry !')) + raise osv.except_osv(_('Warning !'), _('You have to provide an account for the write off/exchange difference entry.')) if writeoff > 0: debit = writeoff credit = 0.0 @@ -1092,7 +1092,7 @@ class account_move_line(osv.osv): if res[1] != 'draft': raise osv.except_osv(_('UserError!'), _('The account move (%s) for centralisation ' \ - 'has been confirmed!') % res[2]) + 'has been confirmed.') % res[2]) return res def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None): @@ -1139,9 +1139,9 @@ class account_move_line(osv.osv): if isinstance(ids, (int, long)): ids = [ids] if vals.get('account_tax_id', False): - raise osv.except_osv(_('Unable to change tax !'), _('You cannot change the tax, you should remove and recreate lines !')) + raise osv.except_osv(_('Unable to change tax!'), _('You cannot change the tax, you should remove and recreate lines.')) if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: - raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account!')) + raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account.')) if update_check: if ('account_id' in vals) or ('journal_id' in vals) or ('period_id' in vals) or ('move_id' in vals) or ('debit' in vals) or ('credit' in vals) or ('date' in vals): self._update_check(cr, uid, ids, context) @@ -1202,9 +1202,9 @@ class account_move_line(osv.osv): for line in self.browse(cr, uid, ids, context=context): err_msg = _('Move name (id): %s (%s)') % (line.move_id.name, str(line.move_id.id)) if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted): - raise osv.except_osv(_('Error !'), _('You cannot do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n%s.') % err_msg) + raise osv.except_osv(_('Error !'), _('You cannot do this modification on a confirmed entry. You can just change some non legal fields or you must unconfirm the journal entry first.\n%s.') % err_msg) if line.reconcile_id: - raise osv.except_osv(_('Error !'), _('You cannot do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n%s.') % err_msg) + raise osv.except_osv(_('Error !'), _('You cannot do this modification on a reconciled entry. You can just change some non legal fields or you must unreconcile first.\n%s.') % err_msg) t = (line.journal_id.id, line.period_id.id) if t not in done: self._update_journal_check(cr, uid, line.journal_id.id, line.period_id.id, context) @@ -1224,7 +1224,7 @@ class account_move_line(osv.osv): if company_id: vals['company_id'] = company_id[0] if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: - raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account!')) + raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account.')) if 'journal_id' in vals: context['journal_id'] = vals['journal_id'] if 'period_id' in vals: @@ -1237,10 +1237,10 @@ class account_move_line(osv.osv): if 'period_id' not in context or not isinstance(context.get('period_id', ''), (int, long)): period_candidate_ids = self.pool.get('account.period').name_search(cr, uid, name=context.get('period_id','')) if len(period_candidate_ids) != 1: - raise osv.except_osv(_('Encoding error!'), _('No period is found or more than one period found for the given date.')) + raise osv.except_osv(_('Encoding error!'), _('No period found or more than one period found for the given date.')) context['period_id'] = period_candidate_ids[0][0] if not context.get('journal_id', False) and context.get('search_default_journal_id', False): - context['journal_id'] = context.get('search_default_journal_id') + context['journal_id'] = context.get('search_default_journal_id') self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context) move_id = vals.get('move_id', False) journal = journal_obj.browse(cr, uid, context['journal_id'], context=context) @@ -1263,7 +1263,7 @@ class account_move_line(osv.osv): move_id = move_obj.create(cr, uid, v, context) vals['move_id'] = move_id else: - raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece!\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) + raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) ok = not (journal.type_control_ids or journal.account_control_ids) if ('account_id' in vals): account = account_obj.browse(cr, uid, vals['account_id'], context=context) @@ -1288,7 +1288,7 @@ class account_move_line(osv.osv): vals['amount_currency'] = cur_obj.compute(cr, uid, account.company_id.currency_id.id, account.currency_id.id, vals.get('debit', 0.0)-vals.get('credit', 0.0), context=ctx) if not ok: - raise osv.except_osv(_('Bad account !'), _('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal !')) + raise osv.except_osv(_('Bad account !'), _('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal.')) if vals.get('analytic_account_id',False): if journal.analytic_journal_id: diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 3711de09b2a..c93c3e02ee3 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -89,7 +89,7 @@ class common_report_header(object): return '' def _get_sortby(self, data): - raise (_('Error!'), _('Not implemented!')) + raise (_('Error!'), _('Not implemented.')) def _get_filter(self, data): if data.get('form', False) and data['form'].get('filter', False): diff --git a/addons/account/wizard/account_change_currency.py b/addons/account/wizard/account_change_currency.py index 4a49f4ded0b..d51df1e4d70 100644 --- a/addons/account/wizard/account_change_currency.py +++ b/addons/account/wizard/account_change_currency.py @@ -35,7 +35,7 @@ class account_change_currency(osv.osv_memory): context = {} if context.get('active_id',False): if obj_inv.browse(cr, uid, context['active_id']).state != 'draft': - raise osv.except_osv(_('Error!'), _('You can only change currency for Draft Invoice !')) + raise osv.except_osv(_('Error!'), _('You can only change currency for Draft Invoice.')) pass def change_currency(self, cr, uid, ids, context=None): @@ -56,18 +56,18 @@ class account_change_currency(osv.osv_memory): if invoice.company_id.currency_id.id == invoice.currency_id.id: new_price = line.price_unit * rate if new_price <= 0: - raise osv.except_osv(_('Error!'), _('New currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('New currency is not configured properly.')) if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id == new_currency: old_rate = invoice.currency_id.rate if old_rate <= 0: - raise osv.except_osv(_('Error!'), _('Current currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('Current currency is not configured properly.')) new_price = line.price_unit / old_rate if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id != new_currency: old_rate = invoice.currency_id.rate if old_rate <= 0: - raise osv.except_osv(_('Error!'), _('Current currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('Current currency is not configured properly.')) new_price = (line.price_unit / old_rate ) * rate obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price}) obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context) diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index 85b36b5e778..a79f9b22770 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -51,9 +51,9 @@ class account_fiscalyear_close(osv.osv_memory): """ def _reconcile_fy_closing(cr, uid, ids, context=None): """ - This private function manually do the reconciliation on the account_move_line given as `ids´, and directly + This private function manually do the reconciliation on the account_move_line given as `ids´, and directly through psql. It's necessary to do it this way because the usual `reconcile()´ function on account.move.line - object is really resource greedy (not supposed to work on reconciliation between thousands of records) and + object is really resource greedy (not supposed to work on reconciliation between thousands of records) and it does a lot of different computation that are useless in this particular case. """ #check that the reconcilation concern journal entries from only one company @@ -85,7 +85,7 @@ class account_fiscalyear_close(osv.osv_memory): fy2_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall())) if not fy_period_set or not fy2_period_set: - raise osv.except_osv(_('UserError!'), _('The periods to generate opening entries were not found.')) + raise osv.except_osv(_('UserError!'), _('The periods to generate opening entries cannot be found.')) period = obj_acc_period.browse(cr, uid, data[0].period_id.id, context=context) new_fyear = obj_acc_fiscalyear.browse(cr, uid, data[0].fy2_id.id, context=context) @@ -100,7 +100,7 @@ class account_fiscalyear_close(osv.osv_memory): _('The journal must have default credit and debit account.')) if (not new_journal.centralisation) or new_journal.entry_posted: raise osv.except_osv(_('UserError!'), - _('The journal must have centralized counterpart without the Skipping draft state option checked!')) + _('The journal must have centralized counterpart without the Skipping draft state option checked.')) #delete existing move and move lines if any move_ids = obj_acc_move.search(cr, uid, [ diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 96eb0e6a944..be3c9ccaca6 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -108,7 +108,7 @@ class account_invoice_refund(osv.osv_memory): if inv.state in ['draft', 'proforma2', 'cancel']: raise osv.except_osv(_('Error !'), _('Cannot %s draft/proforma/cancel invoice.') % (mode)) if inv.reconciled and mode in ('cancel', 'modify'): - raise osv.except_osv(_('Error !'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice.') % (mode)) + raise osv.except_osv(_('Error !'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only refund this invoice.') % (mode)) if form.period.id: period = form.period.id else: @@ -144,7 +144,7 @@ class account_invoice_refund(osv.osv_memory): if not period: raise osv.except_osv(_('Data Insufficient !'), \ - _('No Period is found on Invoice!')) + _('No period found on the invoice.')) refund_id = inv_obj.refund(cr, uid, [inv.id], date, period, description, journal_id) refund = inv_obj.browse(cr, uid, refund_id[0], context=context) diff --git a/addons/account/wizard/account_invoice_state.py b/addons/account/wizard/account_invoice_state.py index 78ebe5de5fa..55eab584040 100644 --- a/addons/account/wizard/account_invoice_state.py +++ b/addons/account/wizard/account_invoice_state.py @@ -41,7 +41,7 @@ class account_invoice_confirm(osv.osv_memory): for record in data_inv: if record['state'] not in ('draft','proforma','proforma2'): - raise osv.except_osv(_('Warning!'), _("Selected Invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state!")) + raise osv.except_osv(_('Warning!'), _("Selected invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state.")) wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_open', cr) return {'type': 'ir.actions.act_window_close'} @@ -65,7 +65,7 @@ class account_invoice_cancel(osv.osv_memory): for record in data_inv: if record['state'] in ('cancel','paid'): - raise osv.except_osv(_('Warning!'), _("Selected Invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state!")) + raise osv.except_osv(_('Warning!'), _("Selected invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state.")) wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_cancel', cr) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index d7c692e0619..f14e8c555e6 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -83,25 +83,25 @@ class account_move_journal(osv.osv_memory): if context: if not view_id: return res - + period_pool = self.pool.get('account.period') journal_pool = self.pool.get('account.journal') - + journal_id = self._get_journal(cr, uid, context) period_id = self._get_period(cr, uid, context) - + journal = False if journal_id: journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name'] journal_string = _("Journal: %s") % tools.ustr(journal) else: journal_string = _("Journal: All") - + period = False if period_id: period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] period_string = _("Period: %s") % tools.ustr(period) - + open_string = _("Open") view = """
@@ -116,7 +116,7 @@ class account_move_journal(osv.osv_memory):