[IMP] Improved warning messages for account module
bzr revid: pso@tinyerp.com-20120725073357-kcdgglpmbxrtbq6d
This commit is contained in:
parent
1e3535e877
commit
238bbc539a
|
@ -123,7 +123,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()
|
||||
|
@ -407,7 +407,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 defined, please create one to set the initial balance!"))
|
||||
raise osv.except_osv(_('Error!'),_("No opening/closing period is defined, please create one to set the initial balance!"))
|
||||
|
||||
move_obj = self.pool.get('account.move.line')
|
||||
move_id = move_obj.search(cr, uid, [
|
||||
|
@ -539,9 +539,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 ! You 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 !')
|
||||
|
@ -617,9 +617,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 can not desactivate an account that contains some journal items.'))
|
||||
raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains some 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 containing 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)
|
||||
|
@ -788,7 +788,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 !'), _('You cannot modify the company of this journal as its related record exist in journal items.'))
|
||||
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def create_sequence(self, cr, uid, vals, context=None):
|
||||
|
@ -964,7 +964,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 !'), _('No fiscal year is defined for this date !\nPlease create one from the configuration of the accounting menu.'))
|
||||
else:
|
||||
return []
|
||||
return ids
|
||||
|
@ -1053,7 +1053,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 !'), _('No period is defined for this date: %s !\nPlease create one.')%dt)
|
||||
return ids
|
||||
|
||||
def action_draft(self, cr, uid, ids, *args):
|
||||
|
@ -1091,9 +1091,9 @@ class account_period(osv.osv):
|
|||
period_date_stop = period_to.date_stop
|
||||
company2_id = period_to.company_id.id
|
||||
if company1_id != company2_id:
|
||||
raise osv.except_osv(_('Error'), _('You should choose the periods that belong 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 than End period.'))
|
||||
raise osv.except_osv(_('Error!'), _('Start period should be smaller than End period.'))
|
||||
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
|
||||
if period_from.special:
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
|
||||
|
@ -1132,7 +1132,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):
|
||||
|
@ -1301,7 +1301,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 centralized journal.',
|
||||
['journal_id']),
|
||||
]
|
||||
|
||||
|
@ -1312,7 +1312,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(_('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" !'))
|
||||
obj_sequence = self.pool.get('ir.sequence')
|
||||
for move in self.browse(cr, uid, valid_moves, context=context):
|
||||
if move.name =='/':
|
||||
|
@ -1326,7 +1326,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 sequence on the journal !'))
|
||||
|
||||
if new_name:
|
||||
self.write(cr, uid, [move.id], {'name':new_name})
|
||||
|
@ -1356,7 +1356,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 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 !\nYou should set the journal to allow cancelling entries if you want to do that.'))
|
||||
if ids:
|
||||
cr.execute('UPDATE account_move '\
|
||||
'SET state=%s '\
|
||||
|
@ -1443,8 +1443,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(_('UserError!'),
|
||||
_('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,14 +1474,14 @@ class account_move(osv.osv):
|
|||
if not account_id:
|
||||
raise osv.except_osv(_('UserError'),
|
||||
_('No default debit account is defined \n' \
|
||||
'on journal "%s"') % move.journal_id.name)
|
||||
'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' \
|
||||
'on journal "%s"') % move.journal_id.name)
|
||||
'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
|
||||
|
@ -1575,11 +1575,11 @@ class account_move(osv.osv):
|
|||
if not company_id:
|
||||
company_id = line.account_id.company_id.id
|
||||
if not company_id == line.account_id.company_id.id:
|
||||
raise osv.except_osv(_('Error'), _("Cannot create moves for 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'), _("""Cannot create move with currency different from ..""") % (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
|
||||
|
@ -1831,7 +1831,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 ! You cannot create recursive accounts.', ['parent_id'])
|
||||
]
|
||||
_order = 'code'
|
||||
|
||||
|
@ -2116,7 +2116,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):
|
||||
|
@ -2519,8 +2519,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 that has internal type other than "View"!', ['type']),
|
||||
(_check_recursion, 'Error ! You 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']),
|
||||
|
||||
]
|
||||
|
||||
|
@ -2621,7 +2621,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 !'), _('I cannot locate a parent code for the template account!'))
|
||||
res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])])
|
||||
return res and res[0] or False
|
||||
|
||||
|
@ -2727,7 +2727,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 ! You cannot create recursive Tax Codes.', ['parent_id'])
|
||||
]
|
||||
_order = 'code,name'
|
||||
account_tax_code_template()
|
||||
|
@ -3384,7 +3384,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'],
|
||||
|
@ -3462,7 +3462,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 !'), _('The bank account defined on the selected chart of accounts hasnot a code.'))
|
||||
|
||||
current_num = 1
|
||||
for line in journal_data:
|
||||
|
|
|
@ -88,8 +88,8 @@ class account_analytic_line(osv.osv):
|
|||
a = prod.categ_id.property_account_expense_categ.id
|
||||
if not a:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('There is no expense account defined ' \
|
||||
'for this product: "%s" (id:%d)') % \
|
||||
_('No expense account is defined ' \
|
||||
'for this product: "%s" (id:%d).') % \
|
||||
(prod.name, prod.id,))
|
||||
else:
|
||||
a = prod.product_tmpl_id.property_account_income.id
|
||||
|
@ -97,8 +97,8 @@ class account_analytic_line(osv.osv):
|
|||
a = prod.categ_id.property_account_income_categ.id
|
||||
if not a:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('There is no income account defined ' \
|
||||
'for this product: "%s" (id:%d)') % \
|
||||
_('No income account is defined ' \
|
||||
'for this product: "%s" (id:%d).') % \
|
||||
(prod.name, prod_id,))
|
||||
|
||||
flag = False
|
||||
|
|
|
@ -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 this 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):
|
||||
|
@ -290,7 +290,7 @@ 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,))
|
||||
_('No %s Account on the Journal %s.') % (item_label, obj.journal_id.name,))
|
||||
|
||||
is_profit = obj.difference < 0.0
|
||||
|
||||
|
|
|
@ -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!'),
|
||||
_('No Sale/Purchase Journal(s) is defined !'))
|
||||
_('No Sale/Purchase Journal(s) is 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. We suggest you to refund it instead.'))
|
||||
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
|
||||
return True
|
||||
|
||||
|
@ -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. The latest line of your payment term must be of type 'balance' to avoid rounding issues."))
|
||||
|
||||
# one move line per tax line
|
||||
iml += ait_obj.move_line_get(cr, uid, inv.id)
|
||||
|
@ -948,7 +948,7 @@ class account_invoice(osv.osv):
|
|||
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.'))
|
||||
_('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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 a Unit of Measure is not compatible with the Unit of Measure of the product.')
|
||||
'message': _('Selected Unit of Measure is not compatible with the Unit of Measure of the product.')
|
||||
}
|
||||
return {'value': res['value'], 'warning': warning}
|
||||
return res
|
||||
|
|
|
@ -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 haven't supplied enough argument to compute the initial balance, please select a period and journal in the context."))
|
||||
raise osv.except_osv(_('Warning !'),_("You havenot supplied enough argument to compute the initial balance, please select a period and journal in the context."))
|
||||
|
||||
|
||||
if context.get('journal_ids', False):
|
||||
|
@ -577,14 +577,14 @@ class account_move_line(osv.osv):
|
|||
lines = self.browse(cr, uid, ids, context=context)
|
||||
for l in lines:
|
||||
if l.account_id.type == 'view':
|
||||
raise osv.except_osv(_('Error :'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name))
|
||||
raise osv.except_osv(_('Error !'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name))
|
||||
return True
|
||||
|
||||
def _check_no_closed(self, cr, uid, ids, context=None):
|
||||
lines = self.browse(cr, uid, ids, context=context)
|
||||
for l in lines:
|
||||
if l.account_id.type == 'closed':
|
||||
raise osv.except_osv(_('Error :'), _('You can not create journal items on a closed account %s %s') % (l.account_id.code, l.account_id.name))
|
||||
raise osv.except_osv(_('Error !'), _('You cannot create journal items on a closed account %s %s.') % (l.account_id.code, l.account_id.name))
|
||||
return True
|
||||
|
||||
def _check_company_id(self, cr, uid, ids, context=None):
|
||||
|
@ -609,8 +609,8 @@ class account_move_line(osv.osv):
|
|||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_no_view, 'You can not create journal items on an account of type view.', ['account_id']),
|
||||
(_check_no_closed, 'You can not create journal items on closed account.', ['account_id']),
|
||||
(_check_no_view, 'You cannot create journal items on an account of type view.', ['account_id']),
|
||||
(_check_no_closed, 'You cannot create journal items on closed account.', ['account_id']),
|
||||
(_check_company_id, 'Account and Period must belong to the same company.', ['company_id']),
|
||||
(_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']),
|
||||
(_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']),
|
||||
|
@ -743,7 +743,7 @@ class account_move_line(osv.osv):
|
|||
context = {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries.'))
|
||||
company_list.append(line.company_id.id)
|
||||
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
|
@ -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:
|
||||
|
@ -796,7 +796,7 @@ class account_move_line(osv.osv):
|
|||
company_list = []
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries.'))
|
||||
company_list.append(line.company_id.id)
|
||||
for line in unrec_lines:
|
||||
if line.state <> 'valid':
|
||||
|
@ -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,7 +1090,7 @@ class account_move_line(osv.osv):
|
|||
res = cr.fetchone()
|
||||
if res:
|
||||
if res[1] != 'draft':
|
||||
raise osv.except_osv(_('UserError'),
|
||||
raise osv.except_osv(_('UserError!'),
|
||||
_('The account move (%s) for centralisation ' \
|
||||
'has been confirmed!') % res[2])
|
||||
return res
|
||||
|
@ -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,7 +1237,7 @@ 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(_('Encoding error!'), _('No period is 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')
|
||||
|
@ -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:
|
||||
|
|
|
@ -209,7 +209,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:1241
|
||||
#, python-format
|
||||
msgid "Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)"
|
||||
msgid "Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -225,7 +225,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1200
|
||||
#, python-format
|
||||
msgid "You can not add/modify entries in a closed journal."
|
||||
msgid "You cannot add/modify entries in a closed journal."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -327,7 +327,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:account.move.line:0
|
||||
msgid "You can not create journal items on an account of type view."
|
||||
msgid "You cannot create journal items on an account of type view."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -579,7 +579,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1251
|
||||
#, python-format
|
||||
msgid "No period found or more than one period found for the given date."
|
||||
msgid "No period is found or more than one period found for the given date."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -618,7 +618,7 @@ msgstr ""
|
|||
#: code:addons/account/account_move_line.py:750
|
||||
#: code:addons/account/account_move_line.py:803
|
||||
#, python-format
|
||||
msgid "To reconcile the entries company should be the same for all entries"
|
||||
msgid "To reconcile the entries company should be the same for all entries."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -787,7 +787,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_invoice_refund.py:110
|
||||
#, python-format
|
||||
msgid "Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice"
|
||||
msgid "Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -907,7 +907,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:2596
|
||||
#, python-format
|
||||
msgid "I can not locate a parent code for the template account!"
|
||||
msgid "I cannot locate a parent code for the template account!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1134,7 +1134,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1302
|
||||
#, python-format
|
||||
msgid "You can not use this general account in this journal, check the tab 'Entry Controls' on the related journal !"
|
||||
msgid "You cannot use this general account in this journal, check the tab 'Entry Controls' on the related journal !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1153,7 +1153,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1129
|
||||
#, python-format
|
||||
msgid "You can not modify/delete a journal with entries for this period !"
|
||||
msgid "You cannot modify/delete a journal with entries for this period !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1239,7 +1239,7 @@ msgstr ""
|
|||
#: code:addons/account/wizard/account_financial_report.py:69
|
||||
#: code:addons/account/wizard/account_report_common.py:144
|
||||
#, python-format
|
||||
msgid "Select a starting and an ending period"
|
||||
msgid "Select a starting and an ending period."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1564,7 +1564,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:1429
|
||||
#, python-format
|
||||
msgid "Selected a Unit of Measure is not compatible with the Unit of Measure of the product."
|
||||
msgid "Selected Unit of Measure is not compatible with the Unit of Measure of the product."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1721,7 +1721,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:res.company:0
|
||||
msgid "Error! You can not create recursive companies."
|
||||
msgid "Error! You cannot create recursive companies."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1935,7 +1935,7 @@ msgstr ""
|
|||
#: code:addons/account/account.py:1461
|
||||
#, python-format
|
||||
msgid "No default debit account is defined \n"
|
||||
"on journal \"%s\""
|
||||
"on journal \"%s\"."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -1952,14 +1952,14 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1277
|
||||
#, python-format
|
||||
msgid "Can not create an automatic sequence for this piece!\n"
|
||||
msgid "Cannot create an automatic sequence for this piece!\n"
|
||||
"Put a sequence in the journal definition for automatic numbering or create a sequence manually for this piece."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: code:addons/account/account.py:787
|
||||
#, python-format
|
||||
msgid "You can not modify the company of this journal as its related record exist in journal items"
|
||||
msgid "You cannot modify the company of this journal as its related record exist in journal items."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -2013,7 +2013,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:370
|
||||
#, python-format
|
||||
msgid "There is no Accounting Journal of type Sale/Purchase defined!"
|
||||
msgid "No Sale/Purchase Journal(s) is defined!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -2113,7 +2113,7 @@ msgstr ""
|
|||
#: code:addons/account/account.py:1468
|
||||
#, python-format
|
||||
msgid "No default credit account is defined \n"
|
||||
"on journal \"%s\""
|
||||
"on journal \"%s\"."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -2163,7 +2163,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: constraint:account.account:0
|
||||
#: constraint:account.tax.code:0
|
||||
msgid "Error ! You can not create recursive accounts."
|
||||
msgid "Error ! You cannot create recursive accounts."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -2530,7 +2530,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1321
|
||||
#, python-format
|
||||
msgid "No sequence defined on the journal !"
|
||||
msgid "Please define sequence on the journal !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -2635,7 +2635,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:392
|
||||
#, python-format
|
||||
msgid "You can not delete an invoice which is open or paid. We suggest you to refund it instead."
|
||||
msgid "You cannot delete an invoice which is open or paid. We suggest you to refund it instead."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -2915,7 +2915,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_open_closed_fiscalyear.py:39
|
||||
#, python-format
|
||||
msgid "No End of year journal defined for the fiscal year"
|
||||
msgid "Please define End of year journal for the fiscal year."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3181,7 +3181,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:839
|
||||
#, python-format
|
||||
msgid "Can not create the invoice !\n"
|
||||
msgid "Cannot create the invoice !\n"
|
||||
"The 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."
|
||||
msgstr ""
|
||||
|
||||
|
@ -3216,7 +3216,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:584
|
||||
#, python-format
|
||||
msgid "You can not create journal items on a \"view\" account %s %s"
|
||||
msgid "You cannot create journal items on a \"view\" account %s %s."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3449,7 +3449,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:921
|
||||
#, python-format
|
||||
msgid "You cannot create an invoice on a centralised journal. Uncheck the centralised counterpart box in the related journal from the configuration menu."
|
||||
msgid "You cannot create an invoice on a centralized journal. Uncheck the centralized counterpart box in the related journal from the configuration menu."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3473,7 +3473,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:591
|
||||
#, python-format
|
||||
msgid "You can not create journal items on a closed account %s %s"
|
||||
msgid "You cannot create journal items on a closed account %s %s."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3737,7 +3737,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:97
|
||||
#, python-format
|
||||
msgid "You haven't supplied enough argument to compute the initial balance, please select a period and journal in the context."
|
||||
msgid "You havenot supplied enough argument to compute the initial balance, please select a period and journal in the context."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3775,8 +3775,8 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1216
|
||||
#, python-format
|
||||
msgid "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"
|
||||
msgid "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."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3830,7 +3830,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_analytic_line.py:93
|
||||
#, python-format
|
||||
msgid "There is no expense account defined for this product: \"%s\" (id:%d)"
|
||||
msgid "No expense account is defined for this product: \"%s\" (id:%d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3905,7 +3905,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:account.analytic.line:0
|
||||
msgid "You can not create analytic line on view account."
|
||||
msgid "You cannot create analytic line on view account."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -3980,7 +3980,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/report/common_report_header.py:92
|
||||
#, python-format
|
||||
msgid "Not implemented"
|
||||
msgid "Not implemented!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4032,7 +4032,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1077
|
||||
#, python-format
|
||||
msgid "You can not modify company of this period as some journal items exists."
|
||||
msgid "You cannot modify company of this period as some journal items exist."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4065,7 +4065,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1251
|
||||
#, python-format
|
||||
msgid "Encoding error"
|
||||
msgid "Encoding error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4178,7 +4178,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1567
|
||||
#, python-format
|
||||
msgid "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."
|
||||
msgid "Cannot 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."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4332,7 +4332,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: constraint:account.account.template:0
|
||||
msgid "Configuration Error!\n"
|
||||
"You can not define children to an account with internal type different of \"View\"! "
|
||||
"You cannot define children to an account with internal type different of \"View\"! "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4404,7 +4404,7 @@ msgstr ""
|
|||
#: code:addons/account/wizard/account_report_common.py:144
|
||||
#: code:addons/account/wizard/account_report_common.py:150
|
||||
#, python-format
|
||||
msgid "Error"
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4501,7 +4501,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1351
|
||||
#, python-format
|
||||
msgid "You can not modify a posted entry of this journal !\n"
|
||||
msgid "You cannot modify a posted entry of this journal !\n"
|
||||
"You should set the journal to allow cancelling entries if you want to do that."
|
||||
msgstr ""
|
||||
|
||||
|
@ -4727,7 +4727,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_invoice_refund.py:146
|
||||
#, python-format
|
||||
msgid "No Period found on Invoice!"
|
||||
msgid "No Period is found on Invoice!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -4910,7 +4910,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:account.move:0
|
||||
msgid "You can not create more than one move per period on centralized journal"
|
||||
msgid "You cannot create more than one move per period on centralized journal."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5024,7 +5024,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_validate_account_move.py:39
|
||||
#, python-format
|
||||
msgid "Specified Journal does not have any account move entries in draft state for this period"
|
||||
msgid "Specified Journal does not have any account move entries in draft state for this period."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5118,7 +5118,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:963
|
||||
#, python-format
|
||||
msgid "No fiscal year defined for this date !\n"
|
||||
msgid "No fiscal year is defined for this date !\n"
|
||||
"Please create one from the configuration of the accounting menu."
|
||||
msgstr ""
|
||||
|
||||
|
@ -5371,7 +5371,7 @@ msgstr ""
|
|||
#: code:addons/account/account_move_line.py:1155
|
||||
#: code:addons/account/account_move_line.py:1238
|
||||
#, python-format
|
||||
msgid "You can not use an inactive account!"
|
||||
msgid "You cannot use an inactive account!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5475,7 +5475,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_report_common.py:150
|
||||
#, python-format
|
||||
msgid "not implemented"
|
||||
msgid "Not implemented!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5514,7 +5514,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: constraint:account.account:0
|
||||
msgid "Configuration Error! \n"
|
||||
"You can not define children to an account with internal type different of \"View\"! "
|
||||
"You cannot define children to an account with internal type different of \"View\"! "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5640,7 +5640,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:629
|
||||
#, python-format
|
||||
msgid "You can not remove/desactivate an account which is set on a customer or supplier."
|
||||
msgid "You cannot remove/deactivate an account which is set on a customer or supplier."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5929,7 +5929,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:account.payment.term.line:0
|
||||
msgid "Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% "
|
||||
msgid "Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% ."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5956,7 +5956,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:622
|
||||
#, python-format
|
||||
msgid "You can not desactivate an account that contains some journal items."
|
||||
msgid "You cannot deactivate an account that contains some journal items."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -5988,7 +5988,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_state_open.py:37
|
||||
#, python-format
|
||||
msgid "Invoice is already reconciled"
|
||||
msgid "Invoice is already reconciled."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6012,7 +6012,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:624
|
||||
#, python-format
|
||||
msgid "You can not remove an account containing journal items."
|
||||
msgid "You cannot remove an account containing journal items."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6035,7 +6035,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1563
|
||||
#, python-format
|
||||
msgid "Couldn't create move between different companies"
|
||||
msgid "Cannot create move between different companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6183,7 +6183,7 @@ msgstr ""
|
|||
#: code:addons/account/account_move_line.py:584
|
||||
#: code:addons/account/account_move_line.py:591
|
||||
#, python-format
|
||||
msgid "Error :"
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6230,8 +6230,8 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1218
|
||||
#, python-format
|
||||
msgid "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"
|
||||
msgid "You cannot do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n"
|
||||
"%s."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6454,7 +6454,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1432
|
||||
#, python-format
|
||||
msgid "You can not delete a posted journal entry \"%s\"!"
|
||||
msgid "You cannot delete a posted journal entry \"%s\"!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6548,7 +6548,7 @@ msgstr ""
|
|||
#: code:addons/account/account_invoice.py:528
|
||||
#: code:addons/account/account_invoice.py:543
|
||||
#, python-format
|
||||
msgid "Can not find a chart of account, you should create one from the configuration of the accounting menu."
|
||||
msgid "Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6720,7 +6720,7 @@ msgstr ""
|
|||
#: code:addons/account/wizard/account_validate_account_move.py:39
|
||||
#: code:addons/account/wizard/account_validate_account_move.py:61
|
||||
#, python-format
|
||||
msgid "Warning"
|
||||
msgid "Warning !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6797,7 +6797,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_fiscalyear_close.py:73
|
||||
#, python-format
|
||||
msgid "The periods to generate opening entries were not found"
|
||||
msgid "The periods to generate opening entries were not found."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -6843,7 +6843,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_fiscalyear_close.py:84
|
||||
#, python-format
|
||||
msgid "The journal must have default credit and debit account"
|
||||
msgid "The journal must have default credit and debit account."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -7056,7 +7056,7 @@ msgstr ""
|
|||
#: code:addons/account/wizard/account_report_aged_partner_balance.py:56
|
||||
#: code:addons/account/wizard/account_report_aged_partner_balance.py:58
|
||||
#, python-format
|
||||
msgid "UserError"
|
||||
msgid "UserError!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -7246,13 +7246,13 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:3446
|
||||
#, python-format
|
||||
msgid "The bank account defined on the selected chart of accounts hasn't a code."
|
||||
msgid "The bank account defined on the selected chart of accounts hasnot a code."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: code:addons/account/wizard/account_invoice_refund.py:108
|
||||
#, python-format
|
||||
msgid "Can not %s draft/proforma/cancel invoice."
|
||||
msgid "Cannot %s draft/proforma/cancel invoice."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -7333,7 +7333,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:account.tax.code.template:0
|
||||
msgid "Error ! You can not create recursive Tax Codes."
|
||||
msgid "Error ! You cannot create recursive Tax Codes."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -7418,7 +7418,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:428
|
||||
#, python-format
|
||||
msgid "Can not find a chart of accounts for this company, you should create one."
|
||||
msgid "Cannot find a chart of accounts for this company, you should create one."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -7520,7 +7520,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:1030
|
||||
#, python-format
|
||||
msgid "You can not cancel an invoice which is partially paid! You need to unreconcile related payment entries first!"
|
||||
msgid "You cannot cancel an invoice which is partially paid! You need to unreconcile related payment entries first!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -7634,7 +7634,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1052
|
||||
#, python-format
|
||||
msgid "No period defined for this date: %s !\n"
|
||||
msgid "No period is defined for this date: %s !\n"
|
||||
"Please create one."
|
||||
msgstr ""
|
||||
|
||||
|
@ -7956,7 +7956,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:1307
|
||||
#, python-format
|
||||
msgid "You can not validate a non-balanced entry !\n"
|
||||
msgid "You cannot validate a non-balanced entry !\n"
|
||||
"Make sure you have configured payment terms properly !\n"
|
||||
"The latest payment term line should be of the type \"Balance\" !"
|
||||
msgstr ""
|
||||
|
@ -8427,7 +8427,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_automatic_reconcile.py:152
|
||||
#, python-format
|
||||
msgid "You must select accounts to reconcile"
|
||||
msgid "You must select accounts to reconcile."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -8465,7 +8465,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:1153
|
||||
#, python-format
|
||||
msgid "You can not change the tax, you should remove and recreate lines !"
|
||||
msgid "You cannot change the tax, you should remove and recreate lines !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -8519,7 +8519,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_fiscalyear_close.py:87
|
||||
#, python-format
|
||||
msgid "The journal must have centralised counterpart without the Skipping draft state option checked!"
|
||||
msgid "The journal must have centralized counterpart without the Skipping draft state option checked!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -8561,7 +8561,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account.py:412
|
||||
#, python-format
|
||||
msgid "No opening/closing period defined, please create one to set the initial balance!"
|
||||
msgid "No opening/closing period is defined, please create one to set the initial balance!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -8726,7 +8726,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_invoice.py:372
|
||||
#, python-format
|
||||
msgid "Unknown Error"
|
||||
msgid "Unknown Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -8790,7 +8790,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: constraint:account.account:0
|
||||
msgid "Configuration Error! \n"
|
||||
"You can not select an account type with a deferral method different of \"Unreconciled\" for accounts with internal type \"Payable/Receivable\"! "
|
||||
"You cannot select an account type with a deferral method different of \"Unreconciled\" for accounts with internal type \"Payable/Receivable\"! "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -8894,7 +8894,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: help:account.invoice.refund,filter_refund:0
|
||||
msgid "Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled"
|
||||
msgid "Refund invoice base on this type. You cannot Modify and Cancel if the invoice is already reconciled"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -9055,12 +9055,12 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_analytic_line.py:102
|
||||
#, python-format
|
||||
msgid "There is no income account defined for this product: \"%s\" (id:%d)"
|
||||
msgid "No income account is defined for this product: \"%s\" (id:%d)."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: constraint:account.move.line:0
|
||||
msgid "You can not create journal items on closed account."
|
||||
msgid "You cannot create journal items on closed account."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -9305,7 +9305,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: constraint:account.account.template:0
|
||||
msgid "Error ! You can not create recursive account templates."
|
||||
msgid "Error ! You cannot create recursive account templates."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -9327,7 +9327,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/account_move_line.py:832
|
||||
#, python-format
|
||||
msgid "Entry is already reconciled"
|
||||
msgid "Entry is already reconciled!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -9352,7 +9352,7 @@ msgstr ""
|
|||
|
||||
#. module: account
|
||||
#: help:account.account,type:0
|
||||
msgid "The 'Internal Type' is used for features available on different types of accounts: view can not have journal items, consolidation are accounts that can have children accounts for multi-company consolidations, payable/receivable are for partners accounts (for debit/credit computations), closed for depreciated accounts."
|
||||
msgid "The 'Internal Type' is used for features available on different types of accounts: view cannot have journal items, consolidation are accounts that can have children accounts for multi-company consolidations, payable/receivable are for partners accounts (for debit/credit computations), closed for depreciated accounts."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
@ -9774,7 +9774,7 @@ msgstr ""
|
|||
#. module: account
|
||||
#: code:addons/account/wizard/account_report_aged_partner_balance.py:56
|
||||
#, python-format
|
||||
msgid "You must enter a period length that cannot be 0 or below !"
|
||||
msgid "You must enter a period length greater than 0 !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -145,7 +145,7 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
allow_write_off = form.allow_write_off
|
||||
reconciled = unreconciled = 0
|
||||
if not form.account_ids:
|
||||
raise osv.except_osv(_('UserError'), _('You must select accounts to reconcile'))
|
||||
raise osv.except_osv(_('UserError!'), _('You must select accounts to reconcile.'))
|
||||
for account_id in form.account_ids:
|
||||
params = (account_id.id,)
|
||||
if not allow_write_off:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -59,7 +59,7 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
#check that the reconcilation concern journal entries from only one company
|
||||
cr.execute('select distinct(company_id) from account_move_line where id in %s',(tuple(ids),))
|
||||
if len(cr.fetchall()) > 1:
|
||||
raise osv.except_osv(_('Warning !'), _('The entries to reconcile should belong to the same company'))
|
||||
raise osv.except_osv(_('Warning !'), _('The entries to reconcile should belong to the same company.'))
|
||||
r_id = self.pool.get('account.move.reconcile').create(cr, uid, {'type': 'auto'})
|
||||
cr.execute('update account_move_line set reconcile_id = %s where id in %s',(r_id, tuple(ids),))
|
||||
return r_id
|
||||
|
@ -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 were not 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)
|
||||
|
@ -96,11 +96,11 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
company_id = new_journal.company_id.id
|
||||
|
||||
if not new_journal.default_credit_account_id or not new_journal.default_debit_account_id:
|
||||
raise osv.except_osv(_('UserError'),
|
||||
_('The journal must have default credit and debit account'))
|
||||
raise osv.except_osv(_('UserError!'),
|
||||
_('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 centralised counterpart without the Skipping draft state option checked!'))
|
||||
raise osv.except_osv(_('UserError!'),
|
||||
_('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, [
|
||||
|
|
|
@ -106,9 +106,9 @@ class account_invoice_refund(osv.osv_memory):
|
|||
journal_id = form.journal_id.id
|
||||
for inv in inv_obj.browse(cr, uid, context.get('active_ids'), context=context):
|
||||
if inv.state in ['draft', 'proforma2', 'cancel']:
|
||||
raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode))
|
||||
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 !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice') % (mode))
|
||||
raise osv.except_osv(_('Error !'), _('Can not %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 found on Invoice!'))
|
||||
_('No Period is found on 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)
|
||||
|
|
|
@ -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'}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class account_move_bank_reconcile(osv.osv_memory):
|
|||
from account_journal where id=%s', (data['journal_id'],))
|
||||
account_id = cr.fetchone()[0]
|
||||
if not account_id:
|
||||
raise osv.except_osv(_('Error'), _('You have to define \
|
||||
raise osv.except_osv(_('Error!'), _('You have to define \
|
||||
the bank account\nin the journal definition for reconciliation.'))
|
||||
return {
|
||||
'domain': "[('journal_id','=',%d), ('account_id','=',%d), ('state','<>','draft')]" % (data['journal_id'], account_id),
|
||||
|
|
|
@ -158,7 +158,7 @@ class account_move_journal(osv.osv_memory):
|
|||
state = period.state
|
||||
|
||||
if state == 'done':
|
||||
raise osv.except_osv(_('UserError'), _('This period is already closed !'))
|
||||
raise osv.except_osv(_('UserError!'), _('This period is already closed !'))
|
||||
|
||||
company = period.company_id.id
|
||||
res = {
|
||||
|
|
|
@ -36,7 +36,7 @@ class account_open_closed_fiscalyear(osv.osv_memory):
|
|||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
period_journal = data.fyear_id.end_journal_period_id or False
|
||||
if not period_journal:
|
||||
raise osv.except_osv(_('Error !'), _('No End of year journal defined for the fiscal year'))
|
||||
raise osv.except_osv(_('Error !'), _('Please define End of year journal for the fiscal year.'))
|
||||
|
||||
ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)])
|
||||
if ids_move:
|
||||
|
|
|
@ -53,9 +53,9 @@ class account_aged_trial_balance(osv.osv_memory):
|
|||
|
||||
period_length = data['form']['period_length']
|
||||
if period_length<=0:
|
||||
raise osv.except_osv(_('UserError'), _('You must enter a period length greater than 0 !'))
|
||||
raise osv.except_osv(_('UserError!'), _('You must enter a period length greater than 0 !'))
|
||||
if not data['form']['date_from']:
|
||||
raise osv.except_osv(_('UserError'), _('Enter a Start date !'))
|
||||
raise osv.except_osv(_('UserError!'), _('Enter a Start date !'))
|
||||
|
||||
start = datetime.strptime(data['form']['date_from'], "%Y-%m-%d")
|
||||
|
||||
|
|
|
@ -144,13 +144,13 @@ class account_common_report(osv.osv_memory):
|
|||
result['date_to'] = data['form']['date_to']
|
||||
elif data['form']['filter'] == 'filter_period':
|
||||
if not data['form']['period_from'] or not data['form']['period_to']:
|
||||
raise osv.except_osv(_('Error'),_('Select a starting and an ending period'))
|
||||
raise osv.except_osv(_('Error!'),_('Select a starting and an ending period.'))
|
||||
result['period_from'] = data['form']['period_from']
|
||||
result['period_to'] = data['form']['period_to']
|
||||
return result
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
raise (_('Error'), _('not implemented'))
|
||||
raise (_('Error!'), _('Not implemented!'))
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
|
|
|
@ -34,7 +34,7 @@ class account_state_open(osv.osv_memory):
|
|||
if 'active_ids' in context:
|
||||
data_inv = obj_invoice.browse(cr, uid, context['active_ids'][0], context=context)
|
||||
if data_inv.reconciled:
|
||||
raise osv.except_osv(_('Warning'), _('Invoice is already reconciled'))
|
||||
raise osv.except_osv(_('Warning!'), _('Invoice is already reconciled.'))
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.invoice', context['active_ids'][0], 'open_test', cr)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
|
|
@ -36,7 +36,7 @@ class validate_account_move(osv.osv_memory):
|
|||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data.journal_id.id),('period_id','=',data.period_id.id)])
|
||||
if not ids_move:
|
||||
raise osv.except_osv(_('Warning'), _('Specified Journal does not have any account move entries in draft state for this period'))
|
||||
raise osv.except_osv(_('Warning!'), _('Specified Journal does not have any account move entries in draft state for this period.'))
|
||||
obj_move.button_validate(cr, uid, ids_move, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
|
Loading…
Reference in New Issue