diff --git a/addons/account/account.py b/addons/account/account.py index cbba0237c78..fa30b20f2ca 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() @@ -136,7 +136,7 @@ class account_account_type(osv.osv): def _get_current_report_type(self, cr, uid, ids, name, arg, context=None): obj_data = self.pool.get('ir.model.data') - obj_financial_report = self.pool.get('account.financial.report') + obj_financial_report = self.pool.get('account.financial.report') res = {} financial_report_ref = { 'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context), @@ -154,7 +154,7 @@ class account_account_type(osv.osv): def _save_report_type(self, cr, uid, account_type_id, field_name, field_value, arg, context=None): obj_data = self.pool.get('ir.model.data') - obj_financial_report = self.pool.get('account.financial.report') + obj_financial_report = self.pool.get('account.financial.report') #unlink if it exists somewhere in the financial reports related to BS or PL financial_report_ref = { 'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context), @@ -179,7 +179,7 @@ class account_account_type(osv.osv): 'Balance' will generally be used for cash accounts. 'Detail' will copy each existing journal item of the previous year, even the reconciled ones. 'Unreconciled' will copy only the journal items that were unreconciled on the first day of the new fiscal year."""), - 'report_type': fields.function(_get_current_report_type, fnct_inv=_save_report_type, type='selection', string='P&L / BS Category', + 'report_type': fields.function(_get_current_report_type, fnct_inv=_save_report_type, type='selection', string='P&L / BS Category', selection= [('none','/'), ('income', _('Profit & Loss (Income account)')), ('expense', _('Profit & Loss (Expense account)')), @@ -404,12 +404,12 @@ class account_account(osv.osv): journal_obj = self.pool.get('account.journal') jids = journal_obj.search(cr, uid, [('type','=','situation'),('centralisation','=',1),('company_id','=',account.company_id.id)], context=context) if not jids: - raise osv.except_osv(_('Error!'),_("You need an Opening journal with centralisation checked to set the initial balance!")) + raise osv.except_osv(_('Error!'),_("You need an Opening journal with centralisation checked to set the initial balance.")) 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 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, [ @@ -426,7 +426,7 @@ class account_account(osv.osv): }, context=context) else: if diff<0.0: - raise osv.except_osv(_('Error!'),_("Unable to adapt the initial balance (negative value)!")) + raise osv.except_osv(_('Error!'),_("Unable to adapt the initial balance (negative value).")) nameinv = (name=='credit' and 'debit') or 'credit' move_id = move_obj.create(cr, uid, { 'name': _('Opening Balance'), @@ -541,9 +541,9 @@ class account_account(osv.osv): return True _constraints = [ - (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']), - (_check_type, 'Configuration Error! \nYou can not define children to an account with internal type different of "View"! ', ['type']), - (_check_account_type, 'Configuration Error! \nYou can not select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable"! ', ['user_type','type']), + (_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']), + (_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']), + (_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']), ] _sql_constraints = [ ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') @@ -619,14 +619,14 @@ 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 can not desactivate 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 can not 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) 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): @@ -639,10 +639,10 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): #Check for 'Closed' type if old_type == 'closed' and new_type !='closed': - raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type which contains journal items!")) + raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type which contains journal items!")) #Check for change From group1 to group2 and vice versa if (old_type in group1 and new_type in group2) or (old_type in group2 and new_type in group1): - raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from '%s' to '%s' type as it contains journal items!") % (old_type,new_type,)) + raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from '%s' to '%s' type as it contains journal items!") % (old_type,new_type,)) return True def write(self, cr, uid, ids, vals, context=None): @@ -661,7 +661,7 @@ class account_account(osv.osv): # Allow the write if the value is the same for i in [i['company_id'][0] for i in self.read(cr,uid,ids,['company_id'])]: if vals['company_id']!=i: - raise osv.except_osv(_('Warning !'), _('You cannot change the owner company of an account that already contains journal items.')) + raise osv.except_osv(_('Warning!'), _('You cannot change the owner company of an account that already contains journal items.')) if 'active' in vals and not vals['active']: self._check_moves(cr, uid, ids, "write", context=context) if 'type' in vals.keys(): @@ -730,7 +730,7 @@ class account_journal(osv.osv): 'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells OpenERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."), 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]", help="It acts as a default account for credit amount"), 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]", help="It acts as a default account for debit amount"), - 'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."), + 'centralisation': fields.boolean('Centralised Counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."), 'update_posted': fields.boolean('Allow Cancelling Entries', help="Check this box if you want to allow the cancellation the entries related to this journal or of the invoice related to this journal"), 'group_invoice_lines': fields.boolean('Group Invoice Lines', help="If this box is checked, the system will try to group the accounting lines when generating them from invoices."), 'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="This field contains the information related to the numbering of the journal entries of this journal.", required=True), @@ -768,7 +768,7 @@ class account_journal(osv.osv): return True _constraints = [ - (_check_currency, 'Configuration error! The currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']), + (_check_currency, 'Configuration error!\nThe currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']), ] def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False): @@ -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 can not 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 before his end date.', ['date_start','date_stop']) + (_check_duration, 'Error!\nThe 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 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 @@ -1032,8 +1032,8 @@ class account_period(osv.osv): return True _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_duration, 'Error!\nThe duration of the Period(s) is/are invalid.', ['date_stop']), + (_check_year_limit, 'Error!\nThe 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 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 can not modify company of this period as some journal items exists.')) + 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): @@ -1093,9 +1093,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 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 can not 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 can not 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 can not 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(_('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'), _('No sequence defined 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}) @@ -1351,14 +1351,14 @@ class account_move(osv.osv): if not top_common: top_common = top_account elif top_account.id != top_common.id: - raise osv.except_osv(_('Error !'), - _('You cannot validate this journal entry because account "%s" does not belong to chart of accounts "%s"!') % (account.name, top_common.name)) + raise osv.except_osv(_('Error!'), + _('You cannot validate this journal entry because account "%s" does not belong to chart of accounts "%s".') % (account.name, top_common.name)) return self.post(cursor, user, ids, context=context) 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 can not 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 '\ @@ -1445,8 +1445,8 @@ class account_move(osv.osv): obj_move_line = self.pool.get('account.move.line') for move in self.browse(cr, uid, ids, context=context): if move['state'] != 'draft': - raise osv.except_osv(_('UserError'), - _('You can not delete a posted journal entry "%s"!') % \ + raise osv.except_osv(_('User Error!'), + _('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 @@ -1474,16 +1474,16 @@ class account_move(osv.osv): account_id = move.journal_id.default_debit_account_id.id mode2 = 'debit' if not account_id: - raise osv.except_osv(_('UserError'), - _('There is no default default debit account defined \n' \ - 'on journal "%s"') % move.journal_id.name) + raise osv.except_osv(_('User Error!'), + _('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'), - _('There is no default default credit account defined \n' \ - 'on journal "%s"') % move.journal_id.name) + raise osv.except_osv(_('User Error!'), + _('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 # or create it if it doesn't exist @@ -1577,11 +1577,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 @@ -1833,7 +1833,7 @@ class account_tax_code(osv.osv): _check_recursion = check_cycle _constraints = [ - (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']) + (_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']) ] _order = 'code' @@ -2118,7 +2118,7 @@ class account_tax(osv.osv): } def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None): - _logger.warning("Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included") + _logger.warning("Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included.") return self._compute(cr, uid, taxes, price_unit, quantity, product, partner) def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None): @@ -2307,7 +2307,7 @@ class account_model(osv.osv): date_maturity = context.get('date',time.strftime('%Y-%m-%d')) if line.date_maturity == 'partner': if not line.partner_id: - raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \ + raise osv.except_osv(_('Error!'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \ "\nPlease define partner on it!")%(line.name, model.name)) if line.partner_id.property_payment_term: payment_term_id = line.partner_id.property_payment_term.id @@ -2521,8 +2521,8 @@ 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_recursion, 'Error!\nYou cannot create recursive account templates.', ['parent_id']), + (_check_type, 'Configuration Error!\nYou cannot define children to an account that has internal type other than "View".', ['type']), ] @@ -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 can not 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 @@ -2729,7 +2729,7 @@ class account_tax_code_template(osv.osv): _check_recursion = check_cycle _constraints = [ - (_check_recursion, 'Error ! You can not create recursive Tax Codes.', ['parent_id']) + (_check_recursion, 'Error!\nYou cannot create recursive Tax Codes.', ['parent_id']) ] _order = 'code,name' account_tax_code_template() @@ -2742,7 +2742,7 @@ class account_chart_template(osv.osv): _columns={ 'name': fields.char('Name', size=64, required=True), 'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'), - 'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"), + 'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"), 'visible': fields.boolean('Can be Visible?', help="Set this to False if you don't want this template to be used actively in the wizard that generate Chart of Accounts from templates, this is useful when you want to generate accounts of this template only when loading its child template."), 'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sale and purchase rates or choose from list of taxes. This last choice assumes that the set of tax defined on this template is complete'), 'account_root_id': fields.many2one('account.account.template', 'Root Account', domain=[('parent_id','=',False)]), @@ -3026,7 +3026,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): return res def default_get(self, cr, uid, fields, context=None): - res = super(wizard_multi_charts_accounts, self).default_get(cr, uid, fields, context=context) + res = super(wizard_multi_charts_accounts, self).default_get(cr, uid, fields, context=context) tax_templ_obj = self.pool.get('account.tax.template') if 'bank_accounts_id' in fields: @@ -3102,7 +3102,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): # Get the analytic journal data = False if journal_type in ('sale', 'sale_refund'): - data = obj_data.get_object_reference(cr, uid, 'account', 'analytic_journal_sale') + data = obj_data.get_object_reference(cr, uid, 'account', 'analytic_journal_sale') elif journal_type in ('purchase', 'purchase_refund'): pass elif journal_type == 'general': @@ -3128,7 +3128,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): if journal_type in ('general', 'situation'): data = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_view') elif journal_type in ('sale_refund', 'purchase_refund'): - data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_refund_journal_view') + data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_refund_journal_view') else: data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_journal_view') return data and data[1] or False @@ -3357,7 +3357,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): def _prepare_bank_journal(self, cr, uid, line, current_num, default_account_id, company_id, context=None): ''' - This function prepares the value to use for the creation of a bank journal created through the wizard of + This function prepares the value to use for the creation of a bank journal created through the wizard of generating COA from templates. :param line: dictionary containing the values encoded by the user related to his bank account @@ -3375,9 +3375,9 @@ class wizard_multi_charts_accounts(osv.osv_memory): tmp = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_bank_view') view_id_cash = tmp and tmp[1] or False - # we need to loop again to find next number for journal code + # we need to loop again to find next number for journal code # because we can't rely on the value current_num as, - # its possible that we already have bank journals created (e.g. by the creation of res.partner.bank) + # its possible that we already have bank journals created (e.g. by the creation of res.partner.bank) # and the next number for account code might have been already used before for journal for num in xrange(current_num, 100): # journal_code has a maximal size of 5, hence we can enforce the boundary num < 100 @@ -3386,7 +3386,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): if not ids: break else: - raise osv.except_osv(_('Error'), _('Cannot generate an unused journal code.')) + raise osv.except_osv(_('Error!'), _('Cannot generate an unused journal code.')) vals = { 'name': line['acc_name'], @@ -3464,7 +3464,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): journal_data.append(vals) ref_acc_bank = obj_wizard.chart_template_id.bank_account_view_id if journal_data and not ref_acc_bank.code: - raise osv.except_osv(_('Configuration Error !'), _('The bank account defined on the selected chart of accounts hasn\'t a code.')) + raise osv.except_osv(_('Configuration Error!'), _('You have to set a code for the bank account defined on the selected chart of accounts.')) current_num = 1 for line in journal_data: diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 06de5a3e43e..2117f6e49ea 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -87,18 +87,18 @@ class account_analytic_line(osv.osv): if not a: a = prod.categ_id.property_account_expense_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no expense account defined ' \ - 'for this product: "%s" (id:%d)') % \ + 'for this product: "%s" (id:%d).') % \ (prod.name, prod.id,)) else: a = prod.product_tmpl_id.property_account_income.id if not a: a = prod.categ_id.property_account_income_categ.id if not a: - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('There is no income account defined ' \ - 'for this product: "%s" (id:%d)') % \ + 'for this product: "%s" (id:%d).') % \ (prod.name, prod_id,)) flag = False diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 11bcf565260..8df291a98d1 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -192,11 +192,11 @@ class account_bank_statement(osv.osv): 'ref': st_line.ref, } - def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, + def _prepare_bank_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, context=None): """Compute the args to build the dict of values to create the bank move line from a - statement line by calling the _prepare_move_line_vals. This method may be - overridden to implement custom move generation (making sure to call super() to + statement line by calling the _prepare_move_line_vals. This method may be + overridden to implement custom move generation (making sure to call super() to establish a clean extension chain). :param browse_record st_line: account.bank.statement.line record to @@ -219,12 +219,12 @@ class account_bank_statement(osv.osv): res_currency_obj = self.pool.get('res.currency') amt_cur = -res_currency_obj.compute(cr, uid, company_currency_id, cur_id, amount, context=context) - res = self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit, + res = self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit, amount_currency=amt_cur, currency_id=cur_id, analytic_id=anl_id, context=context) return res def _get_counter_part_account(sefl, cr, uid, st_line, context=None): - """Retrieve the account to use in the counterpart move. + """Retrieve the account to use in the counterpart move. This method may be overridden to implement custom move generation (making sure to call super() to establish a clean extension chain). @@ -237,7 +237,7 @@ class account_bank_statement(osv.osv): return st_line.statement_id.journal_id.default_debit_account_id.id def _get_counter_part_partner(sefl, cr, uid, st_line, context=None): - """Retrieve the partner to use in the counterpart move. + """Retrieve the partner to use in the counterpart move. This method may be overridden to implement custom move generation (making sure to call super() to establish a clean extension chain). @@ -247,11 +247,11 @@ class account_bank_statement(osv.osv): """ return st_line.partner_id and st_line.partner_id.id or False - def _prepare_counterpart_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, + def _prepare_counterpart_move_line(self, cr, uid, st_line, move_id, amount, company_currency_id, context=None): """Compute the args to build the dict of values to create the counter part move line from a - statement line by calling the _prepare_move_line_vals. This method may be - overridden to implement custom move generation (making sure to call super() to + statement line by calling the _prepare_move_line_vals. This method may be + overridden to implement custom move generation (making sure to call super() to establish a clean extension chain). :param browse_record st_line: account.bank.statement.line record to @@ -271,12 +271,12 @@ class account_bank_statement(osv.osv): if st_line.statement_id.currency.id <> company_currency_id: amt_cur = st_line.amount cur_id = st_line.statement_id.currency.id - return self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit, + return self._prepare_move_line_vals(cr, uid, st_line, move_id, debit, credit, amount_currency = amt_cur, currency_id = cur_id, account_id = account_id, partner_id = partner_id, context=context) def _prepare_move_line_vals(self, cr, uid, st_line, move_id, debit, credit, currency_id = False, - amount_currency= False, account_id = False, analytic_id = False, + amount_currency= False, account_id = False, analytic_id = False, partner_id = False, context=None): """Prepare the dict of values to create the move line from a statement line. All non-mandatory args will replace the default computed one. @@ -350,12 +350,12 @@ class account_bank_statement(osv.osv): amount = res_currency_obj.compute(cr, uid, st.currency.id, company_currency_id, st_line.amount, context=context) - bank_move_vals = self._prepare_bank_move_line(cr, uid, st_line, move_id, amount, + bank_move_vals = self._prepare_bank_move_line(cr, uid, st_line, move_id, amount, company_currency_id, context=context) move_line_id = account_move_line_obj.create(cr, uid, bank_move_vals, context=context) torec.append(move_line_id) - counterpart_move_vals = self._prepare_counterpart_move_line(cr, uid, st_line, move_id, + counterpart_move_vals = self._prepare_counterpart_move_line(cr, uid, st_line, move_id, amount, company_currency_id, context=context) account_move_line_obj.create(cr, uid, counterpart_move_vals, context=context) @@ -364,7 +364,7 @@ class account_bank_statement(osv.osv): context=context).line_id], context=context): if line.state <> 'valid': - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('Journal item "%s" is not valid.') % line.name) # Bank statements will not consider boolean on journal entry_posted @@ -377,7 +377,7 @@ class account_bank_statement(osv.osv): def balance_check(self, cr, uid, st_id, journal_type='bank', context=None): st = self.browse(cr, uid, st_id, context=context) if not ((abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001) or (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001)): - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end)) return True @@ -401,7 +401,7 @@ class account_bank_statement(osv.osv): self.balance_check(cr, uid, st.id, journal_type=j_type, context=context) if (not st.journal_id.default_credit_account_id) \ or (not st.journal_id.default_debit_account_id): - raise osv.except_osv(_('Configuration Error !'), + raise osv.except_osv(_('Configuration Error!'), _('Please verify that an account is defined in the journal.')) if not st.name == '/': @@ -415,7 +415,7 @@ class account_bank_statement(osv.osv): for line in st.move_line_ids: if line.state <> 'valid': - raise osv.except_osv(_('Error !'), + raise osv.except_osv(_('Error!'), _('The account entries lines are not in valid state.')) for st_line in st.line_ids: if st_line.analytic_account_id: @@ -445,7 +445,7 @@ class account_bank_statement(osv.osv): account_move_obj.unlink(cr, uid, ids, context) done.append(st.id) return self.write(cr, uid, done, {'state':'draft'}, context=context) - + def _compute_balance_end_real(self, cr, uid, journal_id, context=None): cr.execute('SELECT balance_end_real \ FROM account_bank_statement \ @@ -469,7 +469,7 @@ class account_bank_statement(osv.osv): if t['state'] in ('draft'): unlink_ids.append(t['id']) else: - raise osv.except_osv(_('Invalid action !'), _('In order to delete a bank statement, you must first cancel it to delete related journal items.')) + raise osv.except_osv(_('Invalid Action!'), _('In order to delete a bank statement, you must first cancel it to delete related journal items.')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index ae225cc60de..9af0dcf60f4 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -169,7 +169,7 @@ class account_cash_statement(osv.osv): return result _columns = { - 'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Total Cash Transactions", + 'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Total Transactions", store = { 'account.bank.statement': (lambda self, cr, uid, ids, context=None: ids, ['line_ids','move_line_ids'], 10), 'account.bank.statement.line': (_get_statement_from_line, ['amount'], 10), @@ -238,7 +238,7 @@ class account_cash_statement(osv.osv): for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} if not self._user_allow(cr, uid, statement.id, context=context): - raise osv.except_osv(_('Error !'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, ))) + raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, ))) if statement.name and statement.name == '/': c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id} @@ -282,8 +282,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 !'), - _('There is 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_installer.xml b/addons/account/account_installer.xml index 175b910b0b8..c92d4eda602 100644 --- a/addons/account/account_installer.xml +++ b/addons/account/account_installer.xml @@ -9,7 +9,9 @@ Accounting Application Configuration diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index b1c5db23df6..064ba419ebd 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,15 +364,15 @@ 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!')) + _('There is no Sale/Purchase Journal(s) defined.')) else: - raise orm.except_orm(_('Unknown Error'), str(e)) + raise orm.except_orm(_('Unknown Error!'), str(e)) def invoice_print(self, cr, uid, ids, context=None): ''' This function prints the invoice and mark it as sent, so that we can see more easily the next step of the workflow ''' - assert len(ids) == 1, 'This option should only be used for a single id at a time' + assert len(ids) == 1, 'This option should only be used for a single id at a time.' self.write(cr, uid, ids, {'sent': True}, context=context) datas = { 'ids': ids, @@ -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 can not 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 @@ -458,8 +458,8 @@ class account_invoice(osv.osv): rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False 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.')) + raise osv.except_osv(_('Configuration Error!'), + _('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]) @@ -521,7 +521,7 @@ class account_invoice(osv.osv): pterm_list.sort() res = {'value':{'date_due': pterm_list[-1]}} else: - raise osv.except_osv(_('Data Insufficient !'), _('The payment term of supplier does not have a payment term line!')) + raise osv.except_osv(_('Insufficient Data!'), _('The payment term of supplier does not have a payment term line.')) return res def onchange_invoice_line(self, cr, uid, ids, lines): @@ -553,8 +553,8 @@ class account_invoice(osv.osv): rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False 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.')) + raise osv.except_osv(_('Configuration Error!'), + _('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: @@ -568,16 +568,16 @@ class account_invoice(osv.osv): if line.account_id.company_id.id != company_id: 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.')) + raise osv.except_osv(_('Configuration Error!'), + _('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: for inv_line in invoice_line: 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.')) + raise osv.except_osv(_('Configuration Error!'), + _('Invoice line account\'s company and invoice\'s compnay 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, []) @@ -759,13 +759,13 @@ class account_invoice(osv.osv): key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id) tax_key.append(key) if not key in compute_taxes: - raise osv.except_osv(_('Warning !'), _('Global taxes defined, but they are not in invoice lines !')) + raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !')) base = compute_taxes[key]['base'] if abs(base - tax.base) > inv.company_id.currency_id.rounding: - raise osv.except_osv(_('Warning !'), _('Tax base different!\nClick on compute to update the tax base.')) + raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.')) for key in compute_taxes: if not key in tax_key: - raise osv.except_osv(_('Warning !'), _('Taxes are missing!\nClick on compute button.')) + raise osv.except_osv(_('Warning!'), _('Taxes are missing!\nClick on compute button.')) def compute_invoice_totals(self, cr, uid, inv, company_currency, ref, invoice_move_lines): total = 0 @@ -835,12 +835,12 @@ class account_invoice(osv.osv): context = {} for inv in self.browse(cr, uid, ids, context=context): if not inv.journal_id.sequence_id: - raise osv.except_osv(_('Error !'), _('Please define sequence on the journal related to this invoice.')) + raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.')) if not inv.invoice_line: 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 !'), _("Can not 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) @@ -947,8 +947,8 @@ class account_invoice(osv.osv): journal_id = inv.journal_id.id journal = journal_obj.browse(cr, uid, journal_id, context=ctx) if journal.centralisation: - raise osv.except_osv(_('UserError'), - _('You cannot create an invoice on a centralised journal. Uncheck the centralised counterpart box in the related journal from the configuration menu.')) + raise osv.except_osv(_('User Error!'), + _('You cannot create an invoice on a centralized journal. Uncheck the centralized counterpart box in the related journal from the configuration menu.')) line = self.finalize_invoice_move_lines(cr, uid, inv, line) @@ -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 can not 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}) @@ -1187,7 +1187,7 @@ class account_invoice(osv.osv): if context is None: context = {} #TODO check if we can use different period for payment and the writeoff line - assert len(ids)==1, "Can only pay one invoice at a time" + assert len(ids)==1, "Can only pay one invoice at a time." invoice = self.browse(cr, uid, ids[0], context=context) src_account_id = invoice.account_id.id # Take the seq as name for move @@ -1273,7 +1273,7 @@ class account_invoice(osv.osv): else: 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)") % \ + msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining).") % \ (name, pay_amount, code, invoice.amount_total, code, total, code) self.message_append_note(cr, uid, [inv_id], body=msg, context=context) self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context) @@ -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': _('You selected an Unit of Measure which is not compatible with 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_invoice_view.xml b/addons/account/account_invoice_view.xml index 09741068724..5aca260bc12 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -155,8 +155,10 @@

-

@@ -300,9 +302,11 @@

-

@@ -338,7 +342,7 @@ - + 'valid': - raise osv.except_osv(_('Error'), + raise osv.except_osv(_('Error!'), _('Entry "%s" is not valid !') % line.name) credit += line['credit'] debit += line['debit'] @@ -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 @@ -1090,9 +1090,9 @@ class account_move_line(osv.osv): res = cr.fetchone() if res: if res[1] != 'draft': - raise osv.except_osv(_('UserError'), + raise osv.except_osv(_('User Error!'), _('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 can not 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 can not 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) @@ -1186,7 +1186,7 @@ class account_move_line(osv.osv): result = cr.fetchall() for (state,) in result: if state == 'done': - raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.')) + raise osv.except_osv(_('Error!'), _('You cannot add/modify entries in a closed journal.')) if not result: journal = journal_obj.browse(cr, uid, journal_id, context=context) period = period_obj.browse(cr, uid, period_id, context=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 can not 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 can not 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 can not 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 found or more than one period found for the given date.')) + raise osv.except_osv(_('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 !'), _('Can not 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 can not 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/account_report.xml b/addons/account/account_report.xml index 7b574c8960e..d258bb0b140 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -20,6 +20,7 @@ rml="account/report/account_print_invoice.rml" string="Invoices" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" + attachment_use="True" usage="default" /> diff --git a/addons/account/account_unit_test.xml b/addons/account/account_unit_test.xml index ad4540b9806..7795c2700cc 100644 --- a/addons/account/account_unit_test.xml +++ b/addons/account/account_unit_test.xml @@ -5,7 +5,7 @@ - + draft out_invoice diff --git a/addons/account/demo/account_invoice_demo.xml b/addons/account/demo/account_invoice_demo.xml index 0ba0fe3712f..280eeeb9e94 100644 --- a/addons/account/demo/account_invoice_demo.xml +++ b/addons/account/demo/account_invoice_demo.xml @@ -16,7 +16,7 @@ - + @@ -26,10 +26,10 @@ - + - - [RPAN100] Rear Panel SHE100 + + Toner Cartridge @@ -39,10 +39,10 @@ - + - - [RCK200] Rack 200cm + + Zed+ Antivirus diff --git a/addons/account/i18n/mn.po b/addons/account/i18n/mn.po index 343f9fc55cb..b94027a9411 100644 --- a/addons/account/i18n/mn.po +++ b/addons/account/i18n/mn.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-02-08 00:35+0000\n" -"PO-Revision-Date: 2012-05-10 17:26+0000\n" -"Last-Translator: Raphael Collet (OpenERP) \n" +"PO-Revision-Date: 2012-08-07 07:42+0000\n" +"Last-Translator: gobi \n" "Language-Team: Mongolian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-08-07 05:06+0000\n" -"X-Generator: Launchpad (build 15745)\n" +"X-Launchpad-Export-Date: 2012-08-08 04:36+0000\n" +"X-Generator: Launchpad (build 15757)\n" #. module: account #: view:account.invoice.report:0 @@ -4794,7 +4794,7 @@ msgid "" "\"View\"! " msgstr "" "Тохиргооны Алдаа!\n" -"\"Харагдаж\" төрлөөс өөр дотоод төрөлтэй дансанд дэд данс үүсгэж болохгүй! " +"\"Харагдац\" төрлөөс өөр дотоод төрөлтэй дансанд дэд данс үүсгэж болохгүй! " #. module: account #: code:addons/account/account.py:923 diff --git a/addons/account/installer.py b/addons/account/installer.py index 4fc4754ea3f..60a34628b1b 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -91,7 +91,7 @@ class account_installer(osv.osv_memory): def check_unconfigured_cmp(self, cr, uid, context=None): """ check if there are still unconfigured companies """ if not self.get_unconfigured_cmp(cr, uid, context=context): - raise osv.except_osv(_('No unconfigured company !'), _("There are currently no company without chart of account. The wizard will therefore not be executed.")) + raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed.")) def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): if context is None:context = {} diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index eddc744c76d..d83571b314e 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -106,8 +106,8 @@ - - + +
diff --git a/addons/account/project/analytic_account_demo.xml b/addons/account/project/analytic_account_demo.xml index 2ca0e50e784..b53b76969ab 100644 --- a/addons/account/project/analytic_account_demo.xml +++ b/addons/account/project/analytic_account_demo.xml @@ -85,14 +85,14 @@ normal open - + Seagate P2 normal open - + Magasin BML 1 @@ -106,20 +106,20 @@ - + open Agrolait normal - + Asustek normal - + DistriPC @@ -127,22 +127,22 @@ normal - - Sednacom + + Spark Systems normal - + open - - Thymbra + + Nebula normal - + open @@ -159,13 +159,13 @@ normal - + OpenERP SA AT Work normal - + Camp to Camp @@ -173,7 +173,7 @@ normal - + open diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index c0365875bdc..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/res_config_view.xml b/addons/account/res_config_view.xml index a4a4baa0a2b..79a65f70414 100644 --- a/addons/account/res_config_view.xml +++ b/addons/account/res_config_view.xml @@ -42,7 +42,7 @@ - +