diff --git a/addons/account/account.py b/addons/account/account.py
index cbba0237c78..2f02e54e00b 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():
@@ -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..2bb89a84cdc 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -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_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_move_line.py b/addons/account/account_move_line.py
index 5eb56bfa645..18ab1a779a3 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -95,7 +95,7 @@ class account_move_line(osv.osv):
if initial_bal and not context.get('periods', False) and not where_move_lines_by_date:
#we didn't pass any filter in the context, and the initial balance can't be computed using only the fiscalyear otherwise entries will be summed twice
#so we have to invalidate this query
- raise osv.except_osv(_('Warning !'),_("You 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 have not supplied enough arguments to compute the initial balance, please select a period and a journal in the context."))
if context.get('journal_ids', False):
@@ -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 can not create journal items on a "view" account %s %s') % (l.account_id.code, l.account_id.name))
+ raise osv.except_osv(_('Error!'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name))
return True
def _check_no_closed(self, cr, uid, ids, context=None):
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,9 +609,9 @@ 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_company_id, 'Company must be the same for its related account and period.', ['company_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,11 +796,11 @@ 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':
- 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/i18n/account.pot b/addons/account/i18n/account.pot
index 174002a8d8d..21572de1bc4 100644
--- a/addons/account/i18n/account.pot
+++ b/addons/account/i18n/account.pot
@@ -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 "You selected an Unit of Measure which is not compatible with 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
@@ -1934,8 +1934,8 @@ msgstr ""
#. module: account
#: code:addons/account/account.py:1461
#, python-format
-msgid "There is no default default debit account defined \n"
-"on journal \"%s\""
+msgid "No default debit account is defined \n"
+"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
@@ -2112,8 +2112,8 @@ msgstr ""
#. module: account
#: code:addons/account/account.py:1468
#, python-format
-msgid "There is no default default credit account defined \n"
-"on journal \"%s\""
+msgid "No default credit account is defined \n"
+"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
@@ -2538,7 +2538,7 @@ msgstr ""
#: code:addons/account/account_invoice.py:688
#: code:addons/account/account_move_line.py:173
#, python-format
-msgid "You have to define an analytic journal on the '%s' journal!"
+msgid "You have to define an analytic journal on the '%s' 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
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/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/test/account_bank_statement.yml b/addons/account/test/account_bank_statement.yml
index 37789f3ad66..89d0b493444 100644
--- a/addons/account/test/account_bank_statement.yml
+++ b/addons/account/test/account_bank_statement.yml
@@ -70,4 +70,4 @@
try:
self.button_cancel(cr, uid, [ref("account_bank_statement_0")])
except Exception, e:
- assert e[0]=='UserError', 'Another exception has been raised!'
+ assert e[0]=='User Error!', 'Another exception has been raised!'
diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py
index 5aeefefe8ce..b4355e79129 100644
--- a/addons/account/wizard/account_automatic_reconcile.py
+++ b/addons/account/wizard/account_automatic_reconcile.py
@@ -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(_('User Error!'), _('You must select accounts to reconcile.'))
for account_id in form.account_ids:
params = (account_id.id,)
if not allow_write_off:
diff --git a/addons/account/wizard/account_change_currency.py b/addons/account/wizard/account_change_currency.py
index fc460eceb11..d51df1e4d70 100644
--- a/addons/account/wizard/account_change_currency.py
+++ b/addons/account/wizard/account_change_currency.py
@@ -35,7 +35,7 @@ class account_change_currency(osv.osv_memory):
context = {}
if context.get('active_id',False):
if obj_inv.browse(cr, uid, context['active_id']).state != 'draft':
- raise osv.except_osv(_('Error'), _('You can only change currency for Draft Invoice !'))
+ raise osv.except_osv(_('Error!'), _('You can only change currency for Draft Invoice.'))
pass
def change_currency(self, cr, uid, ids, context=None):
@@ -56,18 +56,18 @@ class account_change_currency(osv.osv_memory):
if invoice.company_id.currency_id.id == invoice.currency_id.id:
new_price = line.price_unit * rate
if new_price <= 0:
- raise osv.except_osv(_('Error'), _('New currency is not configured properly !'))
+ raise osv.except_osv(_('Error!'), _('New currency is not configured properly.'))
if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id == new_currency:
old_rate = invoice.currency_id.rate
if old_rate <= 0:
- raise osv.except_osv(_('Error'), _('Current currency is not configured properly !'))
+ raise osv.except_osv(_('Error!'), _('Current currency is not configured properly.'))
new_price = line.price_unit / old_rate
if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id != new_currency:
old_rate = invoice.currency_id.rate
if old_rate <= 0:
- raise osv.except_osv(_('Error'), _('Current currency is not configured properly !'))
+ raise osv.except_osv(_('Error!'), _('Current currency is not configured properly.'))
new_price = (line.price_unit / old_rate ) * rate
obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price})
obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context)
diff --git a/addons/account/wizard/account_financial_report.py b/addons/account/wizard/account_financial_report.py
index f96127f6375..4f9d6abf099 100644
--- a/addons/account/wizard/account_financial_report.py
+++ b/addons/account/wizard/account_financial_report.py
@@ -67,7 +67,7 @@ class accounting_report(osv.osv_memory):
result['date_to'] = data['form']['date_to_cmp']
elif data['form']['filter_cmp'] == 'filter_period':
if not data['form']['period_from_cmp'] or not data['form']['period_to_cmp']:
- 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_cmp']
result['period_to'] = data['form']['period_to_cmp']
return result
diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py
index 93746e5d964..196c14d3792 100644
--- a/addons/account/wizard/account_fiscalyear_close.py
+++ b/addons/account/wizard/account_fiscalyear_close.py
@@ -51,15 +51,15 @@ class account_fiscalyear_close(osv.osv_memory):
"""
def _reconcile_fy_closing(cr, uid, ids, context=None):
"""
- This private function manually do the reconciliation on the account_move_line given as `ids´, and directly
+ This private function manually do the reconciliation on the account_move_line given as `ids´, and directly
through psql. It's necessary to do it this way because the usual `reconcile()´ function on account.move.line
- object is really resource greedy (not supposed to work on reconciliation between thousands of records) and
+ object is really resource greedy (not supposed to work on reconciliation between thousands of records) and
it does a lot of different computation that are useless in this particular case.
"""
#check that the reconcilation concern journal entries from only one company
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(_('User Error!'), _('The periods to generate opening entries cannot be found.'))
period = obj_acc_period.browse(cr, uid, data[0].period_id.id, context=context)
new_fyear = obj_acc_fiscalyear.browse(cr, uid, data[0].fy2_id.id, context=context)
@@ -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(_('User Error!'),
+ _('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(_('User Error!'),
+ _('The journal must have centralized counterpart without the Skipping draft state option checked.'))
#delete existing move and move lines if any
move_ids = obj_acc_move.search(cr, uid, [
diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py
index 98c32eda7ee..b7d278b8849 100644
--- a/addons/account/wizard/account_invoice_refund.py
+++ b/addons/account/wizard/account_invoice_refund.py
@@ -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!'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only refund this invoice.') % (mode))
if form.period.id:
period = form.period.id
else:
@@ -143,8 +143,8 @@ class account_invoice_refund(osv.osv_memory):
description = inv.name
if not period:
- raise osv.except_osv(_('Data Insufficient !'), \
- _('No Period found on Invoice!'))
+ raise osv.except_osv(_('Insufficient Data!'), \
+ _('No period found on the invoice.'))
refund_id = inv_obj.refund(cr, uid, [inv.id], date, period, description, journal_id)
refund = inv_obj.browse(cr, uid, refund_id[0], context=context)
diff --git a/addons/account/wizard/account_invoice_state.py b/addons/account/wizard/account_invoice_state.py
index 7adcb908a34..55eab584040 100644
--- a/addons/account/wizard/account_invoice_state.py
+++ b/addons/account/wizard/account_invoice_state.py
@@ -41,7 +41,7 @@ class account_invoice_confirm(osv.osv_memory):
for record in data_inv:
if record['state'] not in ('draft','proforma','proforma2'):
- raise osv.except_osv(_('Warning'), _("Selected Invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state!"))
+ raise osv.except_osv(_('Warning!'), _("Selected invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state."))
wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_open', cr)
return {'type': 'ir.actions.act_window_close'}
@@ -65,7 +65,7 @@ class account_invoice_cancel(osv.osv_memory):
for record in data_inv:
if record['state'] in ('cancel','paid'):
- raise osv.except_osv(_('Warning'), _("Selected Invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state!"))
+ raise osv.except_osv(_('Warning!'), _("Selected invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state."))
wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_cancel', cr)
return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/account/wizard/account_move_bank_reconcile.py b/addons/account/wizard/account_move_bank_reconcile.py
index 9be351ed440..4679089b7cc 100644
--- a/addons/account/wizard/account_move_bank_reconcile.py
+++ b/addons/account/wizard/account_move_bank_reconcile.py
@@ -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),
diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py
index 66f634bd59f..1353efca1f5 100644
--- a/addons/account/wizard/account_move_journal.py
+++ b/addons/account/wizard/account_move_journal.py
@@ -60,7 +60,7 @@ class account_move_journal(osv.osv_memory):
if context.get('journal_type', False):
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
if not jids:
- raise osv.except_osv(_('Configuration Error !'), _('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Financial Accounting/Accounts/Journals.') % context.get('journal_type'))
+ raise osv.except_osv(_('Configuration Error!'), _('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Journals/Journals.') % context.get('journal_type'))
journal_id = jids[0]
return journal_id
@@ -83,25 +83,25 @@ class account_move_journal(osv.osv_memory):
if context:
if not view_id:
return res
-
+
period_pool = self.pool.get('account.period')
journal_pool = self.pool.get('account.journal')
-
+
journal_id = self._get_journal(cr, uid, context)
period_id = self._get_period(cr, uid, context)
-
+
journal = False
if journal_id:
journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name']
journal_string = _("Journal: %s") % tools.ustr(journal)
else:
journal_string = _("Journal: All")
-
+
period = False
if period_id:
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
period_string = _("Period: %s") % tools.ustr(period)
-
+
open_string = _("Open")
view = """
""" % (_('Journal'), journal_string, _('Period'), period_string, open_string)
-
+
view = etree.fromstring(view.encode('utf8'))
xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context)
view = xarch
@@ -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(_('User Error!'), _('This period is already closed.'))
company = period.company_id.id
res = {
diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py
index d48a561473e..b8d64fac0b5 100644
--- a/addons/account/wizard/account_open_closed_fiscalyear.py
+++ b/addons/account/wizard/account_open_closed_fiscalyear.py
@@ -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!'), _('You have to set the end of the fiscal year for this journal.'))
ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)])
if ids_move:
diff --git a/addons/account/wizard/account_period_close.py b/addons/account/wizard/account_period_close.py
index b2c61d9197a..086485ac0f2 100644
--- a/addons/account/wizard/account_period_close.py
+++ b/addons/account/wizard/account_period_close.py
@@ -48,7 +48,7 @@ class account_period_close(osv.osv_memory):
for id in context['active_ids']:
account_move_ids = account_move_obj.search(cr, uid, [('period_id', '=', id), ('state', '=', "draft")], context=context)
if account_move_ids:
- raise osv.except_osv(_('Invalid action !'), _('In order to close a period, you must first post related journal entries.'))
+ raise osv.except_osv(_('Invalid Action!'), _('In order to close a period, you must first post related journal entries.'))
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
cr.execute('update account_period set state=%s where id=%s', (mode, id))
diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py
index 9b89b30c93b..c4167322b90 100644
--- a/addons/account/wizard/account_report_aged_partner_balance.py
+++ b/addons/account/wizard/account_report_aged_partner_balance.py
@@ -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 that cannot be 0 or below !'))
+ raise osv.except_osv(_('User Error!'), _('You must set 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(_('User Error!'), _('You must set a start date.'))
start = datetime.strptime(data['form']['date_from'], "%Y-%m-%d")
diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py
index fa3c195cfb7..02da9a6ab1f 100644
--- a/addons/account/wizard/account_report_common.py
+++ b/addons/account/wizard/account_report_common.py
@@ -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:
diff --git a/addons/account/wizard/account_state_open.py b/addons/account/wizard/account_state_open.py
index 62e837b7366..f75aff365fe 100644
--- a/addons/account/wizard/account_state_open.py
+++ b/addons/account/wizard/account_state_open.py
@@ -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'}
diff --git a/addons/account/wizard/account_use_model.py b/addons/account/wizard/account_use_model.py
index 4fb77cb3397..7ce73caba55 100644
--- a/addons/account/wizard/account_use_model.py
+++ b/addons/account/wizard/account_use_model.py
@@ -41,7 +41,7 @@ class account_use_model(osv.osv_memory):
for line in model.lines_id:
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' is based on partner payment term!"\
+ raise osv.except_osv(_('Error!'), _("Maturity date of entry line generated by model line '%s' is based on partner payment term!"\
"\nPlease define partner on it!")%line.name)
pass
diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py
index 818442a6b3b..1a53c9dfd53 100644
--- a/addons/account/wizard/account_validate_account_move.py
+++ b/addons/account/wizard/account_validate_account_move.py
@@ -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'}
@@ -58,7 +58,7 @@ class validate_account_move_lines(osv.osv_memory):
move_ids.append(line.move_id.id)
move_ids = list(set(move_ids))
if not move_ids:
- raise osv.except_osv(_('Warning'), _('Selected Entry Lines does not have any account move enties in draft state'))
+ raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
obj_move.button_validate(cr, uid, move_ids, context)
return {'type': 'ir.actions.act_window_close'}
validate_account_move_lines()
diff --git a/addons/account/wizard/pos_box.py b/addons/account/wizard/pos_box.py
index 12a606833a1..b4254b5ba84 100644
--- a/addons/account/wizard/pos_box.py
+++ b/addons/account/wizard/pos_box.py
@@ -29,11 +29,11 @@ class CashBox(osv.osv_memory):
for box in self.browse(cr, uid, ids, context=context):
for record in records:
if not record.journal_id:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_("Please check that the field 'Journal' is set on the Bank Statement"))
if not record.journal_id.internal_account_id:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_("Please check that the field 'Internal Transfers Account' is set on the payment method '%s'.") % (record.journal_id.name,))
self._create_bank_statement_line(cr, uid, box, record, context=context)
diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py
index c52485ae623..234d6fe0cf8 100644
--- a/addons/account_analytic_plans/account_analytic_plans.py
+++ b/addons/account_analytic_plans/account_analytic_plans.py
@@ -218,7 +218,7 @@ class account_analytic_plan_instance(osv.osv):
pids = ana_plan_instance_obj.search(cr, uid, [('name','=',vals['name']), ('code','=',vals['code']), ('plan_id','<>',False)], context=context)
if pids:
- raise osv.except_osv(_('Error'), _('A model having this name and code already exists !'))
+ raise osv.except_osv(_('Error!'), _('A model with this name and code already exists.'))
res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)], context=context)
for i in res:
@@ -231,7 +231,7 @@ class account_analytic_plan_instance(osv.osv):
if acct_anal_acct.search(cr, uid, [('parent_id', 'child_of', [item.root_analytic_id.id]), ('id', '=', tempo[2]['analytic_account_id'])], context=context):
total_per_plan += tempo[2]['rate']
if total_per_plan < item.min_required or total_per_plan > item.max_required:
- raise osv.except_osv(_('Value Error'),_('The Total Should be Between %s and %s') % (str(item.min_required), str(item.max_required)))
+ raise osv.except_osv(_('Error!'),_('The total should be between %s and %s.') % (str(item.min_required), str(item.max_required)))
return super(account_analytic_plan_instance, self).create(cr, uid, vals, context=context)
@@ -338,7 +338,7 @@ class account_move_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if line.analytics_id:
if not line.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (line.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context)
if toremove:
@@ -482,7 +482,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytics_id:
if not st.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (st.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
if not st_line.amount:
continue
return True
diff --git a/addons/account_analytic_plans/i18n/account_analytic_plans.pot b/addons/account_analytic_plans/i18n/account_analytic_plans.pot
index 50327bcdff1..75b4654850e 100644
--- a/addons/account_analytic_plans/i18n/account_analytic_plans.pot
+++ b/addons/account_analytic_plans/i18n/account_analytic_plans.pot
@@ -64,7 +64,7 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
-msgid "User Error"
+msgid "User Error!"
msgstr ""
#. module: account_analytic_plans
@@ -189,7 +189,7 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
-msgid "No analytic plan defined !"
+msgid "Please define analytic plan."
msgstr ""
#. module: account_analytic_plans
@@ -278,7 +278,7 @@ msgstr ""
#: code:addons/account_analytic_plans/account_analytic_plans.py:341
#: code:addons/account_analytic_plans/account_analytic_plans.py:485
#, python-format
-msgid "You have to define an analytic journal on the '%s' journal!"
+msgid "You have to define an analytic journal on the '%s' journal."
msgstr ""
#. module: account_analytic_plans
@@ -341,7 +341,7 @@ msgstr ""
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
-msgid "Error"
+msgid "Error!"
msgstr ""
#. module: account_analytic_plans
@@ -351,7 +351,7 @@ msgstr ""
#. module: account_analytic_plans
#: 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_analytic_plans
@@ -362,7 +362,7 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
-msgid "Please put a name and a code before saving the model !"
+msgid "Please put a name and a code before saving the model."
msgstr ""
#. module: account_analytic_plans
@@ -394,7 +394,7 @@ msgstr ""
#. module: account_analytic_plans
#: 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_analytic_plans
@@ -426,7 +426,7 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
-msgid "The Total Should be Between %s and %s"
+msgid "The total should be between %s and %s."
msgstr ""
#. module: account_analytic_plans
@@ -502,7 +502,7 @@ msgstr ""
#. module: account_analytic_plans
#: 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_analytic_plans
@@ -523,6 +523,6 @@ msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
-msgid "Value Error"
+msgid "Value Error!"
msgstr ""
diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py
index 86fa1c888f5..a68321c334a 100644
--- a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py
+++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py
@@ -58,7 +58,7 @@ class account_crossovered_analytic(osv.osv_memory):
flag = False
break
if flag:
- raise osv.except_osv(_('User Error'),_('There are no Analytic lines related to Account %s' % name))
+ raise osv.except_osv(_('User Error!'),_('There are no analytic lines related to account %s.' % name))
datas = {
'ids': [],
diff --git a/addons/account_analytic_plans/wizard/analytic_plan_create_model.py b/addons/account_analytic_plans/wizard/analytic_plan_create_model.py
index 1cd3022f60b..a8ac8401569 100644
--- a/addons/account_analytic_plans/wizard/analytic_plan_create_model.py
+++ b/addons/account_analytic_plans/wizard/analytic_plan_create_model.py
@@ -35,10 +35,10 @@ class analytic_plan_create_model(osv.osv_memory):
if 'active_id' in context and context['active_id']:
plan = plan_obj.browse(cr, uid, context['active_id'], context=context)
if (not plan.name) or (not plan.code):
- raise osv.except_osv(_('Error'), _('Please put a name and a code before saving the model !'))
+ raise osv.except_osv(_('Error!'), _('Please put a name and a code before saving the model.'))
pids = anlytic_plan_obj.search(cr, uid, [], context=context)
if not pids:
- raise osv.except_osv(_('Error'), _('No analytic plan defined !'))
+ raise osv.except_osv(_('Error!'), _('There is no analytic plan defined.'))
plan_obj.write(cr, uid, [context['active_id']], {'plan_id':pids[0]}, context=context)
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'),('name', '=', 'view_analytic_plan_create_model')], context=context)
@@ -57,4 +57,4 @@ class analytic_plan_create_model(osv.osv_memory):
analytic_plan_create_model()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py
index 8cd73c60aa7..b6828062a85 100644
--- a/addons/account_asset/account_asset.py
+++ b/addons/account_asset/account_asset.py
@@ -270,7 +270,7 @@ class account_asset_asset(osv.osv):
return True
_constraints = [
- (_check_recursion, 'Error ! You can not create recursive assets.', ['parent_id']),
+ (_check_recursion, 'Error ! You cannot create recursive assets.', ['parent_id']),
(_check_prorata, 'Prorata temporis can be applied only for time method "number of depreciations".', ['prorata']),
]
diff --git a/addons/account_asset/i18n/account_asset.pot b/addons/account_asset/i18n/account_asset.pot
index 5edf34517b1..a529e56e4e6 100644
--- a/addons/account_asset/i18n/account_asset.pot
+++ b/addons/account_asset/i18n/account_asset.pot
@@ -323,7 +323,7 @@ msgstr ""
#. module: account_asset
#: constraint:account.asset.asset:0
-msgid "Error ! You can not create recursive assets."
+msgid "Error ! You cannot create recursive assets."
msgstr ""
#. module: account_asset
diff --git a/addons/account_bank_statement_extensions/account_bank_statement.py b/addons/account_bank_statement_extensions/account_bank_statement.py
index dc4914eeecd..6eeda843dc5 100644
--- a/addons/account_bank_statement_extensions/account_bank_statement.py
+++ b/addons/account_bank_statement_extensions/account_bank_statement.py
@@ -34,7 +34,7 @@ class account_bank_statement(osv.osv):
# bypass obsolete statement line resequencing
if vals.get('line_ids', False) or context.get('ebanking_import', False):
res = super(osv.osv, self).write(cr, uid, ids, vals, context=context)
- else:
+ else:
res = super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
return res
@@ -70,7 +70,7 @@ class account_bank_statement_line_global(osv.osv):
'type': fields.selection([
('iso20022', 'ISO 20022'),
('coda', 'CODA'),
- ('manual', 'Manual'),
+ ('manual', 'Manual'),
], 'Type', required=True),
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
'bank_statement_line_ids': fields.one2many('account.bank.statement.line', 'globalisation_id', 'Bank Statement Lines'),
@@ -108,12 +108,12 @@ class account_bank_statement_line(osv.osv):
'date': fields.date('Entry Date', required=True, states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Valuta Date', states={'confirm': [('readonly', True)]}),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID',
- states={'confirm': [('readonly', True)]},
+ states={'confirm': [('readonly', True)]},
help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
'globalisation_amount': fields.related('globalisation_id', 'amount', type='float',
relation='account.bank.statement.line.global', string='Glob. Amount', readonly=True),
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed')],
- 'Status', required=True, readonly=True),
+ 'Status', required=True, readonly=True),
'counterparty_name': fields.char('Counterparty Name', size=35),
'counterparty_bic': fields.char('Counterparty BIC', size=11),
'counterparty_number': fields.char('Counterparty Number', size=34),
@@ -127,8 +127,8 @@ class account_bank_statement_line(osv.osv):
if context is None:
context = {}
if context.get('block_statement_line_delete', False):
- raise osv.except_osv(_('Warning'), _('Delete operation not allowed ! \
- Please go to the associated bank statement in order to delete and/or modify this bank statement line'))
+ raise osv.except_osv(_('Warning!'), _('Delete operation not allowed. \
+ Please go to the associated bank statement in order to delete and/or modify bank statement line.'))
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
account_bank_statement_line()
diff --git a/addons/account_bank_statement_extensions/i18n/account_bank_statement_extensions.pot b/addons/account_bank_statement_extensions/i18n/account_bank_statement_extensions.pot
index 0acf875fe97..bd4cfa14261 100644
--- a/addons/account_bank_statement_extensions/i18n/account_bank_statement_extensions.pot
+++ b/addons/account_bank_statement_extensions/i18n/account_bank_statement_extensions.pot
@@ -112,7 +112,7 @@ msgstr ""
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
#, python-format
-msgid "Delete operation not allowed ! Please go to the associated bank statement in order to delete and/or modify this bank statement line"
+msgid "Delete operation not allowed ! Please go to the associated bank statement in order to delete and/or modify bank statement line."
msgstr ""
#. module: account_bank_statement_extensions
@@ -155,7 +155,7 @@ msgstr ""
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
#, python-format
-msgid "Warning"
+msgid "Warning!"
msgstr ""
#. module: account_bank_statement_extensions
diff --git a/addons/account_coda/account_coda.py b/addons/account_coda/account_coda.py
index 36700c97b84..cd117b5be88 100644
--- a/addons/account_coda/account_coda.py
+++ b/addons/account_coda/account_coda.py
@@ -2,9 +2,9 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-#
+#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
-#
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
@@ -36,7 +36,7 @@ class coda_bank_account(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True),
- 'bank_id': fields.many2one('res.partner.bank', 'Bank Account', required=True,
+ 'bank_id': fields.many2one('res.partner.bank', 'Bank Account', required=True,
help='Bank Account Number.\nThe CODA import function will find its CODA processing parameters on this number.'),
'description1': fields.char('Primary Account Description', size=35,
help='The Primary or Secondary Account Description should match the corresponding Account Description in the CODA file.'),
@@ -44,18 +44,18 @@ class coda_bank_account(osv.osv):
help='The Primary or Secondary Account Description should match the corresponding Account Description in the CODA file.'),
'state': fields.selection([
('normal', 'Normal'),
- ('info', 'Info')],
+ ('info', 'Info')],
'Type', required=True, select=1,
help='No Bank Statements will be generated for CODA Bank Statements from Bank Accounts of type \'Info\'.'),
- 'journal': fields.many2one('account.journal', 'Journal',
- domain=[('type', '=', 'bank')],
+ 'journal': fields.many2one('account.journal', 'Journal',
+ domain=[('type', '=', 'bank')],
states={'normal':[('required',True)],'info':[('required',False)]},
help='Bank Journal for the Bank Statement'),
'currency': fields.many2one('res.currency', 'Currency', required=True,
- help='The currency of the CODA Bank Statement'),
+ help='The currency of the CODA Bank Statement'),
'coda_st_naming': fields.char('Bank Statement Naming Policy', size=64,
help="Define the rules to create the name of the Bank Statements generated by the CODA processing." \
- "\nE.g. %(code)s%(y)s/%(paper)s"
+ "\nE.g. %(code)s%(y)s/%(paper)s"
"\n\nVariables:" \
"\nBank Journal Code: %(code)s" \
"\nCurrent Year with Century: %(year)s" \
@@ -79,9 +79,9 @@ class coda_bank_account(osv.osv):
'currency': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
'state': 'normal',
'coda_st_naming': '%(code)s/%(y)s/%(coda)s',
- 'active': True,
- 'find_bbacom': True,
- 'find_partner': True,
+ 'active': True,
+ 'find_bbacom': True,
+ 'find_partner': True,
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
_sql_constraints = [
@@ -107,12 +107,12 @@ class coda_bank_account(osv.osv):
if not default:
default = {}
default = default.copy()
- default.update({'journal_id': None})
+ default.update({'journal_id': None})
default['description1'] = cba['description1'] or ''
default['description2'] = cba['description2'] or ''
default['name'] = (cba['name'] or '') + ' (copy)'
- default['state'] = cba['state']
- return super(coda_bank_account, self).copy(cr, uid, id, default, context)
+ default['state'] = cba['state']
+ return super(coda_bank_account, self).copy(cr, uid, id, default, context)
def onchange_state(self, cr, uid, ids, state):
return state =='info' and {'value': {'journal': None}} or {}
@@ -137,10 +137,10 @@ class account_coda(osv.osv):
'date': fields.date.context_today,
'user_id': lambda self,cr,uid,context: uid,
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.coda', context=c),
- }
+ }
_sql_constraints = [
('coda_uniq', 'unique (name, coda_creation_date)', 'This CODA has already been imported !')
- ]
+ ]
def unlink(self, cr, uid, ids, context=None):
if context is None:
@@ -149,22 +149,22 @@ class account_coda(osv.osv):
coda_st_obj = self.pool.get('coda.bank.statement')
bank_st_obj = self.pool.get('account.bank.statement')
for coda in self.browse(cr, uid, ids, context=context):
- for coda_statement in coda.statement_ids:
+ for coda_statement in coda.statement_ids:
if not context.get('coda_statement_unlink', False):
if coda_st_obj.exists(cr, uid, coda_statement.id, context=context):
- coda_st_obj.unlink(cr, uid, [coda_statement.id], context=context)
+ coda_st_obj.unlink(cr, uid, [coda_statement.id], context=context)
if not context.get('bank_statement_unlink', False):
if coda_st_obj.exists(cr, uid, coda_statement.id, context=context) and (coda_statement.type == 'normal') and bank_st_obj.exists(cr, uid, coda_statement.statement_id.id, context=context):
- bank_st_obj.unlink(cr, uid, [coda_statement.statement_id.id], context=context)
+ bank_st_obj.unlink(cr, uid, [coda_statement.statement_id.id], context=context)
context.update({'coda_unlink': False})
return super(account_coda, self).unlink(cr, uid, ids, context=context)
-
+
account_coda()
-class account_coda_trans_type(osv.osv):
+class account_coda_trans_type(osv.osv):
_name = 'account.coda.trans.type'
_description = 'CODA transaction type'
- _rec_name = 'type'
+ _rec_name = 'type'
_columns = {
'type': fields.char('Transaction Type', size=1, required=True),
'parent_id': fields.many2one('account.coda.trans.type', 'Parent'),
@@ -172,36 +172,36 @@ class account_coda_trans_type(osv.osv):
}
account_coda_trans_type()
-class account_coda_trans_code(osv.osv):
+class account_coda_trans_code(osv.osv):
_name = 'account.coda.trans.code'
_description = 'CODA transaction code'
- _rec_name = 'code'
+ _rec_name = 'code'
_columns = {
'code': fields.char('Code', size=2, required=True, select=1),
'type': fields.selection([
('code', 'Transaction Code'),
- ('family', 'Transaction Family')],
- 'Type', required=True, select=1),
+ ('family', 'Transaction Family')],
+ 'Type', required=True, select=1),
'parent_id': fields.many2one('account.coda.trans.code', 'Family', select=1),
'description': fields.char('Description', size=128, translate=True, select=2),
'comment': fields.text('Comment', translate=True),
}
account_coda_trans_code()
-class account_coda_trans_category(osv.osv):
+class account_coda_trans_category(osv.osv):
_name = 'account.coda.trans.category'
_description = 'CODA transaction category'
- _rec_name = 'category'
+ _rec_name = 'category'
_columns = {
'category': fields.char('Transaction Category', size=3, required=True),
'description': fields.char('Description', size=256, translate=True),
}
account_coda_trans_category()
-class account_coda_comm_type(osv.osv):
+class account_coda_comm_type(osv.osv):
_name = 'account.coda.comm.type'
_description = 'CODA structured communication type'
- _rec_name = 'code'
+ _rec_name = 'code'
_columns = {
'code': fields.char('Structured Communication Type', size=3, required=True, select=1),
'description': fields.char('Description', size=128, translate=True),
@@ -212,9 +212,9 @@ class account_coda_comm_type(osv.osv):
account_coda_comm_type()
class coda_bank_statement(osv.osv):
- _name = 'coda.bank.statement'
- _description = 'CODA Bank Statement'
-
+ _name = 'coda.bank.statement'
+ _description = 'CODA Bank Statement'
+
def _default_journal_id(self, cr, uid, context={}):
if context.get('journal_id', False):
return context['journal_id']
@@ -245,16 +245,16 @@ class coda_bank_statement(osv.osv):
'coda_id': fields.many2one('account.coda', 'CODA Data File', ondelete='cascade'),
'type': fields.selection([
('normal', 'Normal'),
- ('info', 'Info')],
+ ('info', 'Info')],
'Type', required=True, readonly=True,
help='No Bank Statements are associated with CODA Bank Statements of type \'Info\'.'),
- 'statement_id': fields.many2one('account.bank.statement', 'Associated Bank Statement'),
+ 'statement_id': fields.many2one('account.bank.statement', 'Associated Bank Statement'),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True, domain=[('type', '=', 'bank')]),
- 'coda_bank_account_id': fields.many2one('coda.bank.account', 'Bank Account', readonly=True),
+ 'coda_bank_account_id': fields.many2one('coda.bank.account', 'Bank Account', readonly=True),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True),
'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Account'), readonly=True),
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'), readonly=True),
- 'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance'),
+ 'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance'),
'line_ids': fields.one2many('coda.bank.statement.line',
'statement_id', 'CODA Bank Statement lines', readonly=True),
'currency': fields.many2one('res.currency', 'Currency', required=True, readonly=True,
@@ -262,14 +262,14 @@ class coda_bank_statement(osv.osv):
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
_defaults = {
- 'type': 'normal',
+ 'type': 'normal',
'currency': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
'journal_id': _default_journal_id,
'period_id': _get_period,
}
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
- if context is None:
+ if context is None:
context = {}
res = super(coda_bank_statement, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order,
context=context, count=count)
@@ -283,20 +283,20 @@ class coda_bank_statement(osv.osv):
context.update({'coda_statement_unlink': True})
coda_obj = self.pool.get('account.coda')
bank_st_obj = self.pool.get('account.bank.statement')
-
+
# find all CODA bank statements that are associated with the selected CODA bank statements via a common CODA file
- new_ids = []
+ new_ids = []
for coda_statement in self.browse(cr, uid, ids, context=context):
if coda_obj.exists(cr, uid, coda_statement.coda_id.id, context=context):
new_ids += [x.id for x in coda_obj.browse(cr, uid, coda_statement.coda_id.id, context=context).statement_ids]
- # unlink CODA banks statements as well as associated bank statements and CODA files
+ # unlink CODA banks statements as well as associated bank statements and CODA files
for coda_statement in self.browse(cr, uid, new_ids, context=context):
- if coda_statement.statement_id.state == 'confirm':
- raise osv.except_osv(_('Invalid action !'),
- _("Cannot delete CODA Bank Statement '%s' of Journal '%s'." \
- "\nThe associated Bank Statement has already been confirmed !" \
- "\nPlease undo this action first!") \
+ if coda_statement.statement_id.state == 'confirm':
+ raise osv.except_osv(_('Invalid Action!'),
+ _("Cannot delete CODA Bank Statement '%s' of journal '%s'." \
+ "\nThe associated Bank Statement has already been confirmed." \
+ "\nPlease undo this action first.") \
% (coda_statement.name, coda_statement.journal_id.name))
else:
if not context.get('coda_unlink', False):
@@ -304,11 +304,11 @@ class coda_bank_statement(osv.osv):
coda_obj.unlink(cr, uid, [coda_statement.coda_id.id], context=context)
if not context.get('bank_statement_unlink', False):
if coda_statement.statement_id and bank_st_obj.exists(cr, uid, coda_statement.statement_id.id, context=context):
- bank_st_obj.unlink(cr, uid, [coda_statement.statement_id.id], context=context)
+ bank_st_obj.unlink(cr, uid, [coda_statement.statement_id.id], context=context)
context.update({'coda_statement_unlink': False})
return super(coda_bank_statement, self).unlink(cr, uid, new_ids, context=context)
-
+
coda_bank_statement()
class account_bank_statement(osv.osv):
@@ -316,7 +316,7 @@ class account_bank_statement(osv.osv):
_columns = {
'coda_statement_id': fields.many2one('coda.bank.statement', 'Associated CODA Bank Statement'),
}
-
+
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
@@ -325,15 +325,15 @@ class account_bank_statement(osv.osv):
coda_st_obj = self.pool.get('coda.bank.statement')
# find all statements that are associated with the selected bank statements via a common CODA file
- ids_plus = []
+ ids_plus = []
for statement in self.browse(cr, uid, ids, context=context):
if statement.coda_statement_id:
for x in coda_obj.browse(cr, uid, statement.coda_statement_id.coda_id.id, context=context).statement_ids:
if x.type == 'normal':
ids_plus += [x.statement_id.id]
-
+
# unlink banks statements as well as associated CODA bank statements and CODA files
- for statement in self.browse(cr, uid, ids_plus, context=context):
+ for statement in self.browse(cr, uid, ids_plus, context=context):
if not context.get('coda_statement_unlink', False):
if statement.coda_statement_id and coda_st_obj.exists(cr, uid, statement.coda_statement_id.id, context=context):
coda_st_obj.unlink(cr, uid, [statement.coda_statement_id.id], context=context)
@@ -347,56 +347,56 @@ class account_bank_statement(osv.osv):
context.update({'bank_statement_unlink': False})
new_ids = list(set(ids + ids_plus))
return super(account_bank_statement, self).unlink(cr, uid, new_ids, context=context)
-
+
account_bank_statement()
class coda_bank_statement_line(osv.osv):
- _name = 'coda.bank.statement.line'
- _order = 'sequence'
+ _name = 'coda.bank.statement.line'
+ _order = 'sequence'
_description = 'CODA Bank Statement Line'
_columns = {
'name': fields.char('Communication', size=268, required=True),
'sequence': fields.integer('Sequence'),
'date': fields.date('Entry Date', required=True),
- 'val_date': fields.date('Valuta Date'),
+ 'val_date': fields.date('Valuta Date'),
'account_id': fields.many2one('account.account','Account'), # remove required=True
'type': fields.selection([
('supplier','Supplier'),
('customer','Customer'),
('general','General'),
- ('globalisation','Globalisation'),
- ('information','Information'),
- ('communication','Free Communication'),
+ ('globalisation','Globalisation'),
+ ('information','Information'),
+ ('communication','Free Communication'),
], 'Type', required=True),
- 'globalisation_level': fields.integer('Globalisation Level',
+ 'globalisation_level': fields.integer('Globalisation Level',
help="The value which is mentioned (1 to 9), specifies the hierarchy level"
" of the globalisation of which this record is the first."
"\nThe same code will be repeated at the end of the globalisation."),
- 'globalisation_amount': fields.float('Globalisation Amount', digits_compute=dp.get_precision('Account')),
+ 'globalisation_amount': fields.float('Globalisation Amount', digits_compute=dp.get_precision('Account')),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID', readonly=True,
- help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
+ help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
'partner_id': fields.many2one('res.partner', 'Partner'),
'counterparty_name': fields.char('Counterparty Name', size=35),
- 'counterparty_bic': fields.char('Counterparty BIC', size=11),
- 'counterparty_number': fields.char('Counterparty Number', size=34),
- 'counterparty_currency': fields.char('Counterparty Currency', size=3),
+ 'counterparty_bic': fields.char('Counterparty BIC', size=11),
+ 'counterparty_number': fields.char('Counterparty Number', size=34),
+ 'counterparty_currency': fields.char('Counterparty Currency', size=3),
'statement_id': fields.many2one('coda.bank.statement', 'CODA Bank Statement',
select=True, required=True, ondelete='cascade'),
'coda_bank_account_id': fields.related('statement_id', 'coda_bank_account_id', type='many2one', relation='coda.bank.account', string='Bank Account', store=True, readonly=True),
'ref': fields.char('Reference', size=32),
'note': fields.text('Notes'),
- 'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
+ 'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
if context.get('block_statement_line_delete', False):
- raise osv.except_osv('Warning', _('Delete operation not allowed !'))
+ raise osv.except_osv('Warning', _('Delete operation not allowed.'))
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
-coda_bank_statement_line()
+coda_bank_statement_line()
class account_bank_statement_line_global(osv.osv):
_inherit = 'account.bank.statement.line.global'
diff --git a/addons/account_coda/wizard/account_coda_import.py b/addons/account_coda/wizard/account_coda_import.py
index daa8bbd1026..bb46593b158 100644
--- a/addons/account_coda/wizard/account_coda_import.py
+++ b/addons/account_coda/wizard/account_coda_import.py
@@ -2,9 +2,9 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-#
+#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
-#
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
@@ -41,7 +41,7 @@ class account_coda_import(osv.osv_memory):
_defaults = {
'coda_fname': lambda *a: '',
}
-
+
def coda_parsing(self, cr, uid, ids, context=None, batch=False, codafile=None, codafilename=None):
if context is None:
context = {}
@@ -52,12 +52,12 @@ class account_coda_import(osv.osv_memory):
data=self.browse(cr,uid,ids)[0]
try:
codafile = data.coda_data
- codafilename = data.coda_fname
+ codafilename = data.coda_fname
except:
- raise osv.except_osv(_('Error!'), _('Wizard in incorrect state. Please hit the Cancel button!'))
+ raise osv.except_osv(_('Error!'), _('Wizard in incorrect state. Please hit the Cancel button.'))
return {}
- currency_obj = self.pool.get('res.currency')
+ currency_obj = self.pool.get('res.currency')
coda_bank_account_obj = self.pool.get('coda.bank.account')
trans_type_obj = self.pool.get('account.coda.trans.type')
trans_code_obj = self.pool.get('account.coda.trans.code')
@@ -85,7 +85,7 @@ class account_coda_import(osv.osv_memory):
coda_bank.update({'journal_code': coda_bank['journal'] and journal_obj.browse(cr, uid, coda_bank['journal'][0], context=context).code or ''})
coda_bank.update({'iban': partner_bank_obj.browse(cr, uid, coda_bank['bank_id'][0], context=context).iban})
coda_bank.update({'acc_number': partner_bank_obj.browse(cr, uid, coda_bank['bank_id'][0], context=context).acc_number})
- coda_bank.update({'currency_name': currency_obj.browse(cr, uid, coda_bank['currency'][0], context=context).name})
+ coda_bank.update({'currency_name': currency_obj.browse(cr, uid, coda_bank['currency'][0], context=context).name})
trans_type_table = trans_type_obj.read(cr, uid, trans_type_obj.search(cr, uid, []), context=context)
trans_code_table = trans_code_obj.read(cr, uid, trans_code_obj.search(cr, uid, []), context=context)
trans_category_table = trans_category_obj.read(cr, uid, trans_category_obj.search(cr, uid, []), context=context)
@@ -96,9 +96,9 @@ class account_coda_import(osv.osv_memory):
err_log = ''
coda_statements = []
recordlist = unicode(base64.decodestring(codafile), 'windows-1252', 'strict').split('\n')
-
+
for line in recordlist:
-
+
if not line:
pass
elif line[0] == '0':
@@ -109,11 +109,11 @@ class account_coda_import(osv.osv_memory):
st_line_seq = 0
glob_lvl_stack = [0]
# header data
- coda_statement['currency'] = 'EUR' # default currency
+ coda_statement['currency'] = 'EUR' # default currency
coda_statement['version'] = line[127]
coda_version = line[127]
if coda_version not in ['1','2']:
- err_string = _('\nCODA V%s statements are not supported, please contact your bank!') % coda_version
+ err_string = _('\nCODA V%s statements are not supported, please contact your bank.') % coda_version
err_code = 'R0001'
if batch:
return (err_code, err_string)
@@ -122,7 +122,7 @@ class account_coda_import(osv.osv_memory):
coda_statement['date'] = str2date(line[5:11])
period_id = period_obj.search(cr , uid, [('date_start' ,'<=', coda_statement['date']), ('date_stop','>=',coda_statement['date'])])
if not period_id:
- err_string = _("\nThe CODA creation date doesn't fall within a defined Accounting Period!" \
+ err_string = _("\nThe CODA creation date doesn't fall within a defined Accounting Period." \
"\nPlease create the Accounting Period for date %s.") % coda_statement['date']
err_code = 'R0002'
if batch:
@@ -130,19 +130,19 @@ class account_coda_import(osv.osv_memory):
raise osv.except_osv(_('Data Error!'), err_string)
coda_statement['period_id'] = period_id[0]
coda_statement['state'] = 'draft'
-
+
coda_id = coda_obj.search(cr, uid,[
('name', '=', codafilename),
('coda_creation_date', '=', coda_statement['date']),
])
if coda_id:
- err_string = _("\nCODA File with Filename '%s' and Creation Date '%s' has already been imported !") \
+ err_string = _("\nCODA File with Filename '%s' and Creation Date '%s' has already been imported.") \
% (codafilename, coda_statement['date'])
err_code = 'W0001'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Warning !'), err_string)
-
+ raise osv.except_osv(_('Warning!'), err_string)
+
elif line[0] == '1':
if coda_version == '1':
coda_statement['acc_number'] = line[5:17]
@@ -150,24 +150,24 @@ class account_coda_import(osv.osv_memory):
coda_statement['currency'] = line[18:21]
elif line[1] == '0': # Belgian bank account BBAN structure
coda_statement['acc_number'] = line[5:17]
- coda_statement['currency'] = line[18:21]
+ coda_statement['currency'] = line[18:21]
elif line[1] == '1': # foreign bank account BBAN structure
- err_string = _('\nForeign bank accounts with BBAN structure are not supported !')
+ err_string = _('\nForeign bank accounts with BBAN structure are not supported.')
err_code = 'R1001'
if batch:
return (err_code, err_string)
raise osv.except_osv(_('Data Error!'), err_string)
elif line[1] == '2': # Belgian bank account IBAN structure
- coda_statement['acc_number']=line[5:21]
+ coda_statement['acc_number']=line[5:21]
coda_statement['currency'] = line[39:42]
elif line[1] == '3': # foreign bank account IBAN structure
- err_string = _('\nForeign bank accounts with IBAN structure are not supported !')
+ err_string = _('\nForeign bank accounts with IBAN structure are not supported.')
err_code = 'R1002'
if batch:
return (err_code, err_string)
raise osv.except_osv(_('Data Error!'), err_string)
else:
- err_string = _('\nUnsupported bank account structure !')
+ err_string = _('\nUnsupported bank account structure.')
err_code = 'R1003'
if batch:
return (err_code, err_string)
@@ -177,11 +177,11 @@ class account_coda_import(osv.osv_memory):
and (coda_statement['currency'] == x['currency_name']) and (coda_statement['description'] == (x['description1'] or x['description2'] or ''))
coda_bank = filter(cba_filter, coda_bank_table)
if coda_bank:
- coda_bank = coda_bank[0]
+ coda_bank = coda_bank[0]
coda_statement['type'] = coda_bank['state']
coda_statement['journal_id'] = coda_bank['journal'] and coda_bank['journal'][0]
coda_statement['currency_id'] = coda_bank['currency'][0]
- coda_statement['coda_bank_account_id'] = coda_bank['id']
+ coda_statement['coda_bank_account_id'] = coda_bank['id']
def_pay_acc = coda_bank['def_payable'][0]
def_rec_acc = coda_bank['def_receivable'][0]
awaiting_acc = coda_bank['awaiting_account'][0]
@@ -189,8 +189,8 @@ class account_coda_import(osv.osv_memory):
find_bbacom = coda_bank['find_bbacom']
find_partner = coda_bank['find_partner']
else:
- err_string = _("\nNo matching CODA Bank Account Configuration record found !") + \
- _("\nPlease check if the 'Bank Account Number', 'Currency' and 'Account Description' fields of your configuration record match with '%s', '%s' and '%s' !") \
+ err_string = _("\nNo matching CODA Bank Account Configuration record found.") + \
+ _("\nPlease check if the 'Bank Account Number', 'Currency' and 'Account Description' fields of your configuration record match with '%s', '%s' and '%s'.") \
% (coda_statement['acc_number'], coda_statement['currency'], coda_statement['description'])
err_code = 'R1004'
if batch:
@@ -199,13 +199,13 @@ class account_coda_import(osv.osv_memory):
bal_start = list2float(line[43:58]) # old balance data
if line[42] == '1': # 1= Debit
bal_start = - bal_start
- coda_statement['balance_start'] = bal_start
+ coda_statement['balance_start'] = bal_start
coda_statement['acc_holder'] = line[64:90]
coda_statement['paper_seq_number'] = line[2:5]
coda_statement['coda_seq_number'] = line[125:128]
if coda_bank['coda_st_naming']:
coda_statement['name'] = coda_bank['coda_st_naming'] % {
- 'code': coda_bank['journal_code'] or '',
+ 'code': coda_bank['journal_code'] or '',
'year': time.strftime('%Y'),
'y': time.strftime('%y'),
'coda': line[125:128],
@@ -213,7 +213,7 @@ class account_coda_import(osv.osv_memory):
}
else:
coda_statement['name'] = '/'
-
+
elif line[0] == '2':
# movement data record 2
if line[1] == '1':
@@ -222,7 +222,7 @@ class account_coda_import(osv.osv_memory):
st_line_seq = st_line_seq + 1
st_line['sequence'] = st_line_seq
st_line['type'] = 'general'
- st_line['reconcile'] = False
+ st_line['reconcile'] = False
st_line['struct_comm_type'] = ''
st_line['struct_comm_type_desc'] = ''
st_line['struct_comm_101'] = ''
@@ -230,25 +230,25 @@ class account_coda_import(osv.osv_memory):
st_line['partner_id'] = 0
st_line['account_id'] = 0
st_line['counterparty_name'] = ''
- st_line['counterparty_bic'] = ''
+ st_line['counterparty_bic'] = ''
st_line['counterparty_number'] = ''
- st_line['counterparty_currency'] = ''
+ st_line['counterparty_currency'] = ''
st_line['glob_lvl_flag'] = False
st_line['globalisation_id'] = 0
st_line['globalisation_code'] = ''
st_line['globalisation_amount'] = False
st_line['amount'] = False
-
+
st_line['ref'] = line[2:10]
st_line['trans_ref'] = line[10:31]
st_line_amt = list2float(line[32:47])
if line[31] == '1': # 1=debit
st_line_amt = - st_line_amt
- # processing of amount depending on globalisation code
+ # processing of amount depending on globalisation code
glob_lvl_flag = int(line[124])
- if glob_lvl_flag > 0:
- if glob_lvl_stack[-1] == glob_lvl_flag:
- st_line['glob_lvl_flag'] = glob_lvl_flag
+ if glob_lvl_flag > 0:
+ if glob_lvl_stack[-1] == glob_lvl_flag:
+ st_line['glob_lvl_flag'] = glob_lvl_flag
st_line['amount'] = st_line_amt
glob_lvl_stack.pop()
else:
@@ -265,23 +265,23 @@ class account_coda_import(osv.osv_memory):
st_line['trans_type'] = line[53]
trans_type = filter(lambda x: st_line['trans_type'] == x['type'], trans_type_table)
if not trans_type:
- err_string = _('\nThe File contains an invalid CODA Transaction Type : %s!') % st_line['trans_type']
+ err_string = _('\nThe File contains an invalid CODA Transaction Type : %s.') % st_line['trans_type']
err_code = 'R2001'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Data Error!'), err_string)
- st_line['trans_type_desc'] = trans_type[0]['description']
+ raise osv.except_osv(_('Data Error!'), err_string)
+ st_line['trans_type_desc'] = trans_type[0]['description']
st_line['trans_family'] = line[54:56]
trans_family = filter(lambda x: (x['type'] == 'family') and (st_line['trans_family'] == x['code']), trans_code_table)
if not trans_family:
- err_string = _('\nThe File contains an invalid CODA Transaction Family : %s!') % st_line['trans_family']
+ err_string = _('\nThe File contains an invalid CODA Transaction Family : %s.') % st_line['trans_family']
err_code = 'R2002'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Data Error!'), err_string)
+ raise osv.except_osv(_('Data Error!'), err_string)
st_line['trans_family_desc'] = trans_family[0]['description']
st_line['trans_code'] = line[56:58]
- trans_code = filter(lambda x: (x['type'] == 'code') and (st_line['trans_code'] == x['code']) and (trans_family[0]['id'] == x['parent_id'][0]),
+ trans_code = filter(lambda x: (x['type'] == 'code') and (st_line['trans_code'] == x['code']) and (trans_family[0]['id'] == x['parent_id'][0]),
trans_code_table)
if trans_code:
st_line['trans_code_desc'] = trans_code[0]['description']
@@ -292,49 +292,49 @@ class account_coda_import(osv.osv_memory):
if trans_category:
st_line['trans_category_desc'] = trans_category[0]['description']
else:
- st_line['trans_category_desc'] = _('Transaction Category unknown, please consult your bank.')
- # positions 61-115 : communication
+ st_line['trans_category_desc'] = _('Transaction Category unknown, please consult your bank.')
+ # positions 61-115 : communication
if line[61] == '1':
st_line['struct_comm_type'] = line[62:65]
comm_type = filter(lambda x: st_line['struct_comm_type'] == x['code'], comm_type_table)
if not comm_type:
- err_string = _('\nThe File contains an invalid Structured Communication Type : %s!') % st_line['struct_comm_type']
+ err_string = _('\nThe File contains an invalid Structured Communication Type : %s.') % st_line['struct_comm_type']
err_code = 'R2003'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Data Error!'), err_string)
+ raise osv.except_osv(_('Data Error!'), err_string)
st_line['struct_comm_type_desc'] = comm_type[0]['description']
st_line['communication'] = st_line['name'] = line[65:115]
if st_line['struct_comm_type'] == '101':
- bbacomm = line[65:77]
- st_line['struct_comm_101'] = st_line['name'] = '+++' + bbacomm[0:3] + '/' + bbacomm[3:7] + '/' + bbacomm[7:] + '+++'
+ bbacomm = line[65:77]
+ st_line['struct_comm_101'] = st_line['name'] = '+++' + bbacomm[0:3] + '/' + bbacomm[3:7] + '/' + bbacomm[7:] + '+++'
else:
st_line['communication'] = st_line['name'] = line[62:115]
st_line['entry_date'] = str2date(line[115:121])
- # positions 122-124 not processed
+ # positions 122-124 not processed
coda_statement_lines[st_line_seq] = st_line
coda_statement['coda_statement_lines'] = coda_statement_lines
elif line[1] == '2':
# movement data record 2.2
if coda_statement['coda_statement_lines'][st_line_seq]['ref'] != line[2:10]:
- err_string = _('\nCODA parsing error on movement data record 2.2, seq nr %s!' \
+ err_string = _('\nCODA parsing error on movement data record 2.2, seq nr %s.' \
'\nPlease report this issue via your OpenERP support channel.') % line[2:10]
err_code = 'R2004'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Error!'), err_string)
+ raise osv.except_osv(_('Error!'), err_string)
coda_statement['coda_statement_lines'][st_line_seq]['name'] += line[10:63]
coda_statement['coda_statement_lines'][st_line_seq]['communication'] += line[10:63]
- coda_statement['coda_statement_lines'][st_line_seq]['counterparty_bic'] = line[98:109].strip()
+ coda_statement['coda_statement_lines'][st_line_seq]['counterparty_bic'] = line[98:109].strip()
elif line[1] == '3':
# movement data record 2.3
if coda_statement['coda_statement_lines'][st_line_seq]['ref'] != line[2:10]:
- err_string = _('\nCODA parsing error on movement data record 2.3, seq nr %s!' \
+ err_string = _('\nCODA parsing error on movement data record 2.3, seq nr %s.' \
'\nPlease report this issue via your OpenERP support channel.') % line[2:10]
err_code = 'R2005'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Error!'), err_string)
+ raise osv.except_osv(_('Error!'), err_string)
st_line = coda_statement_lines[st_line_seq]
if coda_version == '1':
counterparty_number = line[10:22]
@@ -346,7 +346,7 @@ class account_coda_import(osv.osv_memory):
counterparty_currency = line[23:26].strip()
else:
counterparty_number = line[10:44].strip()
- counterparty_currency = line[44:47].strip()
+ counterparty_currency = line[44:47].strip()
counterparty_name = line[47:82].strip()
st_line['name'] += line[82:125]
st_line['communication'] += line[82:125]
@@ -354,15 +354,15 @@ class account_coda_import(osv.osv_memory):
st_line['counterparty_currency'] = counterparty_currency
st_line['counterparty_name'] = counterparty_name
if counterparty_currency not in [coda_bank['currency_name'], '']:
- err_string = _('\nCODA parsing error on movement data record 2.3, seq nr %s!' \
- '\nPlease report this issue via your OpenERP support channel.') % line[2:10]
+ err_string = _('\nCODA parsing error on movement data record 2.3, seq nr %s.' \
+ '\nPlease report this issue via your OpenERP support channel.') % line[2:10]
err_code = 'R2006'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Error!'), err_string)
+ raise osv.except_osv(_('Error!'), err_string)
- # partner matching and reconciliation
- if st_line['type'] == 'general':
+ # partner matching and reconciliation
+ if st_line['type'] == 'general':
match = False
bank_ids = False
# prepare reconciliation for bba scor
@@ -379,14 +379,14 @@ class account_coda_import(osv.osv_memory):
else:
st_line['account_id'] = partner.property_account_receivable.id or def_rec_acc
st_line['type'] = 'customer'
- if invoice.type in ['in_invoice', 'out_invoice']:
+ if invoice.type in ['in_invoice', 'out_invoice']:
iml_ids = move_line_obj.search(cr, uid, [('move_id', '=', invoice.move_id.id), ('reconcile_id', '=', False), ('account_id.reconcile', '=', True)])
if iml_ids:
st_line['reconcile'] = iml_ids[0]
match = True
else:
coda_parsing_note += _("\n Bank Statement '%s' line '%s':" \
- "\n There is no invoice matching the Structured Communication '%s'!" \
+ "\n There is no invoice matching the Structured Communication '%s'." \
"\n Please verify and adjust the invoice and perform the import again or otherwise change the corresponding entry manually in the generated Bank Statement.") \
% (coda_statement['name'], st_line['ref'], reference)
# lookup partner via counterparty_number
@@ -402,10 +402,10 @@ class account_coda_import(osv.osv_memory):
if not match and find_partner and bank_ids:
if len(bank_ids) > 1:
coda_parsing_note += _("\n Bank Statement '%s' line '%s':" \
- "\n No partner record assigned: There are multiple partners with the same Bank Account Number '%s'!" \
+ "\n No partner record assigned: There are multiple partners with the same Bank Account Number '%s'." \
"\n Please correct the configuration and perform the import again or otherwise change the corresponding entry manually in the generated Bank Statement.") \
% (coda_statement['name'], st_line['ref'], counterparty_number)
- else:
+ else:
bank = partner_bank_obj.browse(cr, uid, bank_ids[0], context)
st_line['partner_id'] = bank.partner_id.id
match = True
@@ -418,26 +418,26 @@ class account_coda_import(osv.osv_memory):
elif not match and find_partner:
if counterparty_number:
coda_parsing_note += _("\n Bank Statement '%s' line '%s':" \
- "\n The bank account '%s' is not defined for the partner '%s'!" \
+ "\n The bank account '%s' is not defined for the partner '%s'." \
"\n Please correct the configuration and perform the import again or otherwise change the corresponding entry manually in the generated Bank Statement.") \
- % (coda_statement['name'], st_line['ref'],
+ % (coda_statement['name'], st_line['ref'],
counterparty_number, counterparty_name)
else:
coda_parsing_note += _("\n Bank Statement '%s' line '%s':" \
- "\n No matching partner record found!" \
+ "\n No matching partner record found." \
"\n Please adjust the corresponding entry manually in the generated Bank Statement.") \
- % (coda_statement['name'], st_line['ref'])
+ % (coda_statement['name'], st_line['ref'])
st_line['account_id'] = awaiting_acc
# end of partner record lookup
coda_statement_lines[st_line_seq] = st_line
coda_statement['coda_statement_lines'] = coda_statement_lines
else:
# movement data record 2.x (x <> 1,2,3)
- err_string = _('\nMovement data records of type 2.%s are not supported !') % line[1]
+ err_string = _('\nMovement data records of type 2.%s are not supported.') % line[1]
err_code = 'R2007'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Data Error!'), err_string)
+ raise osv.except_osv(_('Data Error!'), err_string)
elif line[0] == '3':
# information data record 3
@@ -461,19 +461,19 @@ class account_coda_import(osv.osv_memory):
err_code = 'R3001'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Data Error!'), err_string)
- info_line['trans_type_desc'] = trans_type[0]['description']
+ raise osv.except_osv(_('Data Error!'), err_string)
+ info_line['trans_type_desc'] = trans_type[0]['description']
info_line['trans_family'] = line[32:34]
trans_family = filter(lambda x: (x['type'] == 'family') and (info_line['trans_family'] == x['code']), trans_code_table)
if not trans_family:
- err_string = _('\nThe File contains an invalid CODA Transaction Family : %s!') % st_line['trans_family']
+ err_string = _('\nThe File contains an invalid CODA Transaction Family : %s.') % st_line['trans_family']
err_code = 'R3002'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('Data Error!'), err_string)
+ raise osv.except_osv(_('Data Error!'), err_string)
info_line['trans_family_desc'] = trans_family[0]['description']
info_line['trans_code'] = line[34:36]
- trans_code = filter(lambda x: (x['type'] == 'code') and (info_line['trans_code'] == x['code']) and (trans_family[0]['id'] == x['parent_id']),
+ trans_code = filter(lambda x: (x['type'] == 'code') and (info_line['trans_code'] == x['code']) and (trans_family[0]['id'] == x['parent_id']),
trans_code_table)
if trans_code:
info_line['trans_code_desc'] = trans_code[0]['description']
@@ -484,13 +484,13 @@ class account_coda_import(osv.osv_memory):
if trans_category:
info_line['trans_category_desc'] = trans_category[0]['description']
else:
- info_line['trans_category_desc'] = _('Transaction Category unknown, please consult your bank.')
- # positions 40-113 : communication
+ info_line['trans_category_desc'] = _('Transaction Category unknown, please consult your bank.')
+ # positions 40-113 : communication
if line[39] == '1':
info_line['struct_comm_type'] = line[40:43]
comm_type = filter(lambda x: info_line['struct_comm_type'] == x['code'], comm_type_table)
if not comm_type:
- err_string = _('\nThe File contains an invalid Structured Communication Type : %s!') % info_line['struct_comm_type']
+ err_string = _('\nThe File contains an invalid Structured Communication Type : %s.') % info_line['struct_comm_type']
err_code = 'R3003'
if batch:
return (err_code, err_string)
@@ -505,18 +505,18 @@ class account_coda_import(osv.osv_memory):
elif line[1] == '2':
# information data record 3.2
if coda_statement['coda_statement_lines'][st_line_seq]['ref'] != line[2:10]:
- err_string = _('\nCODA parsing error on information data record 3.2, seq nr %s!' \
+ err_string = _('\nCODA parsing error on information data record 3.2, seq nr %s.' \
'\nPlease report this issue via your OpenERP support channel.') % line[2:10]
err_code = 'R3004'
if batch:
return (err_code, err_string)
raise osv.except_osv(_('Error!'), err_string)
- coda_statement['coda_statement_lines'][st_line_seq]['name'] += line[10:115]
+ coda_statement['coda_statement_lines'][st_line_seq]['name'] += line[10:115]
coda_statement['coda_statement_lines'][st_line_seq]['communication'] += line[10:115]
elif line[1] == '3':
# information data record 3.3
if coda_statement['coda_statement_lines'][st_line_seq]['ref'] != line[2:10]:
- err_string = _('\nCODA parsing error on information data record 3.3, seq nr %s!' \
+ err_string = _('\nCODA parsing error on information data record 3.3, seq nr %s.' \
'\nPlease report this issue via your OpenERP support channel.') % line[2:10]
err_code = 'R3005'
if batch:
@@ -524,7 +524,7 @@ class account_coda_import(osv.osv_memory):
raise osv.except_osv(_('Error!'), err_string)
coda_statement['coda_statement_lines'][st_line_seq]['name'] += line[10:100]
coda_statement['coda_statement_lines'][st_line_seq]['communication'] += line[10:100]
-
+
elif line[0] == '4':
# free communication data record 4
comm_line = {}
@@ -535,21 +535,21 @@ class account_coda_import(osv.osv_memory):
comm_line['communication'] = comm_line['name'] = line[32:112]
coda_statement_lines[st_line_seq] = comm_line
coda_statement['coda_statement_lines'] = coda_statement_lines
-
+
elif line[0] == '8':
# new balance record
bal_end = list2float(line[42:57])
if line[41] == '1': # 1=Debit
bal_end = - bal_end
coda_statement['balance_end_real'] = bal_end
-
+
elif line[0] == '9':
# footer record
- coda_statement['balance_min'] = list2float(line[22:37])
+ coda_statement['balance_min'] = list2float(line[22:37])
coda_statement['balance_plus'] = list2float(line[37:52])
if not bal_end:
coda_statement['balance_end_real'] = coda_statement['balance_start'] + coda_statement['balance_plus'] - coda_statement['balance_min']
- if coda_parsing_note:
+ if coda_parsing_note:
coda_statement['coda_parsing_note'] = '\nStatement Line matching results:' + coda_parsing_note
else:
coda_statement['coda_parsing_note'] = ''
@@ -557,11 +557,11 @@ class account_coda_import(osv.osv_memory):
#end for
err_string = ''
- err_code = ''
+ err_code = ''
coda_id = 0
coda_note = ''
line_note = ''
-
+
try:
coda_id = coda_obj.create(cr, uid,{
'name' : codafilename,
@@ -571,7 +571,7 @@ class account_coda_import(osv.osv_memory):
'user_id': uid,
})
context.update({'coda_id': coda_id})
-
+
except osv.except_osv, e:
cr.rollback()
err_string = _('\nApplication Error : ') + str(e)
@@ -585,24 +585,24 @@ class account_coda_import(osv.osv_memory):
err_code = 'G0001'
if batch:
return (err_code, err_string)
- raise osv.except_osv(_('CODA Import failed !'), err_string)
+ raise osv.except_osv(_('CODA Import failed.'), err_string)
nb_err = 0
err_string = ''
coda_st_ids = []
- bk_st_ids = []
-
+ bk_st_ids = []
+
for statement in coda_statements:
-
+
# The CODA Statement info is written to two objects: 'coda.bank.statement' and 'account.bank.statement'
try:
-
+
coda_st_id = coda_st_obj.create(cr, uid, {
'name': statement['name'],
'type': statement['type'],
'coda_bank_account_id': statement['coda_bank_account_id'],
- 'currency': statement['currency_id'],
+ 'currency': statement['currency_id'],
'journal_id': statement['journal_id'],
'coda_id': coda_id,
'date': statement['date'],
@@ -613,7 +613,7 @@ class account_coda_import(osv.osv_memory):
})
coda_st_ids.append(coda_st_id)
- if statement['type'] == 'normal':
+ if statement['type'] == 'normal':
context.update({'ebanking_import': 1})
journal = journal_obj.browse(cr, uid, statement['journal_id'], context=context)
cr.execute('SELECT balance_end_real \
@@ -626,16 +626,15 @@ class account_coda_import(osv.osv_memory):
if journal.default_debit_account_id and (journal.default_credit_account_id == journal.default_debit_account_id):
balance_start_check = journal.default_debit_account_id.balance
else:
- nb_err += 1
- err_string += _('\nConfiguration Error in journal %s!' \
- '\nPlease verify the Default Debit and Credit Account settings.') % journal.name
+ nb_err += 1
+ err_string += _('\nConfiguration Error!\nPlease verify the Default Debit and Credit Account settings in journal %s.') % journal.name
break
if balance_start_check <> statement['balance_start']:
- nb_err += 1
- err_string += _('\nThe CODA Statement %s Starting Balance (%.2f) does not correspond with the previous Closing Balance (%.2f) in journal %s!') \
- % (statement['name'], statement['balance_start'], balance_start_check, journal.name)
- break
-
+ nb_err += 1
+ err_string += _('\nThe CODA Statement %s Starting Balance (%.2f) does not correspond with the previous Closing Balance (%.2f) in journal %s.') \
+ % (statement['name'], statement['balance_start'], balance_start_check, journal.name)
+ break
+
bk_st_id = bank_st_obj.create(cr, uid, {
'name': statement['name'],
'journal_id': statement['journal_id'],
@@ -648,7 +647,7 @@ class account_coda_import(osv.osv_memory):
})
bk_st_ids.append(bk_st_id)
coda_st_obj.write(cr, uid, [coda_st_id], {'statement_id': bk_st_id}, context=context)
-
+
glob_id_stack = [(0, '', 0, '')] # stack with tuples (glob_lvl_flag, glob_code, glob_id, glob_name)
lines = statement['coda_statement_lines']
st_line_seq = 0
@@ -657,7 +656,7 @@ class account_coda_import(osv.osv_memory):
line = lines[x]
# handling non-transactional records : line['type'] in ['information', 'communication']
-
+
if line['type'] == 'information':
line['globalisation_id'] = glob_id_stack[-1][2]
@@ -673,25 +672,25 @@ class account_coda_import(osv.osv_memory):
line['trans_category'], line['trans_category_desc'],
line['struct_comm_type'], line['struct_comm_type_desc'],
line['communication'])
-
+
coda_st_line_id = coda_st_line_obj.create(cr, uid, {
'sequence': line['sequence'],
- 'ref': line['ref'],
+ 'ref': line['ref'],
'name': line['name'].strip() or '/',
- 'type' : 'information',
- 'date': line['entry_date'],
+ 'type' : 'information',
+ 'date': line['entry_date'],
'statement_id': coda_st_id,
'note': line_note,
})
-
+
elif line['type'] == 'communication':
line_note = _('Free Communication:\n %s') \
%(line['communication'])
-
+
coda_st_line_id = coda_st_line_obj.create(cr, uid, {
'sequence': line['sequence'],
- 'ref': line['ref'],
+ 'ref': line['ref'],
'name': line['name'].strip() or '/',
'type' : 'communication',
'date': statement['date'],
@@ -699,20 +698,20 @@ class account_coda_import(osv.osv_memory):
'note': line_note,
})
- # handling transactional records, # line['type'] in ['globalisation', 'general', 'supplier', 'customer']
+ # handling transactional records, # line['type'] in ['globalisation', 'general', 'supplier', 'customer']
else:
-
+
glob_lvl_flag = line['glob_lvl_flag']
- if glob_lvl_flag:
- if glob_id_stack[-1][0] == glob_lvl_flag:
+ if glob_lvl_flag:
+ if glob_id_stack[-1][0] == glob_lvl_flag:
line['globalisation_id'] = glob_id_stack[-1][2]
glob_id_stack.pop()
else:
glob_name = line['name'].strip() or '/'
glob_code = seq_obj.get(cr, uid, 'statement.line.global')
glob_id = glob_obj.create(cr, uid, {
- 'code': glob_code,
+ 'code': glob_code,
'name': glob_name,
'type': 'coda',
'parent_id': glob_id_stack[-1][2],
@@ -720,7 +719,7 @@ class account_coda_import(osv.osv_memory):
})
line['globalisation_id'] = glob_id
glob_id_stack.append((glob_lvl_flag, glob_code, glob_id, glob_name))
-
+
line_note = _('Partner name: %s \nPartner Account Number: %s' \
'\nTransaction Type: %s - %s' \
'\nTransaction Family: %s - %s' \
@@ -735,54 +734,54 @@ class account_coda_import(osv.osv_memory):
line['trans_category'], line['trans_category_desc'],
line['struct_comm_type'], line['struct_comm_type_desc'],
line['communication'])
-
+
if line['type'] == 'globalisation':
-
+
coda_st_line_id = coda_st_line_obj.create(cr, uid, {
'sequence': line['sequence'],
- 'ref': line['ref'],
+ 'ref': line['ref'],
'name': line['name'].strip() or '/',
'type' : 'globalisation',
- 'val_date' : line['val_date'],
+ 'val_date' : line['val_date'],
'date': line['entry_date'],
- 'globalisation_level': line['glob_lvl_flag'],
- 'globalisation_amount': line['globalisation_amount'],
- 'globalisation_id': line['globalisation_id'],
+ 'globalisation_level': line['glob_lvl_flag'],
+ 'globalisation_amount': line['globalisation_amount'],
+ 'globalisation_id': line['globalisation_id'],
'partner_id': line['partner_id'] or 0,
'account_id': line['account_id'],
'statement_id': coda_st_id,
'note': line_note,
})
- else: # line['type'] in ['general', 'supplier', 'customer']
+ else: # line['type'] in ['general', 'supplier', 'customer']
- if glob_lvl_flag == 0:
+ if glob_lvl_flag == 0:
line['globalisation_id'] = glob_id_stack[-1][2]
- if not line['account_id']:
+ if not line['account_id']:
line['account_id'] = awaiting_acc
-
+
coda_st_line_id = coda_st_line_obj.create(cr, uid, {
'sequence': line['sequence'],
- 'ref': line['ref'],
+ 'ref': line['ref'],
'name': line['name'] or '/',
'type' : line['type'],
- 'val_date' : line['val_date'],
+ 'val_date' : line['val_date'],
'date': line['entry_date'],
'amount': line['amount'],
'partner_id': line['partner_id'] or 0,
'counterparty_name': line['counterparty_name'],
- 'counterparty_bic': line['counterparty_bic'],
- 'counterparty_number': line['counterparty_number'],
- 'counterparty_currency': line['counterparty_currency'],
+ 'counterparty_bic': line['counterparty_bic'],
+ 'counterparty_number': line['counterparty_number'],
+ 'counterparty_currency': line['counterparty_currency'],
'account_id': line['account_id'],
- 'globalisation_level': line['glob_lvl_flag'],
- 'globalisation_id': line['globalisation_id'],
+ 'globalisation_level': line['glob_lvl_flag'],
+ 'globalisation_id': line['globalisation_id'],
'statement_id': coda_st_id,
'note': line_note,
})
if statement['type'] == 'normal':
-
+
st_line_seq += 1
voucher_id = False
line_name = line['name'].strip()
@@ -793,7 +792,7 @@ class account_coda_import(osv.osv_memory):
line_name = '/'
if line['reconcile']:
- voucher_vals = {
+ voucher_vals = {
'type': line['type'] == 'supplier' and 'payment' or 'receipt',
'name': line_name,
'partner_id': line['partner_id'],
@@ -808,15 +807,15 @@ class account_coda_import(osv.osv_memory):
voucher_id = voucher_obj.create(cr, uid, voucher_vals, context=context)
move_line = move_line_obj.browse(cr, uid, line['reconcile'], context=context)
- voucher_dict = voucher_obj.onchange_partner_id(cr, uid, [],
- partner_id = line['partner_id'],
- journal_id = statement['journal_id'],
- price = abs(line['amount']),
- currency_id = journal.company_id.currency_id.id,
+ voucher_dict = voucher_obj.onchange_partner_id(cr, uid, [],
+ partner_id = line['partner_id'],
+ journal_id = statement['journal_id'],
+ price = abs(line['amount']),
+ currency_id = journal.company_id.currency_id.id,
ttype = line['type'] == 'supplier' and 'payment' or 'receipt',
date = line['val_date'],
context = context)
- #_logger.warning('voucher_dict = %s' % voucher_dict)
+ #_logger.warning('voucher_dict = %s' % voucher_dict)
voucher_line_vals = False
if voucher_dict['value']['line_ids']:
for line_dict in voucher_dict['value']['line_ids']:
@@ -831,38 +830,38 @@ class account_coda_import(osv.osv_memory):
bank_st_line_id = bank_st_line_obj.create(cr, uid, {
'sequence': st_line_seq,
- 'ref': line['ref'],
+ 'ref': line['ref'],
'name': line_name,
'type' : line['type'],
- 'val_date' : line['val_date'],
+ 'val_date' : line['val_date'],
'date': line['entry_date'],
'amount': line['amount'],
'partner_id': line['partner_id'] or 0,
'counterparty_name': line['counterparty_name'],
- 'counterparty_bic': line['counterparty_bic'],
- 'counterparty_number': line['counterparty_number'],
- 'counterparty_currency': line['counterparty_currency'],
+ 'counterparty_bic': line['counterparty_bic'],
+ 'counterparty_number': line['counterparty_number'],
+ 'counterparty_currency': line['counterparty_currency'],
'account_id': line['account_id'],
- 'globalisation_id': line['globalisation_id'],
+ 'globalisation_id': line['globalisation_id'],
'statement_id': bk_st_id,
'voucher_id': voucher_id,
'note': line_note,
- })
+ })
# end 'for x in lines'
coda_st_obj.write(cr, uid, [coda_st_id], {}, context=context) # calculate balance
st_balance = coda_st_obj.read(cr, uid, coda_st_id, ['balance_end', 'balance_end_real'], context=context)
if st_balance['balance_end'] <> st_balance['balance_end_real']:
- err_string += _('\nIncorrect ending Balance in CODA Statement %s for Bank Account %s!') \
+ err_string += _('\nIncorrect ending Balance in CODA Statement %s for Bank Account %s.') \
% (statement['coda_seq_number'], (statement['acc_number'] + ' (' + statement['currency'] + ') - ' + statement['description']))
if statement['type'] == 'normal':
nb_err += 1
break
else:
statement['coda_parsing_note'] += '\n' + err_string
-
- if statement['type'] == 'normal':
- bank_st_obj.button_dummy(cr, uid, [bk_st_id], context=context) # calculate balance
+
+ if statement['type'] == 'normal':
+ bank_st_obj.button_dummy(cr, uid, [bk_st_id], context=context) # calculate balance
journal_name = journal.name
else:
journal_name = _('None')
@@ -904,7 +903,7 @@ class account_coda_import(osv.osv_memory):
_logger.error('Unknown Error while processing Statement %s\n%s' % (statement.get('name', '/'),tb))
# end 'for statement in coda_statements'
-
+
coda_note_header = _('CODA File is Imported :')
coda_note_footer = _('\n\nNumber of statements : ') + str(len(coda_st_ids))
err_log = err_log + _('\nNumber of errors : ') + str(nb_err) + '\n'
@@ -920,13 +919,13 @@ class account_coda_import(osv.osv_memory):
if batch:
err_code = 'G0002'
return (err_code, err_string)
- raise osv.except_osv(_('CODA Import failed !'), err_string)
-
+ raise osv.except_osv(_('CODA Import failed.'), err_string)
+
context.update({ 'bk_st_ids': bk_st_ids})
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'account_coda_import_result_view')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
self.write(cr, uid, ids, {'note': note}, context=context)
-
+
return {
'name': _('Import CODA File result'),
'res_id': ids[0],
@@ -961,7 +960,7 @@ class account_coda_import(osv.osv_memory):
domain += [('id','in', context.get('bk_st_ids', False))]
action.update({'domain': domain})
return action
-
+
account_coda_import()
def str2date(date_str):
diff --git a/addons/account_payment/account_move_line.py b/addons/account_payment/account_move_line.py
index 24f9486be95..cbbeb949b3c 100644
--- a/addons/account_payment/account_move_line.py
+++ b/addons/account_payment/account_move_line.py
@@ -107,7 +107,7 @@ class account_move_line(osv.osv):
if line.id not in line2bank and line.partner_id.bank_ids:
line2bank[line.id] = line.partner_id.bank_ids[0].id
else:
- raise osv.except_osv(_('Error !'), _('No partner defined on entry line'))
+ raise osv.except_osv(_('Error!'), _('There is no partner defined on the entry line.'))
return line2bank
_columns = {
diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py
index 22b7fc5f6f2..1d4c46df029 100644
--- a/addons/account_payment/account_payment.py
+++ b/addons/account_payment/account_payment.py
@@ -71,8 +71,8 @@ class payment_order(osv.osv):
#dead code
def get_wizard(self, type):
logger = netsvc.Logger()
- logger.notifyChannel("warning", netsvc.LOG_WARNING,
- "No wizard found for the payment type '%s'." % type)
+ logger.notifyChannel("Warning!", netsvc.LOG_WARNING,
+ "No wizard is found for the payment type '%s'." % type)
return None
def _total(self, cursor, user, ids, name, args, context=None):
diff --git a/addons/account_payment/i18n/account_payment.pot b/addons/account_payment/i18n/account_payment.pot
index 0588747c3f7..fd8672885c3 100644
--- a/addons/account_payment/i18n/account_payment.pot
+++ b/addons/account_payment/i18n/account_payment.pot
@@ -402,7 +402,7 @@ msgstr ""
#. module: account_payment
#: code:addons/account_payment/account_move_line.py:110
#, python-format
-msgid "No partner defined on entry line"
+msgid "No partner is defined on entry line."
msgstr ""
#. module: account_payment
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 2cefaf15f0e..ce0c64337b9 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -473,7 +473,7 @@ class account_voucher(osv.osv):
tr_type = 'purchase'
else:
if not journal.default_credit_account_id or not journal.default_debit_account_id:
- raise osv.except_osv(_('Error !'), _('Please define default credit/debit accounts on the journal "%s" !') % (journal.name))
+ raise osv.except_osv(_('Error!'), _('Please define default credit/debit accounts on the journal "%s".') % (journal.name))
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
tr_type = 'receipt'
@@ -822,7 +822,7 @@ class account_voucher(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for t in self.read(cr, uid, ids, ['state'], context=context):
if t['state'] not in ('draft', 'cancel'):
- raise osv.except_osv(_('Invalid action !'), _('Cannot delete Voucher(s) which are already opened or paid !'))
+ raise osv.except_osv(_('Invalid Action!'), _('Cannot delete voucher(s) which are already opened or paid.'))
return super(account_voucher, self).unlink(cr, uid, ids, context=context)
def onchange_payment(self, cr, uid, ids, pay_now, journal_id, partner_id, ttype='sale'):
@@ -919,8 +919,8 @@ class account_voucher(osv.osv):
elif voucher_brw.journal_id.sequence_id:
name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context)
else:
- raise osv.except_osv(_('Error !'),
- _('Please define a sequence on the journal !'))
+ raise osv.except_osv(_('Error!'),
+ _('Please define a sequence on the journal.'))
if not voucher_brw.reference:
ref = name.replace('/','')
else:
@@ -952,11 +952,11 @@ class account_voucher(osv.osv):
if amount_residual > 0:
account_id = line.voucher_id.company_id.expense_currency_exchange_account_id
if not account_id:
- raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! "))
+ raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Income Currency Rate' on the company, then create accounting entry for currency rate difference."))
else:
account_id = line.voucher_id.company_id.income_currency_exchange_account_id
if not account_id:
- raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! "))
+ raise osv.except_osv(_('Warning!'),_("First you have to configure the 'Expense Currency Rate' on the company, then create accounting entry for currency rate difference."))
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
# the receivable/payable account may have a secondary currency, which render this field mandatory
account_currency_id = company_currency <> current_currency and current_currency or False
@@ -1516,7 +1516,7 @@ class account_bank_statement_line(osv.osv):
return True
_constraints = [
- (_check_amount, 'The amount of the voucher must be the same amount as the one on the statement line', ['amount']),
+ (_check_amount, 'The amount of the voucher must be the same amount as the one on the statement line.', ['amount']),
]
_columns = {
diff --git a/addons/account_voucher/i18n/account_voucher.pot b/addons/account_voucher/i18n/account_voucher.pot
index 17159ada24f..f713571cb4b 100644
--- a/addons/account_voucher/i18n/account_voucher.pot
+++ b/addons/account_voucher/i18n/account_voucher.pot
@@ -81,7 +81,7 @@ msgstr ""
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:797
#, python-format
-msgid "Cannot delete Voucher(s) which are already opened or paid !"
+msgid "Cannot delete Voucher(s) which are already opened or paid."
msgstr ""
#. module: account_voucher
@@ -299,7 +299,7 @@ msgstr ""
#: code:addons/account_voucher/account_voucher.py:927
#: code:addons/account_voucher/account_voucher.py:931
#, python-format
-msgid "Warning"
+msgid "Warning!"
msgstr ""
#. module: account_voucher
@@ -346,7 +346,7 @@ msgstr ""
#. module: account_voucher
#: constraint:res.company:0
-msgid "Error! You can not create recursive companies."
+msgid "Error! You cannot create recursive companies."
msgstr ""
#. module: account_voucher
@@ -520,7 +520,7 @@ msgstr ""
#: constraint:account.bank.statement.line:0
msgid ""
"The amount of the voucher must be the same amount as the one on the "
-"statement line"
+"statement line."
msgstr ""
#. module: account_voucher
@@ -620,8 +620,8 @@ msgstr ""
#: code:addons/account_voucher/account_voucher.py:927
#, python-format
msgid ""
-"Unable to create accounting entry for currency rate difference. You have to "
-"configure the field 'Income Currency Rate' on the company! "
+"First configure the 'Income Currency Rate' on the company,after that create "
+"accounting entry for currency rate difference."
msgstr ""
#. module: account_voucher
@@ -751,7 +751,7 @@ msgstr ""
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:462
#, python-format
-msgid "Please define default credit/debit accounts on the journal \"%s\" !"
+msgid "Please define default credit/debit accounts on the journal \"%s\"."
msgstr ""
#. module: account_voucher
@@ -762,7 +762,7 @@ msgstr ""
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:895
#, python-format
-msgid "Please define a sequence on the journal !"
+msgid "Please define a sequence on the journal."
msgstr ""
#. module: account_voucher
@@ -1059,8 +1059,8 @@ msgstr ""
#: code:addons/account_voucher/account_voucher.py:931
#, python-format
msgid ""
-"Unable to create accounting entry for currency rate difference. You have to "
-"configure the field 'Expense Currency Rate' on the company! "
+"First configure the 'Expense Currency Rate' on the company,after that create "
+"accounting entry for currency rate difference."
msgstr ""
#. module: account_voucher
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index c16ed82a580..165af37888d 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -140,7 +140,7 @@ class account_analytic_account(osv.osv):
for account in self.browse(cr, uid, ids, context=context):
if account.company_id:
if account.company_id.currency_id.id != value:
- raise osv.except_osv(_('Error !'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example."))
+ raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example."))
return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, ))
def _currency(self, cr, uid, ids, field_name, arg, context=None):
@@ -232,7 +232,7 @@ class account_analytic_account(osv.osv):
_order = 'name asc'
_constraints = [
- (check_recursion, 'Error! You can not create recursive analytic accounts.', ['parent_id']),
+ (check_recursion, 'Error! You cannot create recursive analytic accounts.', ['parent_id']),
]
def copy(self, cr, uid, id, default=None, context=None):
@@ -333,7 +333,7 @@ class account_analytic_line(osv.osv):
return True
_constraints = [
- (_check_no_view, 'You can not create analytic line on view account.', ['account_id']),
+ (_check_no_view, 'You cannot create analytic line on view account.', ['account_id']),
]
account_analytic_line()
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py
index cfb1aba10d1..9233845f7eb 100644
--- a/addons/analytic_user_function/analytic_user_function.py
+++ b/addons/analytic_user_function/analytic_user_function.py
@@ -92,7 +92,7 @@ class hr_analytic_timesheet(osv.osv):
if not a:
a = r.product_id.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 define ' \
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
@@ -127,7 +127,7 @@ class hr_analytic_timesheet(osv.osv):
if not a:
a = r.product_id.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 define ' \
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py
index b6e4d802ce2..47e168a12b8 100644
--- a/addons/anonymization/anonymization.py
+++ b/addons/anonymization/anonymization.py
@@ -425,7 +425,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
elif field_type == 'integer':
anonymized_value = 0
elif field_type in ['binary', 'many2many', 'many2one', 'one2many', 'reference']: # cannot anonymize these kind of fields
- msg = "Cannot anonymize fields of these types: binary, many2many, many2one, one2many, reference"
+ msg = "Cannot anonymize fields of these types: binary, many2many, many2one, one2many, reference."
self._raise_after_history_update(cr, uid, history_id, 'Error !', msg)
if anonymized_value is None:
@@ -453,9 +453,9 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
# add a result message in the wizard:
msgs = ["Anonymization successful.",
"",
- "Don't forget to save the resulting file to a safe place because you will not be able to revert the anonymization without this file.",
+ "Donot forget to save the resulting file to a safe place because you will not be able to revert the anonymization without this file.",
"",
- "This file is also stored in the %s directory. The absolute file path is: %s",
+ "This file is also stored in the %s directory. The absolute file path is: %s.",
]
msg = '\n'.join(msgs) % (dirpath, abs_filepath)
@@ -515,7 +515,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
wizards = self.browse(cr, uid, ids, context=context)
for wizard in wizards:
if not wizard.file_import:
- msg = "The anonymization export file was not supplied. It is not possible to reverse the anonymization process without this file."
+ msg = "It is not possible to reverse the anonymization process without supplying anonymization export file."
self._raise_after_history_update(cr, uid, history_id, 'Error !', msg)
# reverse the anonymization:
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 1a3d96cbc33..7699256985c 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -37,7 +37,7 @@ def get_datetime(date_field):
date_split = date_field.split(' ')
if len(date_split) == 1:
date_field = date_split[0] + " 00:00:00"
-
+
return datetime.strptime(date_field[:19], '%Y-%m-%d %H:%M:%S')
@@ -185,7 +185,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
self.post_action(cr, uid, [new_id], model, context=context)
return new_id
return wrapper
-
+
def _write(self, old_write, model, context=None):
"""
Return a wrapper around `old_write` calling both `old_write` and
@@ -327,7 +327,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
reply_to = emailfrom
if not emailfrom:
raise osv.except_osv(_('Error!'),
- _("No Email ID Found for your Company address!"))
+ _("No email ID found for your company address."))
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id)
@@ -490,7 +490,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
return True
_constraints = [
- (_check_mail, 'Error: The mail is not well formated', ['act_mail_body']),
+ (_check_mail, 'Error ! The mail is not well formated.', ['act_mail_body']),
]
base_action_rule()
diff --git a/addons/base_action_rule/i18n/base_action_rule.pot b/addons/base_action_rule/i18n/base_action_rule.pot
index 9b09e28a1f3..d170ac45d9d 100644
--- a/addons/base_action_rule/i18n/base_action_rule.pot
+++ b/addons/base_action_rule/i18n/base_action_rule.pot
@@ -286,7 +286,7 @@ msgstr ""
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:329
#, python-format
-msgid "No Email ID Found for your Company address!"
+msgid "No Email ID is found for your Company address!"
msgstr ""
#. module: base_action_rule
@@ -332,7 +332,7 @@ msgstr ""
#. module: base_action_rule
#: constraint:base.action.rule:0
-msgid "Error: The mail is not well formated"
+msgid "Error ! The mail is not well formated."
msgstr ""
#. module: base_action_rule
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index d14e0001be1..b570c2ef011 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -48,18 +48,18 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=None):
def todate(date):
val = parser.parse(''.join((re.compile('\d')).findall(date)))
return val
-
+
if not startdate:
startdate = datetime.now()
-
+
if not exdate:
exdate = []
-
+
rset1 = rrule.rrulestr(str(rrulestring), dtstart=startdate, forceset=True)
for date in exdate:
datetime_obj = todate(date)
rset1._exdate.append(datetime_obj)
-
+
if exrule:
rset1.exrule(rrule.rrulestr(str(exrule), dtstart=startdate))
@@ -413,7 +413,7 @@ property or property parameter."),
cal = vobject.iCalendar()
event = cal.add('vevent')
if not event_obj.date_deadline or not event_obj.date:
- raise osv.except_osv(_('Warning !'),_("Couldn't Invite because date is not specified!"))
+ raise osv.except_osv(_('Warning!'),_("First you have to specify the date of the invitation."))
event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S'))
event.add('dtstart').value = ics_datetime(event_obj.date)
event.add('dtend').value = ics_datetime(event_obj.date_deadline)
@@ -995,17 +995,17 @@ class calendar_event(osv.osv):
@param context: A standard dictionary for contextual values
@return: dictionary of rrule value.
"""
-
+
result = {}
if not isinstance(ids, list):
ids = [ids]
-
+
for datas in self.read(cr, uid, ids, ['id','byday','recurrency', 'month_list','end_date', 'rrule_type', 'select1', 'interval', 'count', 'end_type', 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su', 'exrule', 'day', 'week_list' ], context=context):
event = datas['id']
if datas.get('interval', 0) < 0:
- raise osv.except_osv(_('Warning!'), _('Interval cannot be negative'))
+ raise osv.except_osv(_('Warning!'), _('Interval cannot be negative.'))
if datas.get('count', 0) < 0:
- raise osv.except_osv(_('Warning!'), _('Count cannot be negative'))
+ raise osv.except_osv(_('Warning!'), _('Count cannot be negative.'))
if datas['recurrency']:
result[event] = self.compute_rule_string(datas)
else:
@@ -1092,7 +1092,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
true, it will allow you to hide the event alarm information without removing it."),
'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"),
}
-
+
def default_organizer(self, cr, uid, context=None):
user_pool = self.pool.get('res.users')
user = user_pool.browse(cr, uid, uid, context=context)
@@ -1189,23 +1189,23 @@ rule or repeating pattern of time to exclude from the recurring rule."),
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
if byday:
return ';BYDAY=' + ','.join(byday)
- return ''
-
+ return ''
+
def get_month_string(freq, datas):
if freq == 'monthly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
- raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
-
+ raise osv.except_osv(_('Error!'), ("Please select a proper day of the month."))
+
if datas.get('select1')=='day':
return ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
return ';BYMONTHDAY=' + str(datas.get('day'))
return ''
-
+
def get_end_date(datas):
if datas.get('end_date'):
datas['end_date_new'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + 'T235959Z'
-
+
return (datas.get('end_type') == 'count' and (';COUNT=' + str(datas.get('count'))) or '') +\
((datas.get('end_date_new') and datas.get('end_type') == 'end_date' and (';UNTIL=' + datas.get('end_date_new'))) or '')
@@ -1216,32 +1216,32 @@ rule or repeating pattern of time to exclude from the recurring rule."),
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
return 'FREQ=' + freq.upper() + get_week_string(freq, datas) + interval_srting + get_end_date(datas) + get_month_string(freq, datas)
-
+
def _get_empty_rrule_data(self):
return {
'byday' : False,
'recurrency' : False,
- 'end_date' : False,
- 'rrule_type' : False,
- 'select1' : False,
- 'interval' : 0,
- 'count' : False,
- 'end_type' : False,
- 'mo' : False,
- 'tu' : False,
- 'we' : False,
- 'th' : False,
- 'fr' : False,
- 'sa' : False,
- 'su' : False,
- 'exrule' : False,
- 'day' : False,
+ 'end_date' : False,
+ 'rrule_type' : False,
+ 'select1' : False,
+ 'interval' : 0,
+ 'count' : False,
+ 'end_type' : False,
+ 'mo' : False,
+ 'tu' : False,
+ 'we' : False,
+ 'th' : False,
+ 'fr' : False,
+ 'sa' : False,
+ 'su' : False,
+ 'exrule' : False,
+ 'day' : False,
'week_list' : False
}
#def _write_rrule(self, cr, uid, ids, field_value, rule_date=False, context=None):
# data = self._get_empty_rrule_data()
- #
+ #
# if field_value:
# data['recurrency'] = True
# for event in self.browse(cr, uid, ids, context=context):
@@ -1250,16 +1250,16 @@ rule or repeating pattern of time to exclude from the recurring rule."),
# data.update(update_data)
# #parse_rrule
# self.write(cr, uid, event.id, data, context=context)
-
+
def _parse_rrule(self, rule, data, date_start):
day_list = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
rrule_type = ['yearly', 'monthly', 'weekly', 'daily']
r = rrule.rrulestr(rule, dtstart=datetime.strptime(date_start, "%Y-%m-%d %H:%M:%S"))
-
+
if r._freq > 0 and r._freq < 4:
data['rrule_type'] = rrule_type[r._freq]
-
+
data['count'] = r._count
data['interval'] = r._interval
data['end_date'] = r._until and r._until.strftime("%Y-%m-%d %H:%M:%S")
@@ -1270,36 +1270,36 @@ rule or repeating pattern of time to exclude from the recurring rule."),
data[day_list[i]] = True
data['rrule_type'] = 'weekly'
#repeat monthly bynweekday ((weekday, weeknumber), )
- if r._bynweekday:
+ if r._bynweekday:
data['week_list'] = day_list[r._bynweekday[0][0]].upper()
data['byday'] = r._bynweekday[0][1]
data['select1'] = 'day'
- data['rrule_type'] = 'monthly'
-
+ data['rrule_type'] = 'monthly'
+
if r._bymonthday:
data['day'] = r._bymonthday[0]
data['select1'] = 'date'
data['rrule_type'] = 'monthly'
-
+
#yearly but for openerp it's monthly, take same information as monthly but interval is 12 times
if r._bymonth:
data['interval'] = data['interval'] * 12
-
+
#FIXEME handle forever case
- #end of recurrence
+ #end of recurrence
#in case of repeat for ever that we do not support right now
if not (data.get('count') or data.get('end_date')):
data['count'] = 100
if data.get('count'):
data['end_type'] = 'count'
else:
- data['end_type'] = 'end_date'
- return data
+ data['end_type'] = 'end_date'
+ return data
def remove_virtual_id(self, ids):
if isinstance(ids, (str, int, long)):
return base_calendar_id2real_id(ids)
-
+
if isinstance(ids, (list, tuple)):
res = []
for id in ids:
@@ -1345,7 +1345,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
def need_to_update(self, event_id, vals):
split_id = str(event_id).split("-")
if len(split_id) < 2:
- return False
+ return False
else:
date_start = vals.get('date', '')
try:
@@ -1409,9 +1409,9 @@ rule or repeating pattern of time to exclude from the recurring rule."),
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
if not context:
context = {}
-
+
if 'date' in groupby:
- raise osv.except_osv(_('Warning !'), _('Group by date not supported, use the calendar view instead'))
+ raise osv.except_osv(_('Warning!'), _('Group by date is not supported, use the calendar view instead.'))
virtual_id = context.get('virtual_id', True)
context.update({'virtual_id': False})
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
@@ -1479,7 +1479,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
def copy(self, cr, uid, id, default=None, context=None):
if context is None:
context = {}
-
+
res = super(calendar_event, self).copy(cr, uid, base_calendar_id2real_id(id), default, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
diff --git a/addons/base_calendar/i18n/base_calendar.pot b/addons/base_calendar/i18n/base_calendar.pot
index 628f7af2baa..f727d429e95 100644
--- a/addons/base_calendar/i18n/base_calendar.pot
+++ b/addons/base_calendar/i18n/base_calendar.pot
@@ -108,7 +108,7 @@ msgstr ""
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:1006
#, python-format
-msgid "Count cannot be negative"
+msgid "Count cannot be negative."
msgstr ""
#. module: base_calendar
@@ -261,7 +261,7 @@ msgstr ""
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:1004
#, python-format
-msgid "Interval cannot be negative"
+msgid "Interval cannot be negative."
msgstr ""
#. module: base_calendar
@@ -273,7 +273,7 @@ msgstr ""
#. module: base_calendar
#: code:addons/base_calendar/wizard/base_calendar_invite_attendee.py:143
#, python-format
-msgid "%s must have an email address to send mail"
+msgid "%s must have an email address to send mail."
msgstr ""
#. module: base_calendar
@@ -407,7 +407,7 @@ msgstr ""
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:1411
#, python-format
-msgid "Group by date not supported, use the calendar view instead"
+msgid "Group by date is not supported, use the calendar view instead."
msgstr ""
#. module: base_calendar
@@ -1405,7 +1405,7 @@ msgstr ""
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:418
#, python-format
-msgid "Couldn't Invite because date is not specified!"
+msgid "First specified the date for Invitation."
msgstr ""
#. module: base_calendar
diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py
index 5da711cf657..b49c4219ce8 100644
--- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py
+++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py
@@ -92,9 +92,9 @@ send an Email to Invited Person')
else:
return {'type': 'ir.actions.act_window_close'}
if type == 'internal':
-
+
if not datas.get('user_ids'):
- raise osv.except_osv(_('Error!'), ("Please select any User"))
+ raise osv.except_osv(_('Error!'), ("Please select any user."))
for user_id in datas.get('user_ids'):
user = user_obj.browse(cr, uid, user_id)
res = {
@@ -141,7 +141,7 @@ send an Email to Invited Person')
if not mail_to:
name = map(lambda x: x[1], filter(lambda x: type==x[0], \
self._columns['type'].selection))
- raise osv.except_osv(_('Error!'), _("%s must have an email address to send mail") %(name[0]))
+ raise osv.except_osv(_('Error!'), _("%s must have an email address to send mail.") %(name[0]))
att_obj._send_mail(cr, uid, attendees, mail_to, \
email_from = current_user.user_email or tools.config.get('email_from', False))
diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py
index 8a9d1ac1dc7..f7e200560a3 100644
--- a/addons/base_crypt/crypt.py
+++ b/addons/base_crypt/crypt.py
@@ -139,7 +139,7 @@ class users(osv.osv):
def set_pw(self, cr, uid, id, name, value, args, context):
if not value:
- raise osv.except_osv(_('Error'), _("Please specify the password !"))
+ raise osv.except_osv(_('Error!'), _("You have to specify a password."))
obj = pooler.get_pool(cr.dbname).get('res.users')
if not hasattr(obj, "_salt_cache"):
@@ -181,8 +181,8 @@ class users(osv.osv):
cr = pooler.get_db(db).cursor()
return self._login(cr, db, login, password)
except Exception:
- _logger.exception('Could not authenticate')
- return Exception('Access Denied')
+ _logger.exception('Cannot authenticate.')
+ return Exception('Access denied.')
finally:
if cr is not None:
cr.close()
@@ -196,9 +196,9 @@ class users(osv.osv):
else:
# Return early if no one has a login name like that.
return False
-
+
stored_pw = self.maybe_encrypt(cr, stored_pw, id)
-
+
if not stored_pw:
# means couldn't encrypt or user is not active!
return False
@@ -210,16 +210,16 @@ class users(osv.osv):
obj._salt_cache = {}
salt = obj._salt_cache[id] = stored_pw[len(magic_md5):11]
encrypted_pw = encrypt_md5(password, salt)
-
+
# Check if the encrypted password matches against the one in the db.
cr.execute("""UPDATE res_users
SET date=now() AT TIME ZONE 'UTC'
WHERE id=%s AND password=%s AND active
- RETURNING id""",
+ RETURNING id""",
(int(id), encrypted_pw.encode('utf-8')))
res = cr.fetchone()
cr.commit()
-
+
if res:
return res[0]
else:
@@ -249,13 +249,13 @@ class users(osv.osv):
stored_login = cr.fetchone()
if stored_login:
stored_login = stored_login[0]
-
+
res = self._login(cr, db, stored_login, passwd)
if not res:
raise security.ExceptionNoTb('AccessDenied')
else:
salt = self._salt_cache[db][uid]
- cr.execute('SELECT COUNT(*) FROM res_users WHERE id=%s AND password=%s AND active',
+ cr.execute('SELECT COUNT(*) FROM res_users WHERE id=%s AND password=%s AND active',
(int(uid), encrypt_md5(passwd, salt)))
res = cr.fetchone()[0]
finally:
@@ -271,10 +271,10 @@ class users(osv.osv):
else:
self._uid_cache[db] = {uid: passwd}
return bool(res)
-
+
def maybe_encrypt(self, cr, pw, id):
""" Return the password 'pw', making sure it is encrypted.
-
+
If the password 'pw' is not encrypted, then encrypt all active passwords
in the db. Returns the (possibly newly) encrypted password for 'id'.
"""
@@ -296,4 +296,5 @@ class users(osv.osv):
return pw
users()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_crypt/i18n/base_crypt.pot b/addons/base_crypt/i18n/base_crypt.pot
index 37e53396a9f..8909937b754 100644
--- a/addons/base_crypt/i18n/base_crypt.pot
+++ b/addons/base_crypt/i18n/base_crypt.pot
@@ -39,6 +39,6 @@ msgstr ""
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:140
#, python-format
-msgid "Error"
+msgid "Error!"
msgstr ""
diff --git a/addons/base_module_record/wizard/base_module_save.py b/addons/base_module_record/wizard/base_module_save.py
index 1d54e212a28..5e557472f7e 100644
--- a/addons/base_module_record/wizard/base_module_save.py
+++ b/addons/base_module_record/wizard/base_module_save.py
@@ -33,7 +33,7 @@ def _create_yaml(self, cr, uid, data, context=None):
try:
res_xml = mod.generate_yaml(cr, uid)
except Exception, e:
- raise osv.except_osv(_('Error'),_(str(e)))
+ raise osv.except_osv(_('Error!'),_(str(e)))
return {
'yaml_file': base64.encodestring(res_xml),
}
diff --git a/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py b/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py
index 4819007f1d0..a37d46b78a2 100644
--- a/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py
+++ b/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py
@@ -138,7 +138,7 @@ class DomApi(DomApiGeneral):
if self.styles_dom.getElementsByTagName("style:page-master").__len__()<>0:
self.page_master = self.styles_dom.getElementsByTagName("style:page-master")[0]
if self.styles_dom.getElementsByTagName("style:page-layout").__len__()<>0 :
- self.page_master = self.styles_dom.getElementsByTagName("style:page-layout")[0]
+ self.page_master = self.styles_dom.getElementsByTagName("style:page-layout")[0]
self.document = self.content_dom.getElementsByTagName("office:document-content")[0]
def buildStylePropertiesDict(self):
@@ -307,16 +307,16 @@ def sxw2rml(sxw_file, xsl, output='.', save_pict=False):
tool = PyOpenOffice(output, save_pict = save_pict)
res = tool.unpackNormalize(sxw_file)
-
+
f = StringIO(xsl)
styledoc = etree.parse(f)
style = etree.XSLT(styledoc)
-
+
f = StringIO(res)
doc = etree.parse(f)
result = style(doc)
root = etree.XPathEvaluator(result)("/document/stylesheet")
-
+
if root:
root=root[0]
images = etree.Element("images")
@@ -341,7 +341,7 @@ if __name__ == "__main__":
parser.add_option("-o", "--output", dest="output", default='.', help="directory of image output")
(opt, args) = parser.parse_args()
if len(args) != 1:
- parser.error("incorrect number of arguments")
+ parser.error("Incorrect number of arguments.")
import sys
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
index c65ba32e6bf..a9a18cd9bfa 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -145,7 +145,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
self.aSearchResult =self.sock.execute( database, uid, self.password, self.dModel[modelSelectedItem], 'name_search', self.win.getEditText("txtSearchName"))
self.win.removeListBoxItems("lstResource", 0, self.win.getListBoxItemCount("lstResource"))
if self.aSearchResult == []:
- ErrorDialog("No search result found !!!", "", "Search ERROR" )
+ ErrorDialog("No search result found.", "", "Search Error.")
return
for result in self.aSearchResult:
@@ -172,7 +172,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
docinfo = oDoc2.getDocumentInfo()
if oDoc2.getURL() == "":
- ErrorDialog("Please save your file", "", "Saving ERROR" )
+ ErrorDialog("You should save your file.", "", "Saving Error.")
return None
url = oDoc2.getURL()
@@ -180,7 +180,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
url = self.doc2pdf(url[7:])
if url == None:
- ErrorDialog( "Ploblem in creating PDF", "", "PDF Error" )
+ ErrorDialog( "Problem in creating PDF.", "", "PDF Error.")
return None
url = url[7:]
@@ -193,7 +193,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
docinfo = oDoc2.getDocumentInfo()
if self.win.getListBoxSelectedItem("lstResourceType") == "":
- ErrorDialog("Please select resource type", "", "Selection ERROR" )
+ ErrorDialog("You have to select a resource type.", "", "Selection Error." )
return
res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) )
@@ -201,11 +201,11 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
def btnOkWithInformation_clicked(self,oActionEvent):
if self.win.getListBoxSelectedItem("lstResourceType") == "":
- ErrorDialog( "Please select resource type", "", "Selection ERROR" )
+ ErrorDialog( "You have to select a resource type.", "", "Selection Error." )
return
if self.win.getListBoxSelectedItem("lstResource") == "" or self.win.getListBoxSelectedItem("lstmodel") == "":
- ErrorDialog("Please select Model and Resource","","Selection ERROR")
+ ErrorDialog("You have to select Model and Resource.", "", "Selection Error.")
return
resourceid = None
@@ -215,7 +215,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
break
if resourceid == None:
- ErrorDialog("No resource selected !!!", "", "Resource ERROR" )
+ ErrorDialog("No resource is selected.", "", "Resource Error." )
return
res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid )
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
index cdc5c7553b1..75bfd65e1b6 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
@@ -125,7 +125,7 @@ class Change( unohelper.Base, XJobExecutor ):
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ServerParameter', LOG_ERROR, info)
- ErrorDialog("Connection to server fail. please check your Server Parameter", "", "Error")
+ ErrorDialog("Connection to server is fail. Please check your Server Parameter.", "", "Error!")
self.win.endExecute()
def btnCancel_clicked(self,oActionEvent):
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
index dd00f1719e1..644763595df 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -106,7 +106,7 @@ class ExportToRML( unohelper.Base, XJobExecutor ):
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ExportToRML',LOG_ERROR, info)
- ErrorDialog("Can't save the file to the hard drive.", "Exception: %s" % e, "Error" )
+ ErrorDialog("Cannot save the file to the hard drive.", "Exception: %s." % e, "Error" )
def GetAFileName(self):
sFilePickerArgs = Array(10)
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
index ecdf13454dc..6c0d04d4bf3 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
@@ -103,7 +103,7 @@ class Expression(unohelper.Base, XJobExecutor ):
tableText.insertTextContent(cursor,oInputList,False)
self.win.endExecute()
else:
- ErrorDialog("Please Fill appropriate data in Name field or \nExpression field")
+ ErrorDialog("Please fill appropriate data in Name field or in Expression field.")
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
index e7c2b33ca88..513be2e0e64 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
@@ -279,7 +279,7 @@ class Fields(unohelper.Base, XJobExecutor ):
widget.insertTextContent(cursor,oInputList,False)
self.win.endExecute()
else:
- ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields")
+ ErrorDialog("Please fill appropriate data in Name field \nor select particular value from the list of fields.")
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
index 2ccd8358c97..ebe2650575d 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -64,7 +64,6 @@ if __name__<>'package':
database="test"
uid = 3
-#
class ModifyExistingReport(unohelper.Base, XJobExecutor):
def __init__(self,ctx):
self.ctx = ctx
@@ -93,7 +92,7 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
ids = self.sock.execute(database, uid, self.password, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(ids):
- ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error")
+ ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error!")
exit(1)
ids = self.sock.execute(database, uid, self.password, 'ir.actions.report.xml', 'search', [('report_xsl', '=', False),('report_xml', '=', False)])
@@ -167,11 +166,11 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
if oDoc2.hasLocation() and not oDoc2.isReadonly():
oDoc2.store()
- ErrorDialog("Download is Completed","Your file has been placed here :\n"+ fp_name,"Download Message")
+ ErrorDialog("Download is completed.","Your file has been placed here :\n ."+ fp_name,"Download Message !")
obj=Logger()
obj.log_write('Modify Existing Report',LOG_INFO, ':successful download report %s using database %s' % (self.report_with_id[selectedItemPos][2], database))
except Exception, e:
- ErrorDialog("Report has not been downloaded", "Report: %s\nDetails: %s" % ( fp_name, str(e) ),"Download Message")
+ ErrorDialog("The report could not be downloaded.", "Report: %s\nDetails: %s" % ( fp_name, str(e) ),"Download Message !")
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ModifyExistingReport', LOG_ERROR, info)
@@ -193,15 +192,15 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
str_value='ir.actions.report.xml,'+str(id)
ids = self.sock.execute(database, uid, self.password, 'ir.values' , 'search',[('value','=',str_value)])
if ids:
- rec = self.sock.execute(database, uid, self.password, 'ir.values', 'unlink', ids,)
+ rec = self.sock.execute(database, uid, self.password, 'ir.values', 'unlink', ids,)
else :
pass
if temp:
- ErrorDialog("Report","Report has been Delete:\n "+name,"Message")
- self.logobj.log_write('Delete Report',LOG_INFO, ':successful delete report %s using database %s' % (name, database))
+ ErrorDialog("Report", "The report could not be deleted:\n"+name+".", "Message !")
+ self.logobj.log_write('Delete Report', LOG_INFO, ': report %s successfully deleted using database %s.' % (name, database))
else:
- ErrorDialog("Report","Report has not Delete:\n"+name," Message")
+ ErrorDialog("Report", "The report could not be deleted:\n"+name+".", "Message !")
self.win.endExecute()
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
index 0eab6d1710c..ca2d9bf2d36 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
@@ -288,7 +288,7 @@ class RepeatIn( unohelper.Base, XJobExecutor ):
widget.insertTextContent(cursor,oInputList,False)
self.win.endExecute()
else:
- ErrorDialog("Please Fill appropriate data in Object Field or Name field \nor select perticular value from the list of fields")
+ ErrorDialog("Please fill appropriate data in Object Field or Name field \nor select particular value from the list of fields.")
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
index 3a6d799f8a5..d32f7aa6c20 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -65,8 +65,6 @@ if __name__<>'package':
database="report"
uid = 3
-#
-#
class SendtoServer(unohelper.Base, XJobExecutor):
Kind = {
'PDF' : 'pdf',
@@ -93,7 +91,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
self.ids = self.sock.execute(database, uid, self.password, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(self.ids):
- ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error")
+ ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error!")
exit(1)
report_name = ""
@@ -172,8 +170,8 @@ class SendtoServer(unohelper.Base, XJobExecutor):
}
res = self.sock.execute(database, uid, self.password, 'ir.values' , 'create',rec )
else :
- ErrorDialog(" Report Name is all ready given !!!\n\n\n Please specify other Name","","Report Name")
- self.logobj.log_write('SendToServer',LOG_WARNING, ':Report name all ready given DB %s' % (database))
+ ErrorDialog("This name is already used for another report.\nPlease try with another name.", "", "Error!")
+ self.logobj.log_write('SendToServer',LOG_WARNING, ': report name already used DB %s' % (database))
self.win.endExecute()
except Exception,e:
import traceback,sys
@@ -205,8 +203,8 @@ class SendtoServer(unohelper.Base, XJobExecutor):
self.logobj.log_write('SendToServer',LOG_INFO, ':Report %s successfully send using %s'%(params['name'],database))
self.win.endExecute()
else:
- ErrorDialog("Either Report Name or Technical Name is blank !!!\nPlease specify appropriate Name","","Blank Field ERROR")
- self.logobj.log_write('SendToServer',LOG_WARNING, ':Either Report Name or Technical Name is blank')
+ ErrorDialog("Either report name or technical name is empty.\nPlease specify an appropriate name.", "", "Error!")
+ self.logobj.log_write('SendToServer',LOG_WARNING, ': either report name or technical name is empty.')
self.win.endExecute()
def getID(self):
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
index 9b69e4a5c15..ba9817ca20a 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -86,7 +86,7 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
self.win.addButton('btnOK',-2 ,-5, 60,15,'Connect' ,actionListenerProc = self.btnOk_clicked )
self.win.addButton('btnPrevious',15 -80 ,-5,50,15,'Previous',actionListenerProc = self.btnPrevious_clicked)
self.win.addButton('btnCancel',-2 - 110 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked )
-
+
sValue=""
if docinfo.getUserFieldValue(0)<>"":
global url
@@ -100,8 +100,8 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
# sValue="Could not connect to the server!"
# self.lstDatabase.addItem("Could not connect to the server!",0)
elif res == 0:
- sValue="No Database found !!!"
- self.lstDatabase.addItem("No Database found !!!",0)
+ sValue="No database found !"
+ self.lstDatabase.addItem("No database found !",0)
else:
self.win.addComboListBox("lstDatabase", -2,28,123,15, True)
self.lstDatabase = self.win.getControl( "lstDatabase" )
@@ -129,12 +129,12 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
self.sock=RPCSession(url)
UID = self.sock.login(sDatabase,sLogin,sPassword)
if not UID or UID==-1 :
- ErrorDialog("Connection Refuse...","Please enter valid Login/Password")
+ ErrorDialog("Connection denied.", "Please enter valid login/password.")
# self.win.endExecute()
ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(ids_module):
- ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error")
- self.logobj.log_write('Module Not Found',LOG_WARNING, ':base_report_designer not install in database %s' % (sDatabase))
+ ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error!")
+ self.logobj.log_write('Module not found.',LOG_WARNING, ': base_report_designer not installed in database %s.' % (sDatabase))
#self.win.endExecute()
else:
desktop=getDesktop()
@@ -153,11 +153,11 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
#docinfo.setUserFieldValue(2,self.win.getListBoxSelectedItem("lstDatabase"))
#docinfo.setUserFieldValue(3,"")
- ErrorDialog(" You can start creating your report in \n \t the current document.","After Creating sending to the server.","Message")
- self.logobj.log_write('successful login',LOG_INFO, ':successful login from %s using database %s' % (sLogin, sDatabase))
+ ErrorDialog("You can start creating your report in the current document.", "After creating, sending to the server.", "Message !")
+ self.logobj.log_write('successful login',LOG_INFO, ': successful login from %s using database %s' % (sLogin, sDatabase))
self.win.endExecute()
-
+
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
@@ -165,7 +165,7 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
self.win.endExecute()
Change(None)
self.win.endExecute()
-
+
if __name__<>"package" and __name__=="__main__":
ServerParameter(None)
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
index 97e6427ae76..06bce1f9fa5 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -175,7 +175,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
res = self.sock.execute(database, uid, self.password, sObject , 'read',[ids[0]])
self.win.setEditText("txtUName",res[0][sMain[sMain.rfind("/")+1:]])
else:
- ErrorDialog("Please select the Language Field")
+ ErrorDialog("Please select a language.")
except:
import traceback;traceback.print_exc()
@@ -261,7 +261,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
self.win.endExecute()
else:
- ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields")
+ ErrorDialog("Please fill appropriate data in name field \nor select particular value from the list of fields.")
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
index 30a2079433a..a4f8d75dac7 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
@@ -56,14 +56,14 @@ class mysocket:
while totalsent < size:
sent = self.sock.send(msg[totalsent:])
if sent == 0:
- raise RuntimeError, "socket connection broken"
+ raise RuntimeError, "Socket connection broken."
totalsent = totalsent + sent
def myreceive(self):
buf=''
while len(buf) < 8:
chunk = self.sock.recv(8 - len(buf))
if chunk == '':
- raise RuntimeError, "socket connection broken"
+ raise RuntimeError, "Socket connection broken."
buf += chunk
size = int(buf)
buf = self.sock.recv(1)
@@ -75,7 +75,7 @@ class mysocket:
while len(msg) < size:
chunk = self.sock.recv(size-len(msg))
if chunk == '':
- raise RuntimeError, "socket connection broken"
+ raise RuntimeError, "Socket connection broken."
msg = msg + chunk
msgio = cStringIO.StringIO(msg)
unpickler = cPickle.Unpickler(msgio)
@@ -90,6 +90,4 @@ class mysocket:
return res[0]
-
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
index f38424fd614..03478651def 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
@@ -3,31 +3,31 @@
# Portions of this file are under the following copyright and license:
#
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# Copyright (c) 2003-2004 Danny Brewer
+# d29583@groovegarden.com
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See: http://www.gnu.org/licenses/lgpl.html
+#
#
-#
# and other portions are under the following copyright and license:
#
#
# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2010 OpenERP SA ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -100,8 +100,7 @@ class modify(unohelper.Base, XJobExecutor ):
RepeatIn( start_group1, group2, stop_group1, item, True )
else:
ErrorDialog(
- "Please place your cursor at begaining of field \n"
- "which you want to modify",""
+ "Please place your cursor at beginning of field that you want to modify.",""
)
else:
diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py
index 0c3bac20da9..44e9de89162 100644
--- a/addons/base_status/base_stage.py
+++ b/addons/base_status/base_stage.py
@@ -25,7 +25,7 @@ from tools.translate import _
class base_stage(object):
""" Base utility mixin class for objects willing to manage their stages.
Object that inherit from this class should inherit from mailgate.thread
- to have access to the mail gateway, as well as Chatter. Objects
+ to have access to the mail gateway, as well as Chatter. Objects
subclassing this class should define the following colums:
- ``date_open`` (datetime field)
- ``date_closed`` (datetime field)
@@ -104,13 +104,13 @@ class base_stage(object):
def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):
""" Find stage, with a given (optional) domain on the search,
- ordered by the order parameter. If several stages match the
+ ordered by the order parameter. If several stages match the
search criterions, the first one will be returned, according
to the requested search order.
This method is meant to be overriden by subclasses. That way
specific behaviors can be achieved for every class inheriting
from base_stage.
-
+
:param cases: browse_record of cases
:param section_id: section limitating the search, given for
a generic search (for example default search).
@@ -202,7 +202,7 @@ class base_stage(object):
if case.section_id.parent_id.user_id:
data['user_id'] = case.section_id.parent_id.user_id.id
else:
- raise osv.except_osv(_('Error !'), _('You can not escalate, you are already at the top level regarding your sales-team category.'))
+ raise osv.except_osv(_('Error!'), _("You are already at the top level of your sales-team category.\nTherefore you cannot escalate furthermore."))
self.write(cr, uid, [case.id], data, context=context)
case.case_escalate_send_note(case.section_id.parent_id, context=context)
cases = self.browse(cr, uid, ids, context=context)
@@ -221,7 +221,7 @@ class base_stage(object):
self.case_set(cr, uid, [case.id], 'open', data, context=context)
self.case_open_send_note(cr, uid, [case.id], context=context)
return True
-
+
def case_close(self, cr, uid, ids, context=None):
""" Closes case """
self.case_set(cr, uid, ids, 'done', {'active': True, 'date_closed': fields.datetime.now()}, context=context)
@@ -250,14 +250,14 @@ class base_stage(object):
""" Generic method for setting case. This methods wraps the update
of the record, as well as call to _action and browse_record
case setting to fill the cache.
-
+
:params new_state_name: the new state of the record; this method
will call ``stage_set_with_state_name``
that will find the stage matching the
new state, using the ``stage_find`` method.
:params new_stage_id: alternatively, you may directly give the
new stage of the record
- :params state_name: the new value of the state, such as
+ :params state_name: the new value of the state, such as
'draft' or 'close'.
:params update_values: values that will be added with the state
update when writing values to the record.
@@ -370,20 +370,20 @@ class base_stage(object):
l.append(case.user_id.user_email)
res[case.id] = l
return res
-
+
# ******************************
# Notifications
# ******************************
-
+
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
- """ Default prefix for notifications. For example: "%s has been
+ """ Default prefix for notifications. For example: "%s has been
closed.". As several models will inherit from base_stage,
this method returns a void string. Class using base_stage
will have to override this method to define the prefix they
want to display.
"""
return ''
-
+
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Send a notification when the stage changes. This method has
to be overriden, because each document will have its particular
@@ -391,7 +391,7 @@ class base_stage(object):
crm.case.stage).
"""
return True
-
+
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been opened.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
@@ -421,7 +421,7 @@ class base_stage(object):
msg = _('%s has been renewed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
return True
-
+
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
for id in ids:
if new_section:
diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py
index e76442b62fe..ed2004ced08 100644
--- a/addons/base_vat/base_vat.py
+++ b/addons/base_vat/base_vat.py
@@ -108,7 +108,7 @@ class res_partner(osv.osv):
def button_check_vat(self, cr, uid, ids, context=None):
if not self.check_vat(cr, uid, ids, context=context):
msg = self._construct_constraint_msg(cr, uid, ids, context=context)
- raise osv.except_osv(_('Error'), msg)
+ raise osv.except_osv(_('Error!'), msg)
def check_vat(self, cr, uid, ids, context=None):
user_company = self.pool.get('res.users').browse(cr, uid, uid).company_id
diff --git a/addons/caldav/caldav_node.py b/addons/caldav/caldav_node.py
index da5c5f017a6..e32801f5cd5 100644
--- a/addons/caldav/caldav_node.py
+++ b/addons/caldav/caldav_node.py
@@ -252,20 +252,20 @@ class node_calendar(nodes.node_class):
elif cfe.getAttribute('end'):
_log.warning("Ignore end.. ")
else:
- _log.debug("Unknown comp-filter: %s", cfe.localName)
+ _log.debug("Unknown comp-filter: %s.", cfe.localName)
else:
- _log.debug("Unknown comp-filter: %s", vevent_filter.localName)
+ _log.debug("Unknown comp-filter: %s.", vevent_filter.localName)
else:
- _log.debug("Unknown filter element: %s", vcalendar_filter.localName)
+ _log.debug("Unknown filter element: %s.", vcalendar_filter.localName)
else:
- _log.debug("Unknown calendar-query element: %s", filter_child.localName)
+ _log.debug("Unknown calendar-query element: %s.", filter_child.localName)
return res
elif filters.localName == 'calendar-multiget':
# this is not the place to process, as it wouldn't support multi-level
# hrefs. So, the code is moved to document_webdav/dav_fs.py
pass
else:
- _log.debug("Unknown element in REPORT: %s", filters.localName)
+ _log.debug("Unknown element in REPORT: %s.", filters.localName)
return res
def children(self, cr, domain=None):
@@ -341,7 +341,7 @@ class node_calendar(nodes.node_class):
if line.name == ourcal.type:
line_id = line.id
break
- assert line_id, "Calendar #%d must have at least one %s line" % \
+ assert line_id, "Calendar #%d must have at least one %s line." % \
(ourcal.id, ourcal.type)
if path.endswith('.ics'):
path = path[:-4]
diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py
index fb98e00a86f..5b6199c376c 100644
--- a/addons/caldav/calendar.py
+++ b/addons/caldav/calendar.py
@@ -306,7 +306,7 @@ class CalDAV(object):
if cal_data.name.lower() == 'organizer':
dmail = { 'name': cal_data.params.get('CN', ['',])[0],
'email': cal_data.value.lower().replace('mailto:',''),
- # TODO: company?
+ # TODO: company?
}
self.ical_set(cal_data.name.lower(), mailto2str(dmail), 'value')
continue
@@ -382,7 +382,7 @@ class CalDAV(object):
ical.contents['vevent'].append(revents)
#END
if data.get('recurrent_uid', None):
- # Change the UID value in case of modified event from any recurrent event
+ # Change the UID value in case of modified event from any recurrent event
uidval = openobjectid2uid(cr, data['recurrent_uid'], model)
vevent.add('uid').value = uidval
elif field == 'attendee' and data[map_field]:
@@ -412,7 +412,7 @@ class CalDAV(object):
if exfield:
# Set exdates according to timezone value
# This is the case when timezone mapping comes after the exdate mapping
- # and we have exdate value available
+ # and we have exdate value available
exfield.params['TZID'] = [tzval.title()]
exdates_updated = []
for exdate in exdates:
@@ -432,7 +432,7 @@ class CalDAV(object):
if tzval:
# Set exdates according to timezone value
# This is the case when timezone mapping comes before the exdate mapping
- # and we have timezone value available
+ # and we have timezone value available
exfield.params['TZID'] = [tzval.title()]
exdates_updated = []
for exdate in exdates:
@@ -448,7 +448,7 @@ class CalDAV(object):
dtfield.value = self.format_date_tz(parser.parse(data[map_field]), tzval.title())
else:
dtfield.value = parser.parse(data[map_field])
-
+
elif map_type == 'utc'and data[map_field]:
if tzval:
local = pytz.timezone (tzval.title())
@@ -554,7 +554,7 @@ class CalDAV(object):
@param data_id: Get Data’s ID or False
@param context: A standard dictionary for contextual values
"""
-
+
ical_data = content
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, context)
parsedCal = vobject.readOne(ical_data)
@@ -602,7 +602,7 @@ class Calendar(CalDAV, osv.osv):
'calendar_order': fields.integer('Order', help="For supporting clients, the order of this folder among the calendars"),
'has_webcal': fields.boolean('WebCal', required=True, help="Also export a .ics entry next to the calendar folder, with WebCal content."),
}
-
+
_defaults = {
'has_webcal': False,
}
@@ -635,7 +635,7 @@ class Calendar(CalDAV, osv.osv):
node = res_node_calendar('%s.ics' %data.id, parent, ctx, data, line.object_id.model, data.id)
res.append(node)
return res
-
+
def get_cal_max_modified(self, cr, uid, ids, parent=None, domain=None, context=None):
if context is None:
@@ -729,10 +729,10 @@ class Calendar(CalDAV, osv.osv):
elif child.name.upper() in ('PRODID', 'VERSION'):
pass
elif child.name.upper().startswith('X-'):
- _logger.debug("skipping custom node %s", child.name)
+ _logger.debug("Skipping custom node %s.", child.name)
else:
- _logger.debug("skipping node %s", child.name)
-
+ _logger.debug("Skipping node %s.", child.name)
+
res = []
for obj_name in list(set(objs)):
obj = self.pool.get(obj_name)
@@ -781,25 +781,25 @@ class basic_calendar_line(osv.osv):
"""
cr.execute("SELECT COUNT(id) FROM basic_calendar_lines \
- WHERE name=%s AND calendar_id=%s",
+ WHERE name=%s AND calendar_id=%s",
(vals.get('name'), vals.get('calendar_id')))
res = cr.fetchone()
if res:
if res[0] > 0:
- raise osv.except_osv(_('Warning !'), _('Can not create line "%s" more than once') % (vals.get('name')))
+ raise osv.except_osv(_('Warning!'), _('Cannot create line "%s" more than once.') % (vals.get('name')))
return super(basic_calendar_line, self).create(cr, uid, vals, context=context)
basic_calendar_line()
class basic_calendar_alias(osv.osv):
""" Mapping of client filenames to ORM ids of calendar records
-
+
Since some clients insist on putting arbitrary filenames on the .ics data
- they send us, and they won't respect the redirection "Location:" header,
+ they send us, and they won't respect the redirection "Location:" header,
we have to store those filenames and allow clients to call our calendar
records with them.
Note that adding a column to all tables that would possibly hold calendar-
- mapped data won't work. The user is always allowed to specify more
+ mapped data won't work. The user is always allowed to specify more
calendars, on any arbitrary ORM object, without need to alter those tables'
data or structure
"""
@@ -810,7 +810,7 @@ class basic_calendar_alias(osv.osv):
select=1, help='The calendar/line this mapping applies to'),
'res_id': fields.integer('Res. ID', required=True, select=1),
}
-
+
_sql_constraints = [ ('name_cal_uniq', 'UNIQUE(cal_line_id, name)',
_('The same filename cannot apply to two records!')), ]
@@ -856,7 +856,7 @@ class basic_calendar_fields(osv.osv):
}
_sql_constraints = [
- ( 'name_type_uniq', 'UNIQUE(name, type_id)', 'Can not map a field more than once'),
+ ( 'name_type_uniq', 'UNIQUE(name, type_id)', 'Cannot map a field more than once.'),
]
def check_line(self, cr, uid, vals, name, context=None):
@@ -876,7 +876,7 @@ class basic_calendar_fields(osv.osv):
line = line_obj.browse(cr, uid, l_id, context=context)[0]
line_rel = line.object_id.model
if (relation != 'NULL') and (not relation == line_rel):
- raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines') % (name))
+ raise osv.except_osv(_('Warning!'), _('Please provide proper configuration of "%s" in Calendar Lines.') % (name))
return True
def create(self, cr, uid, vals, context=None):
@@ -1192,7 +1192,7 @@ class Alarm(CalDAV, osv.osv_memory):
elif isinstance(child.value, datetime):
# TODO
# remember, spec says this datetime is in UTC
- raise NotImplementedError("we cannot parse absolute triggers")
+ raise NotImplementedError("Cannot parse absolute triggers.")
if not seconds:
duration = abs(days)
related = days > 0 and 'after' or 'before'
@@ -1290,7 +1290,7 @@ class Attendee(CalDAV, osv.osv_memory):
attendee_add.params['CN'] = cn_val
if not attendee['email']:
attendee_add.value = 'MAILTO:'
- #raise osv.except_osv(_('Error !'), _('Attendee must have an Email Id'))
+ #raise osv.except_osv(_('Error!'), _('Attendee must have an Email Id'))
elif attendee['email']:
attendee_add.value = 'MAILTO:' + attendee['email']
return vevent
diff --git a/addons/caldav/i18n/caldav.pot b/addons/caldav/i18n/caldav.pot
index cdfd0be1490..a6ab8304082 100644
--- a/addons/caldav/i18n/caldav.pot
+++ b/addons/caldav/i18n/caldav.pot
@@ -87,7 +87,7 @@ msgstr ""
#. module: caldav
#: sql_constraint:basic.calendar.fields:0
-msgid "Can not map a field more than once"
+msgid "Cannot map a field more than once."
msgstr ""
#. module: caldav
@@ -164,7 +164,7 @@ msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:879
#, python-format
-msgid "Please provide proper configuration of \"%s\" in Calendar Lines"
+msgid "Please provide proper configuration of \"%s\" in Calendar Lines."
msgstr ""
#. module: caldav
@@ -207,7 +207,7 @@ msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:789
#, python-format
-msgid "Can not create line \"%s\" more than once"
+msgid "Cannot create line \"%s\" more than once."
msgstr ""
#. module: caldav
@@ -365,7 +365,7 @@ msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_import.py:63
#, python-format
-msgid "Invalid format of the ics, file can not be imported"
+msgid "Invalid format of the ics, file cannot be imported."
msgstr ""
#. module: caldav
diff --git a/addons/caldav/wizard/caldav_browse.py b/addons/caldav/wizard/caldav_browse.py
index f4bb8aeaabc..03ccfd3f294 100644
--- a/addons/caldav/wizard/caldav_browse.py
+++ b/addons/caldav/wizard/caldav_browse.py
@@ -178,7 +178,7 @@ configuration
res = {}
host = context.get('host')
if not config.get_misc('webdav','enable',True):
- raise Exception("WebDAV is disabled, cannot continue")
+ raise Exception("WebDAV is disabled, cannot continue.")
user_pool = self.pool.get('res.users')
current_user = user_pool.browse(cr, uid, uid, context=context)
#TODO write documentation
diff --git a/addons/caldav/wizard/calendar_event_import.py b/addons/caldav/wizard/calendar_event_import.py
index 06e7af5e2d2..3c0229692cb 100644
--- a/addons/caldav/wizard/calendar_event_import.py
+++ b/addons/caldav/wizard/calendar_event_import.py
@@ -60,7 +60,7 @@ class calendar_event_import(osv.osv_memory):
try:
vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
except:
- raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file can not be imported'))
+ raise osv.except_osv(_('Warning!'),_('Invalid format of the ics, file cannot be imported.'))
global cnt
if vals:
cnt = len(vals)
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py
index 6cd21061e4f..96d182113c8 100644
--- a/addons/crm/crm_action_rule.py
+++ b/addons/crm/crm_action_rule.py
@@ -59,7 +59,7 @@ class base_action_rule(osv.osv):
else:
reply_to = emailfrom
if not emailfrom:
- raise osv.except_osv(_('Error!'), _("No Email Found for your Company address!"))
+ raise osv.except_osv(_('Error!'), _("There is no email for your company address."))
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model=obj._name, reply_to=reply_to, res_id=obj.id)
def do_check(self, cr, uid, action, obj, context=None):
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index cf65d6e6880..29d3eefec70 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -280,7 +280,7 @@ class crm_lead(base_stage, osv.osv):
obj_id = super(crm_lead, self).create(cr, uid, vals, context)
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id
-
+
def onchange_stage_id(self, cr, uid, ids, stage_id, context=None):
if not stage_id:
return {'value':{}}
@@ -537,7 +537,7 @@ class crm_lead(base_stage, osv.osv):
lead_ids = context and context.get('lead_ids', []) or []
if len(ids) <= 1:
- raise osv.except_osv(_('Warning !'),_('Please select more than one opportunity from the list view.'))
+ raise osv.except_osv(_('Warning!'),_('Please select more than one opportunity from the list view.'))
ctx_opportunities = self.browse(cr, uid, lead_ids, context=context)
opportunities = self.browse(cr, uid, ids, context=context)
@@ -795,9 +795,9 @@ class crm_lead(base_stage, osv.osv):
def unlink(self, cr, uid, ids, context=None):
for lead in self.browse(cr, uid, ids, context):
if (not lead.section_id.allow_unlink) and (lead.state != 'draft'):
- raise osv.except_osv(_('Error'),
- _("You cannot delete lead '%s'; it must be in state 'Draft' to be deleted. " \
- "You should better cancel it, instead of deleting it.") % lead.name)
+ raise osv.except_osv(_('Error!'),
+ _("You cannot delete lead '%s' because it is not in 'Draft' state. " \
+ "You can still cancel it, instead of deleting it.") % lead.name)
return super(crm_lead, self).unlink(cr, uid, ids, context)
def write(self, cr, uid, ids, vals, context=None):
@@ -871,12 +871,12 @@ class crm_lead(base_stage, osv.osv):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('crm.case.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
return self.message_append_note(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), context=context)
-
+
def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
if isinstance(lead, (int, long)):
lead = self.browse(cr, uid, [lead], context=context)[0]
return ('Opportunity' if lead.type == 'opportunity' else 'Lead')
-
+
def create_send_note(self, cr, uid, ids, context=None):
for id in ids:
message = _("%s has been created.")% (self.case_get_note_msg_prefix(cr, uid, id, context=context))
@@ -903,7 +903,7 @@ class crm_lead(base_stage, osv.osv):
message = _("%s partner is now set to %s." % (self.case_get_note_msg_prefix(cr, uid, lead, context=context), lead.partner_id.name))
lead.message_append_note(body=message)
return True
-
+
def convert_opportunity_send_note(self, cr, uid, lead, context=None):
message = _("Lead has been converted to an opportunity.")
lead.message_append_note(body=message)
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index b34d1b9f090..13171d95b9b 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -113,7 +113,7 @@ class res_users(osv.osv):
'user_id': user_id}, context=context)
except:
# Tolerate a missing shortcut. See product/product.py for similar code.
- _logger.debug('Skipped meetings shortcut for user "%s"', data.get('name','created"), context=context)
+ return self.message_append_note(cr, uid, ids, body=_("Partner has been created."), context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/i18n/crm.pot b/addons/crm/i18n/crm.pot
index f3d70b709af..1c331ab151d 100644
--- a/addons/crm/i18n/crm.pot
+++ b/addons/crm/i18n/crm.pot
@@ -110,7 +110,7 @@ msgstr ""
#. module: crm
#: code:addons/crm/wizard/crm_add_note.py:28
#, python-format
-msgid "Can not add note!"
+msgid "Cannot add note."
msgstr ""
#. module: crm
@@ -802,7 +802,7 @@ msgstr ""
#: code:addons/crm/crm_lead.py:832
#, python-format
msgid ""
-"You cannot delete lead '%s'; it must be in state 'Draft' to be deleted. You "
+"You cannot delete lead '%s'; because it is not in 'Draft' state. You "
"should better cancel it, instead of deleting it."
msgstr ""
@@ -3184,7 +3184,7 @@ msgstr ""
#. module: crm
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:104
#, python-format
-msgid "Closed/Cancelled Leads can not be converted into Opportunity"
+msgid "Closed/Cancelled Leads cannot be converted into Opportunity."
msgstr ""
#. module: crm
@@ -3273,7 +3273,7 @@ msgstr ""
#. module: crm
#: constraint:crm.segmentation:0
-msgid "Error ! You can not create recursive profiles."
+msgid "Error ! You cannot create recursive profiles."
msgstr ""
#. module: crm
@@ -3401,7 +3401,7 @@ msgstr ""
#. module: crm
#: code:addons/crm/crm_action_rule.py:61
#, python-format
-msgid "No Email Found for your Company address!"
+msgid "There is no Email for your Company address."
msgstr ""
#. module: crm
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index f6fd4332745..547d3ed299e 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -99,7 +99,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
lead_obj = self.pool.get('crm.lead')
for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context):
if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled Leads can not be converted into Opportunity"))
+ raise osv.except_osv(_("Warning !"), _("Closed/Cancelled leads cannot be converted into opportunities."))
return False
def _convert_opportunity(self, cr, uid, ids, vals, context=None):
@@ -110,7 +110,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
lead_ids = vals.get('lead_ids', [])
user_ids = vals.get('user_ids', False)
team_id = vals.get('section_id', False)
- return lead.convert_opportunity(cr, uid, lead_ids, partner_id, user_ids, team_id, context=context)
+ return lead.convert_opportunity(cr, uid, lead_ids, partner_id, user_ids, team_id, context=context)
def _merge_opportunity(self, cr, uid, ids, opportunity_ids, action='merge', context=None):
#TOFIX: is it usefully ?
@@ -131,7 +131,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
"""
if not context:
context = {}
-
+
lead = self.pool.get('crm.lead')
lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0]
diff --git a/addons/crm/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py
index c424d511639..98f114b4088 100644
--- a/addons/crm/wizard/crm_lead_to_partner.py
+++ b/addons/crm/wizard/crm_lead_to_partner.py
@@ -44,7 +44,7 @@ class crm_lead2partner(osv.osv_memory):
rec_ids = context and context.get('active_ids', [])
for this in model.browse(cr, uid, rec_ids, context=context):
if this.partner_id:
- raise osv.except_osv(_('Warning !'),
+ raise osv.except_osv(_('Warning!'),
_('A partner is already defined.'))
def _select_partner(self, cr, uid, context=None):
diff --git a/addons/crm_partner_assign/i18n/crm_partner_assign.pot b/addons/crm_partner_assign/i18n/crm_partner_assign.pot
index 3fb9fc0e915..08f0af94694 100644
--- a/addons/crm_partner_assign/i18n/crm_partner_assign.pot
+++ b/addons/crm_partner_assign/i18n/crm_partner_assign.pot
@@ -115,7 +115,7 @@ msgstr ""
#. module: crm_partner_assign
#: code:addons/crm_partner_assign/partner_geo_assign.py:37
#, python-format
-msgid "Could not contact geolocation servers, please make sure you have a working internet connection (%s)"
+msgid "Cannot contact geolocation servers, please make sure you have a working internet connection (%s)."
msgstr ""
#. module: crm_partner_assign
diff --git a/addons/crm_partner_assign/partner_geo_assign.py b/addons/crm_partner_assign/partner_geo_assign.py
index ed918a3d0a1..9134f427c5d 100644
--- a/addons/crm_partner_assign/partner_geo_assign.py
+++ b/addons/crm_partner_assign/partner_geo_assign.py
@@ -34,7 +34,7 @@ def geo_find(addr):
xml = urllib.urlopen(url).read()
except Exception, e:
raise osv.except_osv(_('Network error'),
- _('Could not contact geolocation servers, please make sure you have a working internet connection (%s)') % e)
+ _('Cannot contact geolocation servers. Please make sure that your internet connection is up and running (%s).') % e)
if '' in xml:
return None
@@ -46,11 +46,11 @@ def geo_find(addr):
def geo_query_address(street=None, zip=None, city=None, state=None, country=None):
if country and ',' in country and (country.endswith(' of') or country.endswith(' of the')):
# put country qualifier in front, otherwise GMap gives wrong results,
- # e.g. 'Congo, Democratic Republic of the' => 'Democratic Republic of the Congo'
- country = '{1} {0}'.format(*country.split(',',1))
- return tools.ustr(', '.join(filter(None, [street,
- ("%s %s" % (zip or '', city or '')).strip(),
- state,
+ # e.g. 'Congo, Democratic Republic of the' => 'Democratic Republic of the Congo'
+ country = '{1} {0}'.format(*country.split(',',1))
+ return tools.ustr(', '.join(filter(None, [street,
+ ("%s %s" % (zip or '', city or '')).strip(),
+ state,
country])))
class res_partner_grade(osv.osv):
diff --git a/addons/crm_profiling/crm_profiling.py b/addons/crm_profiling/crm_profiling.py
index c23636230f2..4cc54a8d3d4 100644
--- a/addons/crm_profiling/crm_profiling.py
+++ b/addons/crm_profiling/crm_profiling.py
@@ -234,7 +234,7 @@ class crm_segmentation(osv.osv):
}
_constraints = [
- (osv.osv._check_recursion, 'Error ! You can not create recursive profiles.', ['parent_id'])
+ (osv.osv._check_recursion, 'Error ! You cannot create recursive profiles.', ['parent_id'])
]
def process_continue(self, cr, uid, ids, start=False):
diff --git a/addons/crm_profiling/i18n/crm_profiling.pot b/addons/crm_profiling/i18n/crm_profiling.pot
index e3991534d56..30d42d12330 100644
--- a/addons/crm_profiling/i18n/crm_profiling.pot
+++ b/addons/crm_profiling/i18n/crm_profiling.pot
@@ -129,7 +129,7 @@ msgstr ""
#. module: crm_profiling
#: constraint:crm.segmentation:0
-msgid "Error ! You can not create recursive profiles."
+msgid "Error ! You cannot create recursive profiles."
msgstr ""
#. module: crm_profiling
diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py
index b03bb095d5d..d6d584aa62e 100644
--- a/addons/delivery/delivery.py
+++ b/addons/delivery/delivery.py
@@ -217,7 +217,7 @@ class delivery_grid(osv.osv):
ok = True
break
if not ok:
- raise osv.except_osv(_('No price available!'), _('No line matched this product or order in the choosed delivery grid.'))
+ raise osv.except_osv(_('No price available!'), _('No line matched this product or order in the chosen delivery grid.'))
return price
diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py
index 64ebf0ff9fa..f4d133e967a 100644
--- a/addons/delivery/stock.py
+++ b/addons/delivery/stock.py
@@ -86,7 +86,7 @@ class stock_picking(osv.osv):
grid_id = carrier_obj.grid_get(cr, uid, [picking.carrier_id.id],
picking.partner_id.id, context=context)
if not grid_id:
- raise osv.except_osv(_('Warning'),
+ raise osv.except_osv(_('Warning!'),
_('The carrier %s (id: %d) has no delivery grid!') \
% (picking.carrier_id.name,
picking.carrier_id.id))
diff --git a/addons/document/content_index.py b/addons/document/content_index.py
index f24c033a7ec..4cf3c8dfed2 100644
--- a/addons/document/content_index.py
+++ b/addons/document/content_index.py
@@ -93,13 +93,13 @@ class indexer(object):
except NhException:
pass
- raise NhException('No appropriate method to index file')
+ raise NhException('No appropriate method to index file.')
def _doIndexContent(self,content):
- raise NhException("Content not handled here")
+ raise NhException("Content cannot be handled here.")
def _doIndexFile(self,fpath):
- raise NhException("Content not handled here")
+ raise NhException("Content cannot be handled here.")
def __repr__(self):
return "" %(self.__module__, self.__class__.__name__)
@@ -116,7 +116,7 @@ def mime_match(mime, mdict):
return (None, None)
class contentIndex(object):
-
+
def __init__(self):
self.mimes = {}
self.exts = {}
@@ -132,9 +132,9 @@ class contentIndex(object):
f = True
if f:
- _logger.debug('Register content indexer: %r', obj)
+ _logger.debug('Register content indexer: %r.', obj)
if not f:
- raise Exception("Your indexer should at least suport a mimetype or extension")
+ raise Exception("Your indexer should at least support a mimetype or extension.")
def doIndex(self, content, filename=None, content_type=None, realfname = None, debug=False):
fobj = None
@@ -169,22 +169,22 @@ class contentIndex(object):
(result, _) = pop.communicate()
mime2 = result.split(';')[0]
- _logger.debug('File gave us: %s', mime2)
+ _logger.debug('File gives us: %s', mime2)
# Note that the temporary file still exists now.
mime,fobj = mime_match(mime2, self.mimes)
if not mime:
mime = mime2
except Exception:
- _logger.exception('Cannot determine mime type')
+ _logger.exception('Cannot determine mime type.')
try:
if fobj:
res = (mime, fobj.indexContent(content,filename,fname or realfname) )
else:
- _logger.debug("Have no object, return (%s, None)", mime)
+ _logger.debug("Have no object, return (%s, None).", mime)
res = (mime, None )
except Exception:
- _logger.exception("Could not index file %s (%s)",
+ _logger.exception("Cannot index file %s (%s).",
filename, fname or realfname)
res = None
@@ -193,7 +193,7 @@ class contentIndex(object):
try:
os.unlink(fname)
except Exception:
- _logger.exception("Could not unlink %s", fname)
+ _logger.exception("Cannot unlink %s.", fname)
return res
cntIndex = contentIndex()
diff --git a/addons/document/document.py b/addons/document/document.py
index fa65f8d9966..3ee52f8e4fb 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -23,7 +23,7 @@ import base64
from osv import osv, fields
import os
-# from psycopg2 import Binary
+#from psycopg2 import Binary
#from tools import config
import tools
from tools.translate import _
@@ -37,8 +37,8 @@ DMS_ROOT_PATH = tools.config.get('document_path', os.path.join(tools.config['roo
class document_file(osv.osv):
_inherit = 'ir.attachment'
_rec_name = 'datas_fname'
-
-
+
+
def _attach_parent_id(self, cr, uid, ids=None, context=None):
"""Migrate ir.attachments to the document module.
@@ -61,7 +61,7 @@ class document_file(osv.osv):
return False
if ids is not None:
- raise NotImplementedError("Ids is just there by convention! Don't use it yet, please.")
+ raise NotImplementedError("Ids are just there by convention, please do not use it.")
cr.execute("UPDATE ir_attachment " \
"SET parent_id = %s, db_datas = decode(encode(db_datas,'escape'), 'base64') " \
@@ -294,7 +294,7 @@ class document_file(osv.osv):
('datas_fname', '=', vals['datas_fname']),
]
attach_ids = self.search(cr, uid, domain, context=context)
- super(document_file, self).write(cr, uid, attach_ids,
+ super(document_file, self).write(cr, uid, attach_ids,
{'datas' : vals['datas']},
context=context)
result = attach_ids[0]
@@ -339,7 +339,7 @@ class document_file(osv.osv):
if r:
unres.append(r)
else:
- self.loggerdoc.warning("Unlinking attachment #%s %s that has no storage",
+ self.loggerdoc.warning("Unlinking attachment #%s %s that has no storage.",
f.id, f.name)
res = super(document_file, self).unlink(cr, uid, ids, context)
stor.do_unlink(cr, uid, unres)
diff --git a/addons/document/document_directory.py b/addons/document/document_directory.py
index 03b2dcc47bf..0f18673a007 100644
--- a/addons/document/document_directory.py
+++ b/addons/document/document_directory.py
@@ -78,7 +78,7 @@ class document_directory(osv.osv):
root_id = objid.read(cr, uid, mid, ['res_id'])['res_id']
return root_id
except Exception, e:
-
+
_logger.warning('Cannot set directory root:'+ str(e))
return False
return objid.browse(cr, uid, mid, context=context).res_id
@@ -108,7 +108,7 @@ class document_directory(osv.osv):
_sql_constraints = [
('dirname_uniq', 'unique (name,parent_id,ressource_id,ressource_parent_type_id)', 'The directory name must be unique !'),
('no_selfparent', 'check(parent_id <> id)', 'Directory cannot be parent of itself!'),
- ('dir_parented', 'check(parent_id IS NOT NULL OR storage_id IS NOT NULL)', 'Directory must have a parent or a storage')
+ ('dir_parented', 'check(parent_id IS NOT NULL OR storage_id IS NOT NULL)', 'Directory must have a parent or a storage.')
]
def name_get(self, cr, uid, ids, context=None):
res = []
@@ -153,7 +153,7 @@ class document_directory(osv.osv):
return True
_constraints = [
- (_check_recursion, 'Error! You can not create recursive Directories.', ['parent_id'])
+ (_check_recursion, 'Error! You cannot create recursive directories.', ['parent_id'])
]
def __init__(self, *args, **kwargs):
@@ -179,7 +179,7 @@ class document_directory(osv.osv):
def get_node_class(self, cr, uid, ids, dbro=None, dynamic=False, context=None):
"""Retrieve the class of nodes for this directory
-
+
This function can be overriden by inherited classes ;)
@param dbro The browse object, if caller already has it
"""
@@ -193,17 +193,17 @@ class document_directory(osv.osv):
elif dbro.type == 'ressource':
return nodes.node_res_dir
else:
- raise ValueError("dir node for %s type", dbro.type)
+ raise ValueError("dir node for %s type.", dbro.type)
def _prepare_context(self, cr, uid, nctx, context=None):
""" Fill nctx with properties for this database
@param nctx instance of nodes.node_context, to be filled
@param context ORM context (dict) for us
-
- Note that this function is called *without* a list of ids,
+
+ Note that this function is called *without* a list of ids,
it should behave the same for the whole database (based on the
ORM instance of document.directory).
-
+
Some databases may override this and attach properties to the
node_context. See WebDAV, CalDAV.
"""
diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py
index 339b320e9a7..21cb4f9dcf4 100644
--- a/addons/document/document_storage.py
+++ b/addons/document/document_storage.py
@@ -52,7 +52,7 @@ For data /storage/ we have the cases:
Have (ir.attachment, context), we modify the file (save, update, rename etc).
Have (directory, context), we create a file.
Have (path, context), we create or modify a file.
-
+
Note that in all above cases, we don't explicitly choose the storage media,
but always require a context to be present.
@@ -61,7 +61,7 @@ nodes, for once, won't. Their metadata will be computed by the parent storage
media + directory.
The algorithm says that in any of the above cases, our first goal is to locate
-the node for any combination of search criteria. It would be wise NOT to
+the node for any combination of search criteria. It would be wise NOT to
represent each node in the path (like node[/] + node[/dir1] + node[/dir1/dir2])
but directly jump to the end node (like node[/dir1/dir2]) whenever possible.
@@ -99,13 +99,13 @@ class nodefd_file(nodes.node_descriptor):
mode = mode[:-1]
self.mode = mode
self._size = os.stat(path).st_size
-
+
for attr in ('closed', 'read', 'write', 'seek', 'tell', 'next'):
setattr(self,attr, getattr(self.__file, attr))
def size(self):
return self._size
-
+
def __iter__(self):
return self
@@ -122,7 +122,7 @@ class nodefd_file(nodes.node_descriptor):
filename = par.path
if isinstance(filename, (tuple, list)):
filename = '/'.join(filename)
-
+
try:
mime, icont = cntIndex.doIndex(None, filename=filename,
content_type=None, realfname=fname)
@@ -173,7 +173,7 @@ class nodefd_db(StringIO, nodes.node_descriptor):
self._size = 0L
if mode.endswith('b'):
mode = mode[:-1]
-
+
if mode in ('r', 'r+'):
cr = ira_browse._cr # reuse the cursor of the browse object, just now
cr.execute('SELECT db_datas FROM ir_attachment WHERE id = %s',(ira_browse.id,))
@@ -188,8 +188,8 @@ class nodefd_db(StringIO, nodes.node_descriptor):
elif mode == 'a':
StringIO.__init__(self, None)
else:
- _logger.error("Incorrect mode %s specified", mode)
- raise IOError(errno.EINVAL, "Invalid file mode")
+ _logger.error("Incorrect mode %s is specified.", mode)
+ raise IOError(errno.EINVAL, "Invalid file mode.")
self.mode = mode
def size(self):
@@ -209,7 +209,7 @@ class nodefd_db(StringIO, nodes.node_descriptor):
filename = par.path
if isinstance(filename, (tuple, list)):
filename = '/'.join(filename)
-
+
try:
mime, icont = cntIndex.doIndex(data, filename=filename,
content_type=None, realfname=None)
@@ -238,7 +238,7 @@ class nodefd_db(StringIO, nodes.node_descriptor):
(out, len(data), par.file_id))
cr.commit()
except Exception:
- _logger.exception('Cannot update db file #%d for close:', par.file_id)
+ _logger.exception('Cannot update db file #%d for close.', par.file_id)
raise
finally:
cr.close()
@@ -246,7 +246,7 @@ class nodefd_db(StringIO, nodes.node_descriptor):
class nodefd_db64(StringIO, nodes.node_descriptor):
""" A descriptor to db data, base64 (the old way)
-
+
It stores the data in base64 encoding at the db. Not optimal, but
the transparent compression of Postgres will save the day.
"""
@@ -255,7 +255,7 @@ class nodefd_db64(StringIO, nodes.node_descriptor):
self._size = 0L
if mode.endswith('b'):
mode = mode[:-1]
-
+
if mode in ('r', 'r+'):
data = base64.decodestring(ira_browse.db_datas)
if data:
@@ -268,8 +268,8 @@ class nodefd_db64(StringIO, nodes.node_descriptor):
elif mode == 'a':
StringIO.__init__(self, None)
else:
- _logger.error("Incorrect mode %s specified", mode)
- raise IOError(errno.EINVAL, "Invalid file mode")
+ _logger.error("Incorrect mode %s is specified.", mode)
+ raise IOError(errno.EINVAL, "Invalid file mode.")
self.mode = mode
def size(self):
@@ -289,7 +289,7 @@ class nodefd_db64(StringIO, nodes.node_descriptor):
filename = par.path
if isinstance(filename, (tuple, list)):
filename = '/'.join(filename)
-
+
try:
mime, icont = cntIndex.doIndex(data, filename=filename,
content_type=None, realfname=None)
@@ -317,7 +317,7 @@ class nodefd_db64(StringIO, nodes.node_descriptor):
(base64.encodestring(data), len(data), par.file_id))
cr.commit()
except Exception:
- _logger.exception('Cannot update db file #%d for close:', par.file_id)
+ _logger.exception('Cannot update db file #%d for close.', par.file_id)
raise
finally:
cr.close()
@@ -330,7 +330,7 @@ class document_storage(osv.osv):
media.
The referring document.directory-ies will control the placement of data
into the storage.
-
+
It is a bad idea to have multiple document.storage objects pointing to
the same tree of filesystem storage.
"""
@@ -384,12 +384,12 @@ class document_storage(osv.osv):
def __prepare_realpath(self, cr, file_node, ira, store_path, do_create=True):
""" Cleanup path for realstore, create dirs if needed
-
+
@param file_node the node
@param ira ir.attachment browse of the file_node
@param store_path the path of the parent storage object, list
@param do_create create the directories, if needed
-
+
@return tuple(path "/var/filestore/real/dir/", npath ['dir','fname.ext'] )
"""
file_node.fix_ppath(cr, ira)
@@ -401,10 +401,10 @@ class document_storage(osv.osv):
# self._logger.debug('Npath: %s', npath)
for n in npath:
if n == '..':
- raise ValueError("Invalid '..' element in path")
+ raise ValueError("Invalid '..' element in path.")
for ch in ('*', '|', "\\", '/', ':', '"', '<', '>', '?',):
if ch in n:
- raise ValueError("Invalid char %s in path %s" %(ch, n))
+ raise ValueError("Invalid char %s in path %s." %(ch, n))
dpath = [store_path,]
dpath += npath[:-1]
path = os.path.join(*dpath)
@@ -420,8 +420,8 @@ class document_storage(osv.osv):
"""
boo = self.browse(cr, uid, id, context=context)
if not boo.online:
- raise IOError(errno.EREMOTE, 'medium offline')
-
+ raise IOError(errno.EREMOTE, 'Medium offline.')
+
if fil_obj:
ira = fil_obj
else:
@@ -435,11 +435,11 @@ class document_storage(osv.osv):
context = {}
boo = self.browse(cr, uid, id, context=context)
if not boo.online:
- raise IOError(errno.EREMOTE, 'medium offline')
-
+ raise IOError(errno.EREMOTE, 'Medium offline.')
+
if boo.readonly and mode not in ('r', 'rb'):
- raise IOError(errno.EPERM, "Readonly medium")
-
+ raise IOError(errno.EPERM, "Readonly medium.")
+
ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context)
if boo.type == 'filestore':
if not ira.store_fname:
@@ -447,8 +447,8 @@ class document_storage(osv.osv):
# try to fix their directory.
if mode in ('r','r+'):
if ira.file_size:
- _logger.warning( "ir.attachment #%d does not have a filename, but is at filestore, fix it!" % ira.id)
- raise IOError(errno.ENOENT, 'No file can be located')
+ _logger.warning( "ir.attachment #%d does not have a filename, but is at filestore. This should get fixed." % ira.id)
+ raise IOError(errno.ENOENT, 'No file can be located.')
else:
store_fname = self.__get_random_fname(boo.path)
cr.execute('UPDATE ir_attachment SET store_fname = %s WHERE id = %s',
@@ -470,7 +470,7 @@ class document_storage(osv.osv):
do_create = (mode[0] in ('w','a')) )
fpath = os.path.join(path, npath[-1])
if (not os.path.exists(fpath)) and mode[0] == 'r':
- raise IOError("File not found: %s" % fpath)
+ raise IOError("File not found: %s." % fpath)
elif mode[0] in ('w', 'a') and not ira.store_fname:
store_fname = os.path.join(*npath)
cr.execute('UPDATE ir_attachment SET store_fname = %s WHERE id = %s',
@@ -478,10 +478,10 @@ class document_storage(osv.osv):
return nodefd_file(file_node, path=fpath, mode=mode)
elif boo.type == 'virtual':
- raise ValueError('Virtual storage does not support static files')
-
+ raise ValueError('Virtual storage does not support static file(s).')
+
else:
- raise TypeError("No %s storage" % boo.type)
+ raise TypeError("No %s storage." % boo.type)
def __get_data_3(self, cr, uid, boo, ira, context):
if boo.type == 'filestore':
@@ -489,7 +489,7 @@ class document_storage(osv.osv):
# On a migrated db, some files may have the wrong storage type
# try to fix their directory.
if ira.file_size:
- _logger.warning( "ir.attachment #%d does not have a filename, but is at filestore, fix it!" % ira.id)
+ _logger.warning( "ir.attachment #%d does not have a filename, but is at filestore. This should get fixed." % ira.id)
return None
fpath = os.path.join(boo.path, ira.store_fname)
return file(fpath, 'rb').read()
@@ -521,13 +521,13 @@ class document_storage(osv.osv):
elif not ira.store_fname:
return None
else:
- raise IOError(errno.ENOENT, "File not found: %s" % fpath)
+ raise IOError(errno.ENOENT, "File not found: %s." % fpath)
elif boo.type == 'virtual':
- raise ValueError('Virtual storage does not support static files')
+ raise ValueError('Virtual storage does not support static file(s).')
else:
- raise TypeError("No %s storage" % boo.type)
+ raise TypeError("No %s storage!" % boo.type)
def set_data(self, cr, uid, id, file_node, data, context=None, fil_obj=None):
""" store the data.
@@ -541,12 +541,12 @@ class document_storage(osv.osv):
ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context)
if not boo.online:
- raise IOError(errno.EREMOTE, 'medium offline')
-
- if boo.readonly:
- raise IOError(errno.EPERM, "Readonly medium")
+ raise IOError(errno.EREMOTE, 'Medium offline.')
- _logger.debug( "Store data for ir.attachment #%d" % ira.id)
+ if boo.readonly:
+ raise IOError(errno.EPERM, "Readonly medium.")
+
+ _logger.debug( "Store data for ir.attachment #%d." % ira.id)
store_fname = None
fname = None
if boo.type == 'filestore':
@@ -557,15 +557,15 @@ class document_storage(osv.osv):
fp = open(fname, 'wb')
try:
fp.write(data)
- finally:
+ finally:
fp.close()
- _logger.debug( "Saved data to %s" % fname)
+ _logger.debug( "Saved data to %s." % fname)
filesize = len(data) # os.stat(fname).st_size
-
+
# TODO Here, an old file would be left hanging.
except Exception, e:
- _logger.warning( "Couldn't save data to %s", path, exc_info=True)
+ _logger.warning( "Cannot save data to %s.", path, exc_info=True)
raise except_orm(_('Error!'), str(e))
elif boo.type == 'db':
filesize = len(data)
@@ -586,21 +586,21 @@ class document_storage(osv.osv):
fp = open(fname,'wb')
try:
fp.write(data)
- finally:
+ finally:
fp.close()
- _logger.debug("Saved data to %s", fname)
+ _logger.debug("Saved data to %s.", fname)
filesize = len(data) # os.stat(fname).st_size
store_fname = os.path.join(*npath)
# TODO Here, an old file would be left hanging.
except Exception,e :
- _logger.warning("Couldn't save data:", exc_info=True)
+ _logger.warning("Cannot save data.", exc_info=True)
raise except_orm(_('Error!'), str(e))
elif boo.type == 'virtual':
- raise ValueError('Virtual storage does not support static files')
+ raise ValueError('Virtual storage does not support static file(s).')
else:
- raise TypeError("No %s storage" % boo.type)
+ raise TypeError("No %s storage!" % boo.type)
# 2nd phase: store the metadata
try:
@@ -612,7 +612,7 @@ class document_storage(osv.osv):
mime, icont = cntIndex.doIndex(data, ira.datas_fname,
ira.file_type or None, fname)
except Exception:
- _logger.debug('Cannot index file:', exc_info=True)
+ _logger.debug('Cannot index file.', exc_info=True)
pass
try:
@@ -629,7 +629,7 @@ class document_storage(osv.osv):
file_node.content_type = mime
return True
except Exception, e :
- self._logger.warning("Couldn't save data:", exc_info=True)
+ self._logger.warning("Cannot save data.", exc_info=True)
# should we really rollback once we have written the actual data?
# at the db case (only), that rollback would be safe
raise except_orm(_('Error at doc write!'), str(e))
@@ -639,10 +639,10 @@ class document_storage(osv.osv):
files that have to be removed, too. """
if not storage_bo.online:
- raise IOError(errno.EREMOTE, 'medium offline')
-
+ raise IOError(errno.EREMOTE, 'Medium offline.')
+
if storage_bo.readonly:
- raise IOError(errno.EPERM, "Readonly medium")
+ raise IOError(errno.EPERM, "Readonly medium.")
if storage_bo.type == 'filestore':
fname = fil_bo.store_fname
@@ -659,7 +659,7 @@ class document_storage(osv.osv):
path = storage_bo.path
return ( storage_bo.id, 'file', os.path.join(path, fname))
else:
- raise TypeError("No %s storage" % storage_bo.type)
+ raise TypeError("No %s storage!" % storage_bo.type)
def do_unlink(self, cr, uid, unres):
for id, ktype, fname in unres:
@@ -667,9 +667,9 @@ class document_storage(osv.osv):
try:
os.unlink(fname)
except Exception:
- _logger.warning("Could not remove file %s, please remove manually.", fname, exc_info=True)
+ _logger.warning("Cannot remove file %s, please remove it manually.", fname, exc_info=True)
else:
- _logger.warning("Unknown unlink key %s" % ktype)
+ _logger.warning("Unlink unknown key %s." % ktype)
return True
@@ -677,17 +677,17 @@ class document_storage(osv.osv):
""" A preparation for a file rename.
It will not affect the database, but merely check and perhaps
rename the realstore file.
-
+
@return the dict of values that can safely be be stored in the db.
"""
sbro = self.browse(cr, uid, file_node.storage_id, context=context)
assert sbro, "The file #%d didn't provide storage" % file_node.file_id
if not sbro.online:
- raise IOError(errno.EREMOTE, 'medium offline')
-
+ raise IOError(errno.EREMOTE, 'Medium offline.')
+
if sbro.readonly:
- raise IOError(errno.EPERM, "Readonly medium")
+ raise IOError(errno.EPERM, "Readonly medium.")
if sbro.type in ('filestore', 'db', 'db64'):
# nothing to do for a rename, allow to change the db field
@@ -699,9 +699,9 @@ class document_storage(osv.osv):
fname = ira.store_fname
if not fname:
- _logger.warning("Trying to rename a non-stored file")
+ _logger.warning("Trying to rename a non-stored file.")
if fname != os.path.join(*npath):
- _logger.warning("inconsistency in realstore: %s != %s" , fname, repr(npath))
+ _logger.warning("Inconsistency to realstore: %s != %s." , fname, repr(npath))
oldpath = os.path.join(path, npath[-1])
newpath = os.path.join(path, new_name)
@@ -711,13 +711,13 @@ class document_storage(osv.osv):
store_fname = os.path.join(*store_path)
return { 'name': new_name, 'datas_fname': new_name, 'store_fname': store_fname }
else:
- raise TypeError("No %s storage" % sbro.type)
+ raise TypeError("No %s storage!" % sbro.type)
def simple_move(self, cr, uid, file_node, ndir_bro, context=None):
""" A preparation for a file move.
It will not affect the database, but merely check and perhaps
move the realstore file.
-
+
@param ndir_bro a browse object of document.directory, where this
file should move to.
@return the dict of values that can safely be be stored in the db.
@@ -726,10 +726,10 @@ class document_storage(osv.osv):
assert sbro, "The file #%d didn't provide storage" % file_node.file_id
if not sbro.online:
- raise IOError(errno.EREMOTE, 'medium offline')
-
+ raise IOError(errno.EREMOTE, 'Medium offline.')
+
if sbro.readonly:
- raise IOError(errno.EPERM, "Readonly medium")
+ raise IOError(errno.EPERM, "Readonly medium.")
par = ndir_bro
psto = None
@@ -739,8 +739,8 @@ class document_storage(osv.osv):
break
par = par.parent_id
if file_node.storage_id != psto:
- _logger.debug('Cannot move file %r from %r to %r', file_node, file_node.parent, ndir_bro.name)
- raise NotImplementedError('Cannot move files between storage media')
+ _logger.debug('Cannot move file %r from %r to %r.', file_node, file_node.parent, ndir_bro.name)
+ raise NotImplementedError('Cannot move file(s) between storage media.')
if sbro.type in ('filestore', 'db', 'db64'):
# nothing to do for a rename, allow to change the db field
@@ -752,30 +752,30 @@ class document_storage(osv.osv):
fname = ira.store_fname
if not fname:
- _logger.warning("Trying to rename a non-stored file")
+ _logger.warning("Trying to rename a non-stored file.")
if fname != os.path.join(*opath):
- _logger.warning("inconsistency in realstore: %s != %s" , fname, repr(opath))
+ _logger.warning("Inconsistency to realstore: %s != %s." , fname, repr(opath))
oldpath = os.path.join(path, opath[-1])
-
+
npath = [sbro.path,] + (ndir_bro.get_full_path() or [])
npath = filter(lambda x: x is not None, npath)
newdir = os.path.join(*npath)
if not os.path.isdir(newdir):
- _logger.debug("Must create dir %s", newdir)
+ _logger.debug("Must create dir %s.", newdir)
os.makedirs(newdir)
npath.append(opath[-1])
newpath = os.path.join(*npath)
-
- _logger.debug("Going to move %s from %s to %s", opath[-1], oldpath, newpath)
+
+ _logger.debug("Going to move %s from %s to %s.", opath[-1], oldpath, newpath)
shutil.move(oldpath, newpath)
-
+
store_path = npath[1:] + [opath[-1],]
store_fname = os.path.join(*store_path)
-
+
return { 'store_fname': store_fname }
else:
- raise TypeError("No %s storage" % sbro.type)
+ raise TypeError("No %s storage." % sbro.type)
document_storage()
diff --git a/addons/document/i18n/document.pot b/addons/document/i18n/document.pot
index 461fb46ac6e..129b596f262 100644
--- a/addons/document/i18n/document.pot
+++ b/addons/document/i18n/document.pot
@@ -923,7 +923,7 @@ msgstr ""
#. module: document
#: sql_constraint:document.directory:0
-msgid "Directory must have a parent or a storage"
+msgid "Directory must have a parent or a storage."
msgstr ""
#. module: document
diff --git a/addons/document/nodes.py b/addons/document/nodes.py
index b4f423460d7..f1c3c71a8e6 100644
--- a/addons/document/nodes.py
+++ b/addons/document/nodes.py
@@ -45,7 +45,7 @@ _logger = logging.getLogger(__name__)
def _str2time(cre):
""" Convert a string with time representation (from db) into time (float)
-
+
Note: a place to fix if datetime is used in db.
"""
if not cre:
@@ -62,7 +62,7 @@ def get_node_context(cr, uid, context):
class node_context(object):
""" This is the root node, representing access to some particular context
-
+
A context is a set of persistent data, which may influence the structure
of the nodes. All other transient information during a data query should
be passed down with function arguments.
@@ -99,7 +99,7 @@ class node_context(object):
def __ne__(self, other):
return not self.__eq__(other)
-
+
def get(self, name, default=None):
return self.context.get(name, default)
@@ -119,7 +119,7 @@ class node_context(object):
"""Create (or locate) a node for a directory
@param dbro a browse object of document.directory
"""
-
+
fullpath = dbro.get_full_path(context=self.context)
klass = dbro.get_node_class(dbro, context=self.context)
return klass(fullpath, None ,self, dbro)
@@ -183,7 +183,7 @@ class node_descriptor(object):
def __nonzero__(self):
""" Ensure that a node_descriptor will never equal False
-
+
Since we do define __len__ and __iter__ for us, we must avoid
being regarded as non-true objects.
"""
@@ -244,7 +244,7 @@ class node_class(object):
else:
s.append(self.path)
return s #map(lambda x: '/' +x, s)
-
+
def __repr__(self):
return "%s@/%s" % (self.our_type, '/'.join(self.full_path()))
@@ -271,7 +271,7 @@ class node_class(object):
return False
def get_data(self,cr):
- raise TypeError('no data for %s'% self.type)
+ raise TypeError('No data for %s.'% self.type)
def open_data(self, cr, mode):
""" Open a node_descriptor object for this node.
@@ -285,10 +285,10 @@ class node_class(object):
For this class, there is no data, so no implementation. Each
child class that has data should override this.
"""
- raise TypeError('no data for %s' % self.type)
+ raise TypeError('No data for %s.' % self.type)
def _get_storage(self,cr):
- raise RuntimeError("no storage for base class")
+ raise RuntimeError("No storage for base class.")
def get_etag(self,cr):
""" Get a tag, unique per object + modification.
@@ -323,11 +323,11 @@ class node_class(object):
def get_dav_eprop(self, cr, ns, prop):
if not self.DAV_M_NS:
return None
-
+
if self.DAV_M_NS.has_key(ns):
prefix = self.DAV_M_NS[ns]
else:
- _logger.debug('No namespace: %s ("%s")',ns, prop)
+ _logger.debug('No namespace: %s ("%s").',ns, prop)
return None
mname = prefix + "_" + prop.replace('-','_')
@@ -340,12 +340,12 @@ class node_class(object):
r = m(cr)
return r
except AttributeError:
- _logger.debug('Property %s not supported' % prop, exc_info=True)
+ _logger.debug('The property %s is not supported.' % prop, exc_info=True)
return None
def get_dav_resourcetype(self, cr):
""" Get the DAV resource type.
-
+
Is here because some nodes may exhibit special behaviour, like
CalDAV/GroupDAV collections
"""
@@ -384,13 +384,13 @@ class node_class(object):
""" Create a regular file under this node
"""
_logger.warning("Attempted to create a file under %r, not possible.", self)
- raise IOError(errno.EPERM, "Not allowed to create files here")
-
+ raise IOError(errno.EPERM, "Not allowed to create file(s) here.")
+
def create_child_collection(self, cr, objname):
""" Create a child collection (directory) under self
"""
_logger.warning("Attempted to create a collection under %r, not possible.", self)
- raise IOError(errno.EPERM, "Not allowed to create folders here")
+ raise IOError(errno.EPERM, "Not allowed to create folder(s) here.")
def rm(self, cr):
raise NotImplementedError(repr(self))
@@ -404,7 +404,7 @@ class node_class(object):
def check_perms(self, perms):
""" Check the permissions of the current node.
-
+
@param perms either an integers of the bits to check, or
a string with the permission letters
@@ -414,7 +414,7 @@ class node_class(object):
4, r : allow read of file, or listing of dir contents
8, u : allow remove (unlink)
"""
-
+
if isinstance(perms, str):
pe2 = 0
chars = { 'x': 1, 'w': 2, 'r': 4, 'u': 8 }
@@ -423,10 +423,10 @@ class node_class(object):
perms = pe2
elif isinstance(perms, int):
if perms < 0 or perms > 15:
- raise ValueError("Invalid permission bits")
+ raise ValueError("Invalid permission bits.")
else:
- raise ValueError("Invalid permission attribute")
-
+ raise ValueError("Invalid permission attribute.")
+
return ((self.uidperms & perms) == perms)
class node_database(node_class):
@@ -463,9 +463,9 @@ class node_database(node_class):
is_allowed = self.check_perms(1)
else:
is_allowed = self.check_perms(5)
-
+
if not is_allowed:
- raise IOError(errno.EPERM, "Permission into directory denied")
+ raise IOError(errno.EPERM, "Permission into directory denied.")
if domain:
where = where + domain
@@ -493,7 +493,7 @@ def mkdosname(company_name, default='noname'):
for c in company_name[:8]:
n += (c in badchars and '_') or c
return n
-
+
def _uid2unixperms(perms, has_owner):
""" Convert the uidperms and the owner flag to full unix bits
@@ -543,7 +543,7 @@ class node_dir(node_database):
try:
self.dctx['dctx_' + dfld.field] = safe_eval(dfld.expr,dc2)
except Exception,e:
- print "Cannot eval %s" % dfld.expr
+ print "Cannot eval %s." % dfld.expr
print e
pass
@@ -566,10 +566,10 @@ class node_dir(node_database):
def _file_get(self, cr, nodename=False):
res = super(node_dir,self)._file_get(cr, nodename)
-
+
is_allowed = self.check_perms(nodename and 1 or 5)
if not is_allowed:
- raise IOError(errno.EPERM, "Permission into directory denied")
+ raise IOError(errno.EPERM, "Permission into directory denied.")
cntobj = self.context._dirobj.pool.get('document.directory.content')
uid = self.context.uid
@@ -583,7 +583,7 @@ class node_dir(node_database):
res.extend(res3)
return res
-
+
def _child_get(self, cr, name=None, domain=None):
dirobj = self.context._dirobj
uid = self.context.uid
@@ -595,9 +595,9 @@ class node_dir(node_database):
is_allowed = self.check_perms(1)
else:
is_allowed = self.check_perms(5)
-
+
if not is_allowed:
- raise IOError(errno.EPERM, "Permission into directory denied")
+ raise IOError(errno.EPERM, "Permission into directory denied.")
if not domain:
domain = []
@@ -633,20 +633,20 @@ class node_dir(node_database):
if not directory:
raise OSError(2, 'Not such file or directory.')
if not self.check_perms('u'):
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
if directory._table_name=='document.directory':
if self.children(cr):
raise OSError(39, 'Directory not empty.')
res = self.context._dirobj.unlink(cr, uid, [directory.id])
else:
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
return res
def create_child_collection(self, cr, objname):
object2 = False
if not self.check_perms(2):
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
dirobj = self.context._dirobj
uid = self.context.uid
@@ -654,7 +654,7 @@ class node_dir(node_database):
ctx.update(self.dctx)
obj = dirobj.browse(cr, uid, self.dir_id)
if obj and (obj.type == 'ressource') and not object2:
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
#objname = uri2[-1]
val = {
@@ -672,7 +672,7 @@ class node_dir(node_database):
Return the node_* created
"""
if not self.check_perms(2):
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
dirobj = self.context._dirobj
uid = self.context.uid
@@ -702,10 +702,10 @@ class node_dir(node_database):
Note /may/ be called with ndir_node = None, to rename the document root.
"""
if ndir_node and (ndir_node.context != self.context):
- raise NotImplementedError("Cannot move directories between contexts")
+ raise NotImplementedError("Cannot move directories between contexts.")
if (not self.check_perms('u')) or (not ndir_node.check_perms('w')):
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
dir_obj = self.context._dirobj
if not fil_obj:
@@ -724,13 +724,13 @@ class node_dir(node_database):
assert self.parent
if self.parent != ndir_node:
- _logger.debug('Cannot move dir %r from %r to %r', self, self.parent, ndir_node)
- raise NotImplementedError('Cannot move dir to another dir')
+ _logger.debug('Cannot move dir %r from %r to %r.', self, self.parent, ndir_node)
+ raise NotImplementedError('Cannot move dir to another dir.')
ret = {}
if new_name and (new_name != dbro.name):
if ndir_node.child(cr, new_name):
- raise IOError(errno.EEXIST, "Destination path already exists")
+ raise IOError(errno.EEXIST, "Destination path already exists.")
ret['name'] = new_name
del dbro
@@ -832,7 +832,7 @@ class node_res_dir(node_class):
elif isinstance(app, tuple):
where.append(app)
else:
- raise RuntimeError("incorrect domain expr: %s" % self.domain)
+ raise RuntimeError("Incorrect domain expr: %s." % self.domain)
if self.resm_id:
where.append(('id','=',self.resm_id))
@@ -845,7 +845,7 @@ class node_res_dir(node_class):
is_allowed = self.check_perms(5)
if not is_allowed:
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
# print "Where clause for %s" % self.res_model, where
if self.ressource_tree:
@@ -864,10 +864,10 @@ class node_res_dir(node_class):
if not res_name:
continue
# Yes! we can't do better but skip nameless records.
-
+
# Escape the name for characters not supported in filenames
res_name = res_name.replace('/','_') # any other weird char?
-
+
if name and (res_name != ustr(name)):
# we have matched _ to any character, but we only meant to match
# the special ones.
@@ -923,7 +923,7 @@ class node_res_obj(node_class):
try:
self.dctx[fld] = safe_eval(expr, dc2)
except Exception,e:
- print "Cannot eval %s for %s" % (expr, fld)
+ print "Cannot eval %s for %s." % (expr, fld)
print e
pass
else:
@@ -962,7 +962,7 @@ class node_res_obj(node_class):
res = []
is_allowed = self.check_perms((nodename and 1) or 5)
if not is_allowed:
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
cntobj = self.context._dirobj.pool.get('document.directory.content')
uid = self.context.uid
@@ -997,7 +997,7 @@ class node_res_obj(node_class):
def get_dav_eprop_DEPR(self, cr, ns, prop):
# Deprecated!
if ns != 'http://groupdav.org/' or prop != 'resourcetype':
- _logger.warning("Who asked for %s:%s?" % (ns, prop))
+ _logger.warning("Who asks for %s:%s?" % (ns, prop))
return None
cntobj = self.context._dirobj.pool.get('document.directory.content')
uid = self.context.uid
@@ -1016,7 +1016,7 @@ class node_res_obj(node_class):
is_allowed = self.check_perms((name and 1) or 5)
if not is_allowed:
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
uid = self.context.uid
ctx = self.context.context.copy()
@@ -1057,7 +1057,7 @@ class node_res_obj(node_class):
where2 = where + [('parent_id','=',self.dir_id) ]
ids = dirobj.search(cr, uid, where2, context=ctx)
bo = obj.browse(cr, uid, self.res_id, context=ctx)
-
+
for dirr in dirobj.browse(cr, uid, ids, context=ctx):
if name and (name != dirr.name):
continue
@@ -1103,7 +1103,7 @@ class node_res_obj(node_class):
dirobj = self.context._dirobj
is_allowed = self.check_perms(2)
if not is_allowed:
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
uid = self.context.uid
ctx = self.context.context.copy()
@@ -1114,7 +1114,7 @@ class node_res_obj(node_class):
obj = dirobj.browse(cr, uid, self.dir_id)
if obj and (obj.type == 'ressource') and not object2:
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
val = {
@@ -1135,7 +1135,7 @@ class node_res_obj(node_class):
"""
is_allowed = self.check_perms(2)
if not is_allowed:
- raise IOError(errno.EPERM,"Permission denied")
+ raise IOError(errno.EPERM,"Permission denied.")
dirobj = self.context._dirobj
uid = self.context.uid
@@ -1177,14 +1177,14 @@ class node_file(node_class):
self.write_date = fil.write_date or fil.create_date
self.content_length = fil.file_size
self.displayname = fil.name
-
+
self.uidperms = 14
if parent:
if not parent.check_perms('x'):
self.uidperms = 0
elif not parent.check_perms('w'):
self.uidperms = 4
-
+
try:
self.uuser = (fil.user_id and fil.user_id.login) or 'nobody'
except Exception:
@@ -1213,9 +1213,9 @@ class node_file(node_class):
def open_data(self, cr, mode):
stor = self.storage_id
- assert stor, "No storage for file #%s" % self.file_id
+ assert stor, "No storage for file #%s." % self.file_id
if not self.check_perms(4):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
# If storage is not set properly, we are just screwed here, don't
# try to get it from default.
@@ -1225,7 +1225,7 @@ class node_file(node_class):
def rm(self, cr):
uid = self.context.uid
if not self.check_perms(8):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
document_obj = self.context._dirobj.pool.get('ir.attachment')
if self.type in ('collection','database'):
return False
@@ -1271,7 +1271,7 @@ class node_file(node_class):
stor = self.storage_id
assert stor, "No storage for file #%s" % self.file_id
if not self.check_perms(4):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
# If storage is not set properly, we are just screwed here, don't
# try to get it from default.
@@ -1294,7 +1294,7 @@ class node_file(node_class):
stor = self.storage_id
assert stor, "No storage for file #%s" % self.file_id
if not self.check_perms(2):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
stobj = self.context._dirobj.pool.get('document.storage')
return stobj.set_data(cr, self.context.uid,stor, self, data, self.context.context, fil_obj)
@@ -1304,31 +1304,31 @@ class node_file(node_class):
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False):
if ndir_node and ndir_node.context != self.context:
- raise NotImplementedError("Cannot move files between contexts")
+ raise NotImplementedError("Cannot move files between contexts.")
if (not self.check_perms(8)) and ndir_node.check_perms(2):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
doc_obj = self.context._dirobj.pool.get('ir.attachment')
if not fil_obj:
dbro = doc_obj.browse(cr, self.context.uid, self.file_id, context=self.context.context)
else:
dbro = fil_obj
- assert dbro.id == self.file_id, "%s != %s for %r" % (dbro.id, self.file_id, self)
+ assert dbro.id == self.file_id, "%s != %s for %r." % (dbro.id, self.file_id, self)
if not dbro:
- raise IndexError("Cannot locate doc %d", self.file_id)
+ raise IndexError("Cannot locate doc %d.", self.file_id)
if (not self.parent):
# there *must* be a parent node for this one
self.parent = self.context.get_dir_node(cr, dbro.parent_id)
assert self.parent
-
+
ret = {}
if ndir_node and self.parent != ndir_node:
if not (isinstance(self.parent, node_dir) and isinstance(ndir_node, node_dir)):
- _logger.debug('Cannot move file %r from %r to %r', self, self.parent, ndir_node)
- raise NotImplementedError('Cannot move files between dynamic folders')
+ _logger.debug('Cannot move file %r from %r to %r.', self, self.parent, ndir_node)
+ raise NotImplementedError('Cannot move files between dynamic folders.')
if not ndir_obj:
ndir_obj = self.context._dirobj.browse(cr, self.context.uid, \
@@ -1343,7 +1343,7 @@ class node_file(node_class):
if new_name and (new_name != dbro.name):
if len(ret):
- raise NotImplementedError("Cannot rename and move") # TODO
+ raise NotImplementedError("Cannot rename and move.") # TODO
stobj = self.context._dirobj.pool.get('document.storage')
r2 = stobj.simple_rename(cr, self.context.uid, self, new_name, self.context.context)
ret.update(r2)
@@ -1373,7 +1373,7 @@ class node_content(node_class):
self.uidperms = parent.uidperms & 14
self.uuser = parent.uuser
self.ugroup = parent.ugroup
-
+
self.extension = cnt.extension
self.report_id = cnt.report_id and cnt.report_id.id
#self.mimetype = cnt.extension.
@@ -1399,7 +1399,7 @@ class node_content(node_class):
def get_data(self, cr, fil_obj = None):
cntobj = self.context._dirobj.pool.get('document.directory.content')
if not self.check_perms(4):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
ctx = self.context.context.copy()
ctx.update(self.dctx)
@@ -1416,14 +1416,14 @@ class node_content(node_class):
elif mode in ('r+', 'w+'):
cperms = 'rw'
else:
- raise IOError(errno.EINVAL, "Cannot open at mode %s" % mode)
-
+ raise IOError(errno.EINVAL, "Cannot open at mode %s." % mode)
+
if not self.check_perms(cperms):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
ctx = self.context.context.copy()
ctx.update(self.dctx)
-
+
return nodefd_content(self, cr, mode, ctx)
def get_data_len(self, cr, fil_obj = None):
@@ -1438,7 +1438,7 @@ class node_content(node_class):
def set_data(self, cr, data, fil_obj = None):
cntobj = self.context._dirobj.pool.get('document.directory.content')
if not self.check_perms(2):
- raise IOError(errno.EPERM, "Permission denied")
+ raise IOError(errno.EPERM, "Permission denied.")
ctx = self.context.context.copy()
ctx.update(self.dctx)
@@ -1451,7 +1451,7 @@ class node_content(node_class):
return ''
class nodefd_content(StringIO, node_descriptor):
-
+
""" A descriptor to content nodes
"""
def __init__(self, parent, cr, mode, ctx):
@@ -1473,8 +1473,8 @@ class nodefd_content(StringIO, node_descriptor):
elif mode == 'a':
StringIO.__init__(self, None)
else:
- _logger.error("Incorrect mode %s specified", mode)
- raise IOError(errno.EINVAL, "Invalid file mode")
+ _logger.error("Incorrect mode %s is specified.", mode)
+ raise IOError(errno.EINVAL, "Invalid file mode.")
self.mode = mode
def size(self):
@@ -1499,14 +1499,14 @@ class nodefd_content(StringIO, node_descriptor):
raise NotImplementedError
cr.commit()
except Exception:
- _logger.exception('Cannot update db content #%d for close:', par.cnt_id)
+ _logger.exception('Cannot update db content #%d for close.', par.cnt_id)
raise
finally:
cr.close()
StringIO.close(self)
class nodefd_static(StringIO, node_descriptor):
-
+
""" A descriptor to nodes with static data.
"""
def __init__(self, parent, cr, mode, ctx=None):
@@ -1527,8 +1527,8 @@ class nodefd_static(StringIO, node_descriptor):
elif mode == 'a':
StringIO.__init__(self, None)
else:
- _logger.error("Incorrect mode %s specified", mode)
- raise IOError(errno.EINVAL, "Invalid file mode")
+ _logger.error("Incorrect mode %s is specified.", mode)
+ raise IOError(errno.EINVAL, "Invalid file mode.")
self.mode = mode
def size(self):
@@ -1552,7 +1552,7 @@ class nodefd_static(StringIO, node_descriptor):
raise NotImplementedError
cr.commit()
except Exception:
- _logger.exception('Cannot update db content #%d for close:', par.cnt_id)
+ _logger.exception('Cannot update db content #%d for close.', par.cnt_id)
raise
finally:
cr.close()
diff --git a/addons/document/std_index.py b/addons/document/std_index.py
index 49ac9a5c906..422590e127f 100644
--- a/addons/document/std_index.py
+++ b/addons/document/std_index.py
@@ -104,7 +104,7 @@ class DocIndex(indexer):
except OSError:
_logger.warn("Failed attempt to execute antiword (MS Word reader). Antiword is necessary to index the file %s of MIME type %s. Detailed error available at DEBUG level.", fname, self._getMimeTypes()[0])
- _logger.debug("Trace of the failed file indexing attempt: ", exc_info=True)
+ _logger.debug("Trace of the failed file indexing attempt.", exc_info=True)
return False
cntIndex.register(DocIndex())
diff --git a/addons/document_ftp/ftpserver/abstracted_fs.py b/addons/document_ftp/ftpserver/abstracted_fs.py
index 429016a2376..dbda715f614 100644
--- a/addons/document_ftp/ftpserver/abstracted_fs.py
+++ b/addons/document_ftp/ftpserver/abstracted_fs.py
@@ -81,7 +81,7 @@ class abstracted_fs(object):
self.db_name_list.append(db_name)
cr.commit()
except Exception:
- self._log.warning('Cannot use db "%s"', db_name)
+ self._log.warning('Cannot use db "%s".', db_name)
finally:
if cr is not None:
cr.close()
@@ -143,40 +143,40 @@ class abstracted_fs(object):
child = node.child(cr, objname)
if child:
if child.type not in ('file','content'):
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
ret = child.open_data(cr, mode)
cr.commit()
- assert ret, "Cannot create descriptor for %r: %r" % (child, ret)
+ assert ret, "Cannot create descriptor for %r: %r." % (child, ret)
return ret
except EnvironmentError:
raise
except Exception:
- self._log.exception('Cannot locate item %s at node %s', objname, repr(node))
+ self._log.exception('Cannot locate item %s at node %s.', objname, repr(node))
pass
try:
child = node.create_child(cr, objname, data=None)
ret = child.open_data(cr, mode)
- assert ret, "cannot create descriptor for %r" % child
+ assert ret, "Cannot create descriptor for %r." % child
cr.commit()
return ret
except EnvironmentError:
raise
except Exception:
- self._log.exception('Cannot create item %s at node %s', objname, repr(node))
- raise OSError(1, 'Operation not permited.')
+ self._log.exception('Cannot create item %s at node %s.', objname, repr(node))
+ raise OSError(1, 'Operation is not permitted.')
def open(self, datacr, mode):
if not (datacr and datacr[1]):
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
# Reading operation
cr, node, rem = datacr
try:
res = node.open_data(cr, mode)
cr.commit()
except TypeError:
- raise IOError(errno.EINVAL, "No data")
+ raise IOError(errno.EINVAL, "No data.")
return res
# ok, but need test more
@@ -211,9 +211,9 @@ class abstracted_fs(object):
self.cwd_node = None
return None
if not datacr[1]:
- raise OSError(1, 'Operation not permitted')
+ raise OSError(1, 'Operation is not permitted.')
if datacr[1].type not in ('collection','database'):
- raise OSError(2, 'Path is not a directory')
+ raise OSError(2, 'Path is not a directory.')
self.cwd = '/'+datacr[1].context.dbname + '/'
self.cwd += '/'.join(datacr[1].full_path())
self.cwd_node = datacr[1]
@@ -223,7 +223,7 @@ class abstracted_fs(object):
"""Create the specified directory."""
cr, node, rem = datacr or (None, None, None)
if not node:
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
try:
basename =_to_unicode(basename)
@@ -231,8 +231,8 @@ class abstracted_fs(object):
self._log.debug("Created child dir: %r", cdir)
cr.commit()
except Exception:
- self._log.exception('Cannot create dir "%s" at node %s', basename, repr(node))
- raise OSError(1, 'Operation not permited.')
+ self._log.exception('Cannot create dir "%s" at node %s.', basename, repr(node))
+ raise OSError(1, 'Operation is not permitted.')
def close_cr(self, data):
if data and data[0]:
@@ -287,10 +287,10 @@ class abstracted_fs(object):
p_parts = p_parts[1:]
# self._log.debug("Path parts: %r ", p_parts)
if not p_parts:
- raise IOError(errno.EPERM, 'Cannot perform operation at root dir')
+ raise IOError(errno.EPERM, 'Cannot perform operation at root directory.')
dbname = p_parts[0]
if dbname not in self.db_list():
- raise IOError(errno.ENOENT,'Invalid database path: %s' % dbname)
+ raise IOError(errno.ENOENT,'Invalid database path: %s.' % dbname)
try:
db = pooler.get_db(dbname)
except Exception:
@@ -303,7 +303,7 @@ class abstracted_fs(object):
raise
if not uid:
cr.close()
- raise OSError(2, 'Authentification Required.')
+ raise OSError(2, 'Authentification required.')
n = get_node_context(cr, uid, {})
node = n.get_uri(cr, p_parts[1:])
return (cr, node, rem_path)
@@ -318,7 +318,7 @@ class abstracted_fs(object):
node = self.cwd_node
if node is False and mode not in ('???'):
cr.close()
- raise IOError(errno.ENOENT, 'Path does not exist')
+ raise IOError(errno.ENOENT, 'Path does not exist.')
return (cr, node, rem_path)
def get_node_cr_uid(self, node):
@@ -375,7 +375,7 @@ class abstracted_fs(object):
return self.rmdir(datacr)
elif datacr[1].type == 'file':
return self.rmfile(datacr)
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Operation is not permitted.')
def rmfile(self, datacr):
"""Remove the specified file."""
@@ -399,8 +399,8 @@ class abstracted_fs(object):
except EnvironmentError:
raise
except Exception:
- self._log.exception('Cannot rename "%s" to "%s" at "%s"', src, datacr[2], datacr[1])
- raise OSError(1,'Operation not permited.')
+ self._log.exception('Cannot rename "%s" to "%s" at "%s".', src, datacr[2], datacr[1])
+ raise OSError(1,'Operation is not permitted.')
def stat(self, node):
raise NotImplementedError()
@@ -429,7 +429,7 @@ class abstracted_fs(object):
def getsize(self, datacr):
"""Return the size of the specified file in bytes."""
if not (datacr and datacr[1]):
- raise IOError(errno.ENOENT, "No such file or directory")
+ raise IOError(errno.ENOENT, "No such file or directory.")
if datacr[1].type in ('file', 'content'):
return datacr[1].get_data_len(datacr[0]) or 0L
return 0L
diff --git a/addons/document_ftp/ftpserver/ftpserver.py b/addons/document_ftp/ftpserver/ftpserver.py
index 48ec4ad5ea0..1e8b8d88468 100755
--- a/addons/document_ftp/ftpserver/ftpserver.py
+++ b/addons/document_ftp/ftpserver/ftpserver.py
@@ -302,16 +302,16 @@ class DummyAuthorizer:
provide customized response strings when user log-in and quit.
"""
if self.has_user(username):
- raise AuthorizerError('User "%s" already exists' %username)
+ raise AuthorizerError('User "%s" already exists.' %username)
homedir = os.path.realpath(homedir)
if not os.path.isdir(homedir):
- raise AuthorizerError('No such directory: "%s"' %homedir)
+ raise AuthorizerError('No such directory: "%s".' %homedir)
for p in perm:
if p not in 'elradfmw':
- raise AuthorizerError('No such permission "%s"' %p)
+ raise AuthorizerError('No such permission: "%s".' %p)
for p in perm:
if (p in self.write_perms) and (username == 'anonymous'):
- warnings.warn("write permissions assigned to anonymous user.",
+ warnings.warn("Write permissions are assigned to anonymous user.",
RuntimeWarning)
break
dic = {'pwd': str(password),
@@ -532,7 +532,7 @@ class ActiveDTP(asyncore.dispatcher):
try:
self.connect((ip, port))
except socket.gaierror:
- self.cmd_channel.respond("425 Can't connect to specified address.")
+ self.cmd_channel.respond("425 Cannot connect to specified address.")
self.close()
# --- connection / overridden
@@ -542,14 +542,14 @@ class ActiveDTP(asyncore.dispatcher):
def handle_connect(self):
"""Called when connection is established."""
- self.cmd_channel.respond('200 Active data connection established.')
+ self.cmd_channel.respond('200 Active data connection has been established.')
# delegate such connection to DTP handler
handler = self.cmd_channel.dtp_handler(self.socket, self.cmd_channel)
self.cmd_channel.data_channel = handler
self.cmd_channel.on_dtp_connection()
def handle_expt(self):
- self.cmd_channel.respond("425 Can't connect to specified address.")
+ self.cmd_channel.respond("425 Cannot connect to specified address.")
self.close()
def handle_error(self):
@@ -562,7 +562,7 @@ class ActiveDTP(asyncore.dispatcher):
pass
except:
logerror(traceback.format_exc())
- self.cmd_channel.respond("425 Can't connect to specified address.")
+ self.cmd_channel.respond("425 Cannot connect to specified address.")
self.close()
class DTPHandler(asyncore.dispatcher):
@@ -638,7 +638,7 @@ class DTPHandler(asyncore.dispatcher):
elif type == 'i':
self.data_wrapper = lambda x: x
else:
- raise TypeError, "Unsupported type"
+ raise TypeError, "Unsupported type."
self.receive = True
def get_transmitted_bytes(self):
@@ -767,7 +767,7 @@ class DTPHandler(asyncore.dispatcher):
# some other exception occurred; we don't want to provide
# confidential error messages
logerror(traceback.format_exc())
- error = "Internal error"
+ error = "Internal error."
self.cmd_channel.respond("426 %s; transfer aborted." %error)
self.close()
@@ -823,7 +823,7 @@ class FileProducer:
elif type == 'i':
self.data_wrapper = lambda x: x
else:
- raise TypeError, "Unsupported type"
+ raise TypeError, "Unsupported type."
def more(self):
"""Attempt a chunk of data of size self.buffer_size."""
@@ -1485,7 +1485,7 @@ class FTPHandler(asynchat.async_chat):
buflimit = 2048
if self.in_buffer_len > buflimit:
self.respond('500 Command too long.')
- self.log('Command received exceeded buffer limit of %s.' %(buflimit))
+ self.log('Command has been received exceeds buffer limit of %s.' %(buflimit))
self.in_buffer = []
self.in_buffer_len = 0
@@ -1528,12 +1528,12 @@ class FTPHandler(asynchat.async_chat):
# let's check if user provided an argument for those commands
# needing one
if not arg and cmd in self.arg_cmds:
- self.respond("501 Syntax error: command needs an argument.")
+ self.respond("501 Syntax error! Command needs an argument.")
return
# let's do the same for those commands requiring no argument.
elif arg and cmd in self.unarg_cmds:
- self.respond("501 Syntax error: command does not accept arguments.")
+ self.respond("501 Syntax error! Command does not accept arguments.")
return
# provide a limited set of commands if user isn't
@@ -1617,7 +1617,7 @@ class FTPHandler(asynchat.async_chat):
else:
self.in_buffer.append(data)
return
- self.log("Can't handle OOB data.")
+ self.log("Cannot handle OOB data.")
self.close()
def handle_error(self):
@@ -1801,7 +1801,7 @@ class FTPHandler(asynchat.async_chat):
except NotImplementedError, err:
cmdname = function.__name__
why = err.args[0] or 'Not implemented'
- self.log('FAIL %s() not implemented: %s.' %(cmdname, why))
+ self.log('FAIL %s() is not implemented: %s.' %(cmdname, why))
self.respond('502 %s.' %why)
raise FTPExceptionSent(why)
except EnvironmentError, err:
@@ -1811,7 +1811,7 @@ class FTPHandler(asynchat.async_chat):
except Exception:
pass
ret_code = eresp.get(err.errno, '451')
- why = (err.strerror) or 'Error in command'
+ why = (err.strerror) or 'Error in command.'
self.log('FAIL %s() %s errno=%s: %s.' %(cmdname, uline, err.errno, why))
self.respond('%s %s.' % (str(ret_code), why))
@@ -1841,15 +1841,15 @@ class FTPHandler(asynchat.async_chat):
if ip != self.remote_ip:
self.log("Rejected data connection to foreign address %s:%s."
%(ip, port))
- self.respond("501 Can't connect to a foreign address.")
+ self.respond("501 Cannot connect to a foreign address.")
return
# ...another RFC-2577 recommendation is rejecting connections
# to privileged ports (< 1024) for security reasons.
if not self.permit_privileged_ports:
if port < 1024:
- self.log('PORT against the privileged port "%s" refused.' %port)
- self.respond("501 Can't connect over a privileged port.")
+ self.log('PORT against the privileged port "%s" has been refused.' %port)
+ self.respond("501 Cannot connect over a privileged port.")
return
# close existent DTP-server instance, if any.
@@ -1889,7 +1889,7 @@ class FTPHandler(asynchat.async_chat):
# make sure we are not hitting the max connections limit
if self.server.max_cons:
if len(self._map) >= self.server.max_cons:
- msg = "Too many connections. Can't open data channel."
+ msg = "Too many connections. Cannot open data channel."
self.respond("425 %s" %msg)
self.log(msg)
return
@@ -2150,7 +2150,7 @@ class FTPHandler(asynchat.async_chat):
datacr = self.get_crdata2(line, mode='list')
# RFC-3659 requires 501 response code if path is not a directory
if not self.fs.isdir(datacr[1]):
- err = 'No such directory'
+ err = 'No such directory.'
self.log('FAIL MLSD "%s". %s.' %(line, err))
self.respond("501 %s." %err)
return
@@ -2191,7 +2191,7 @@ class FTPHandler(asynchat.async_chat):
fd.seek(self.restart_position)
ok = 1
except AssertionError:
- why = "Invalid REST parameter"
+ why = "Invalid REST parameter."
except IOError, err:
why = _strerror(err)
self.restart_position = 0
@@ -2240,7 +2240,7 @@ class FTPHandler(asynchat.async_chat):
fd.seek(self.restart_position)
ok = 1
except AssertionError:
- why = "Invalid REST parameter"
+ why = "Invalid REST parameter."
except IOError, err:
why = _strerror(err)
self.restart_position = 0
@@ -2275,7 +2275,7 @@ class FTPHandler(asynchat.async_chat):
# watch for STOU preceded by REST, which makes no sense.
if self.restart_position:
- self.respond("450 Can't STOU while REST request is pending.")
+ self.respond("450 Cannot STOU while REST request is pending.")
return
@@ -2296,7 +2296,7 @@ class FTPHandler(asynchat.async_chat):
# hitted the max number of tries to find out file with
# unique name
if err.errno == errno.EEXIST:
- why = 'No usable unique file name found'
+ why = 'No usable unique file name found.'
# something else happened
else:
why = _strerror(err)
@@ -2307,9 +2307,9 @@ class FTPHandler(asynchat.async_chat):
filename = line
if not self.authorizer.has_perm(self.username, 'w', filename):
- self.log('FAIL STOU "%s". Not enough privileges'
+ self.log('FAIL STOU "%s". Not enough privileges.'
%self.fs.ftpnorm(line))
- self.respond("550 Can't STOU: not enough privileges.")
+ self.respond("550 Cannot STOU: not enough privileges.")
self.fs.close_cr(datacr)
return
@@ -2329,7 +2329,7 @@ class FTPHandler(asynchat.async_chat):
"""Append data to an existing file on the server."""
# watch for APPE preceded by REST, which makes no sense.
if self.restart_position:
- self.respond("550 Can't APPE while REST request is pending.")
+ self.respond("550 Cannot APPE while REST request is pending.")
else:
self.ftp_STOR(line, mode='a')
@@ -2405,7 +2405,7 @@ class FTPHandler(asynchat.async_chat):
# and account information already supplied and beginning the
# login sequence again.
self.flush_account()
- msg = 'Previous account information was flushed'
+ msg = 'Previous account information is flushed.'
self.log('OK USER "%s". %s.' %(line, msg))
self.respond('331 %s, send password.' %msg)
self.username = line
@@ -2554,7 +2554,7 @@ class FTPHandler(asynchat.async_chat):
else:
datacr = self.get_crdata2(line)
if not datacr:
- raise IOError(errno.ENOENT, "%s is not retrievable" %line)
+ raise IOError(errno.ENOENT, "%s is not retrievable." %line)
lmt = self.try_as_current_user(self.fs.getmtime, (datacr,), line=line)
lmt = time.strftime("%Y%m%d%H%M%S", time.localtime(lmt))
@@ -2584,7 +2584,7 @@ class FTPHandler(asynchat.async_chat):
try:
datacr = self.get_crdata2(line, mode='delete')
if not datacr[1]:
- msg = "Can't remove root directory."
+ msg = "Cannot remove root directory."
self.respond("553 %s" %msg)
self.log('FAIL MKD "/". %s' %msg)
self.fs.close_cr(datacr)
@@ -2617,7 +2617,7 @@ class FTPHandler(asynchat.async_chat):
if not datacr[1]:
self.respond("550 No such file or directory.")
elif not datacr[1]:
- self.respond("553 Can't rename the home directory.")
+ self.respond("553 Cannot rename the home directory.")
else:
self.fs.rnfr = datacr[1]
self.respond("350 Ready for destination name.")
@@ -2760,14 +2760,14 @@ class FTPHandler(asynchat.async_chat):
def ftp_OPTS(self, line):
"""Specify options for FTP commands as specified in RFC-2389."""
try:
- assert (not line.count(' ') > 1), 'Invalid number of arguments'
+ assert (not line.count(' ') > 1), 'Invalid number of arguments.'
if ' ' in line:
cmd, arg = line.split(' ')
- assert (';' in arg), 'Invalid argument'
+ assert (';' in arg), 'Invalid argument!'
else:
cmd, arg = line, ''
# actually the only command able to accept options is MLST
- assert (cmd.upper() == 'MLST'), 'Unsupported command "%s"' %cmd
+ assert (cmd.upper() == 'MLST'), 'Unsupported command "%s".' %cmd
except AssertionError, err:
self.respond('501 %s.' %err)
else:
diff --git a/addons/document_ftp/test_easyftp.py b/addons/document_ftp/test_easyftp.py
index 16bace4b167..bb4e5ea6648 100644
--- a/addons/document_ftp/test_easyftp.py
+++ b/addons/document_ftp/test_easyftp.py
@@ -62,7 +62,7 @@ def get_ftp_fulldata(ftp, fname, limit=8192):
data = []
def ffp(data, ndata):
if len(data)+ len(ndata) > limit:
- raise IndexError('Data over the limit')
+ raise IndexError('Data over the limit.')
data.append(ndata)
ftp.retrbinary('RETR %s' % fname, partial(ffp,data))
return ''.join(data)
diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py
index 772b7600f20..1b826434f74 100644
--- a/addons/document_webdav/dav_fs.py
+++ b/addons/document_webdav/dav_fs.py
@@ -78,13 +78,13 @@ def _str2time(cre):
class BoundStream2(object):
"""Wraps around a seekable buffer, reads a determined range of data
-
+
Note that the supplied stream object MUST support a size() which
should return its data length (in bytes).
-
+
A variation of the class in websrv_lib.py
"""
-
+
def __init__(self, stream, offset=None, length=None, chunk_size=None):
self._stream = stream
self._offset = offset or 0
@@ -98,8 +98,8 @@ class BoundStream2(object):
def read(self, size=-1):
if not self._stream:
- raise IOError(errno.EBADF, "read() without stream")
-
+ raise IOError(errno.EBADF, "read() without stream.")
+
if self._rem_length == 0:
return ''
elif self._rem_length < 0:
@@ -110,7 +110,7 @@ class BoundStream2(object):
rsize = size
if self._chunk_size and self._chunk_size < rsize:
rsize = self._chunk_size
-
+
data = self._stream.read(rsize)
self._rem_length -= len(data)
@@ -136,25 +136,25 @@ class BoundStream2(object):
"""
if whence == os.SEEK_SET:
if pos < 0 or pos > self._length:
- raise IOError(errno.EINVAL,"Cannot seek")
+ raise IOError(errno.EINVAL,"Cannot seek.")
self._stream.seek(pos - self._offset)
self._rem_length = self._length - pos
elif whence == os.SEEK_CUR:
if pos > 0:
if pos > self._rem_length:
- raise IOError(errno.EINVAL,"Cannot seek past end")
+ raise IOError(errno.EINVAL,"Cannot seek past end.")
elif pos < 0:
oldpos = self.tell()
if oldpos + pos < 0:
- raise IOError(errno.EINVAL,"Cannot seek before start")
+ raise IOError(errno.EINVAL,"Cannot seek before start.")
self._stream.seek(pos, os.SEEK_CUR)
self._rem_length -= pos
elif whence == os.SEEK_END:
if pos > 0:
- raise IOError(errno.EINVAL,"Cannot seek past end")
+ raise IOError(errno.EINVAL,"Cannot seek past end.")
else:
if self._length + pos < 0:
- raise IOError(errno.EINVAL,"Cannot seek before start")
+ raise IOError(errno.EINVAL,"Cannot seek before start.")
newpos = self._offset + self._length + pos
self._stream.seek(newpos, os.SEEK_SET)
self._rem_length = 0 - pos
@@ -206,7 +206,7 @@ class openerp_dav_handler(dav_interface):
self.parent.log_error("Cannot %s: %s", opname, str(e))
self.parent.log_message("Exc: %s",traceback.format_exc())
# see par 9.3.1 of rfc
- raise DAV_Error(403, str(e) or 'Not supported at this path')
+ raise DAV_Error(403, str(e) or 'Not supported at this path.')
except EnvironmentError, err:
if cr: cr.close()
import traceback
@@ -218,7 +218,7 @@ class openerp_dav_handler(dav_interface):
if cr: cr.close()
self.parent.log_error("Cannot %s: %s", opname, str(e))
self.parent.log_message("Exc: %s",traceback.format_exc())
- raise default_exc("Operation failed")
+ raise default_exc("Operation failed.")
def _get_dav_lockdiscovery(self, uri):
""" We raise that so that the node API is used """
@@ -400,7 +400,7 @@ class openerp_dav_handler(dav_interface):
domain = None
if filters:
domain = node.get_domain(cr, filters)
-
+
if hasattr(filters, 'getElementsByTagNameNS'):
hrefs = filters.getElementsByTagNameNS('DAV:', 'href')
if hrefs:
@@ -434,7 +434,7 @@ class openerp_dav_handler(dav_interface):
except DAV_Error:
raise
except Exception, e:
- self.parent.log_error("cannot get_children: "+ str(e))
+ self.parent.log_error("Cannot get_children: "+str(e)+".")
raise
finally:
if cr: cr.close()
@@ -488,7 +488,7 @@ class openerp_dav_handler(dav_interface):
if not node:
raise DAV_NotFound2(uri2)
# TODO: if node is a collection, for some specific set of
- # clients ( web browsers; available in node context),
+ # clients ( web browsers; available in node context),
# we may return a pseydo-html page with the directory listing.
try:
res = node.open_data(cr,'r')
@@ -500,15 +500,15 @@ class openerp_dav_handler(dav_interface):
assert start >= 0
if end and end < start:
self.parent.log_error("Invalid range for data: %s-%s" %(start, end))
- raise DAV_Error(416, "Invalid range for data")
+ raise DAV_Error(416, "Invalid range for data.")
if end:
if end >= res.size():
- raise DAV_Error(416, "Requested data exceeds available size")
+ raise DAV_Error(416, "Requested data exceeds available size.")
length = (end + 1) - start
else:
length = res.size() - start
res = BoundStream2(res, offset=start, length=length)
-
+
except TypeError,e:
# for the collections that return this error, the DAV standard
# says we'd better just return 200 OK with empty data
@@ -564,10 +564,10 @@ class openerp_dav_handler(dav_interface):
@memoize(CACHE_SIZE)
def _get_dav_getcontentlength(self, uri):
- """ return the content length of an object """
+ """ return the content length of an object """
self.parent.log_message('get length: %s' % uri)
result = 0
- cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
if not dbname:
if cr: cr.close()
return str(result)
@@ -602,7 +602,7 @@ class openerp_dav_handler(dav_interface):
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
if not dbname:
return time.time()
- try:
+ try:
node = self.uri2object(cr, uid, pool, uri2)
if not node:
raise DAV_NotFound2(uri2)
@@ -623,11 +623,11 @@ class openerp_dav_handler(dav_interface):
@memoize(CACHE_SIZE)
def get_creationdate(self, uri):
- """ return the last modified date of the object """
+ """ return the last modified date of the object """
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
if not dbname:
raise DAV_Error, 409
- try:
+ try:
node = self.uri2object(cr, uid, pool, uri2)
if not node:
raise DAV_NotFound2(uri2)
@@ -643,7 +643,7 @@ class openerp_dav_handler(dav_interface):
if not dbname:
if cr: cr.close()
return 'httpd/unix-directory'
- try:
+ try:
node = self.uri2object(cr, uid, pool, uri2)
if not node:
raise DAV_NotFound2(uri2)
@@ -651,8 +651,8 @@ class openerp_dav_handler(dav_interface):
return result
#raise DAV_NotFound, 'Could not find %s' % path
finally:
- if cr: cr.close()
-
+ if cr: cr.close()
+
def mkcol(self,uri):
""" create a new collection
see par. 9.3 of rfc4918
@@ -661,7 +661,7 @@ class openerp_dav_handler(dav_interface):
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
if not uri2[-1]:
if cr: cr.close()
- raise DAV_Error(409, "Cannot create nameless collection")
+ raise DAV_Error(409, "Cannot create nameless collection.")
if not dbname:
if cr: cr.close()
raise DAV_Error, 409
@@ -672,7 +672,7 @@ class openerp_dav_handler(dav_interface):
nc = node.child(cr, uri2[-1])
if nc:
cr.close()
- raise DAV_Error(405, "Path already exists")
+ raise DAV_Error(405, "Path already exists.")
self._try_function(node.create_child_collection, (cr, uri2[-1]),
"create col %s" % uri2[-1], cr=cr)
cr.commit()
@@ -690,30 +690,30 @@ class openerp_dav_handler(dav_interface):
node = self.uri2object(cr, uid, pool, uri2[:])
except Exception:
node = False
-
+
objname = misc.ustr(uri2[-1])
-
+
ret = None
if not node:
dir_node = self.uri2object(cr, uid, pool, uri2[:-1])
if not dir_node:
cr.close()
- raise DAV_NotFound('Parent folder not found')
+ raise DAV_NotFound('Parent folder not found.')
newchild = self._try_function(dir_node.create_child, (cr, objname, data),
"create %s" % objname, cr=cr)
if not newchild:
cr.commit()
cr.close()
- raise DAV_Error(400, "Failed to create resource")
-
+ raise DAV_Error(400, "Failed to create resource.")
+
uparts=urlparse.urlparse(uri)
fileloc = '/'.join(newchild.full_path())
if isinstance(fileloc, unicode):
fileloc = fileloc.encode('utf-8')
# the uri we get is a mangled one, where the davpath has been removed
davpath = self.parent.get_davpath()
-
+
surl = '%s://%s' % (uparts[0], uparts[1])
uloc = urllib.quote(fileloc)
hurl = False
@@ -727,19 +727,19 @@ class openerp_dav_handler(dav_interface):
ret = (str(hurl), etag)
else:
self._try_function(node.set_data, (cr, data), "save %s" % objname, cr=cr)
-
+
cr.commit()
cr.close()
return ret
def rmcol(self,uri):
""" delete a collection """
- cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
if not dbname:
if cr: cr.close()
raise DAV_Error, 409
- node = self.uri2object(cr, uid, pool, uri2)
+ node = self.uri2object(cr, uid, pool, uri2)
self._try_function(node.rmcol, (cr,), "rmcol %s" % uri, cr=cr)
cr.commit()
@@ -748,14 +748,14 @@ class openerp_dav_handler(dav_interface):
def rm(self,uri):
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
- if not dbname:
+ if not dbname:
if cr: cr.close()
raise DAV_Error, 409
node = self.uri2object(cr, uid, pool, uri2)
res = self._try_function(node.rm, (cr,), "rm %s" % uri, cr=cr)
if not res:
if cr: cr.close()
- raise OSError(1, 'Operation not permited.')
+ raise OSError(1, 'Invalid Action!')
cr.commit()
cr.close()
return 204
@@ -922,8 +922,8 @@ class openerp_dav_handler(dav_interface):
return result
def unlock(self, uri, token):
- """ Unlock a resource from that token
-
+ """ Unlock a resource from that token
+
@return True if unlocked, False if no lock existed, Exceptions
"""
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
@@ -937,7 +937,7 @@ class openerp_dav_handler(dav_interface):
except AttributeError:
# perhaps the node doesn't support locks
cr.close()
- raise DAV_Error(400, 'No locks for this resource')
+ raise DAV_Error(400, 'No locks for this resource.')
res = self._try_function(node_fn, (cr, token), "unlock %s" % uri, cr=cr)
cr.commit()
@@ -959,14 +959,14 @@ class openerp_dav_handler(dav_interface):
node = self.uri2object(cr, uid, pool, uri2[:])
except Exception:
node = False
-
+
objname = misc.ustr(uri2[-1])
-
+
if not node:
dir_node = self.uri2object(cr, uid, pool, uri2[:-1])
if not dir_node:
cr.close()
- raise DAV_NotFound('Parent folder not found')
+ raise DAV_NotFound('Parent folder not found.')
# We create a new node (file) but with empty data=None,
# as in RFC4918 p. 9.10.4
@@ -975,8 +975,8 @@ class openerp_dav_handler(dav_interface):
if not node:
cr.commit()
cr.close()
- raise DAV_Error(400, "Failed to create resource")
-
+ raise DAV_Error(400, "Failed to create resource.")
+
created = True
try:
@@ -984,7 +984,7 @@ class openerp_dav_handler(dav_interface):
except AttributeError:
# perhaps the node doesn't support locks
cr.close()
- raise DAV_Error(400, 'No locks for this resource')
+ raise DAV_Error(400, 'No locks for this resource.')
# Obtain the lock on the node
lres, pid, token = self._try_function(node_fn, (cr, lock_data), "lock %s" % objname, cr=cr)
@@ -992,10 +992,10 @@ class openerp_dav_handler(dav_interface):
if not lres:
cr.commit()
cr.close()
- raise DAV_Error(423, "Resource already locked")
-
+ raise DAV_Error(423, "Resource already locked.")
+
assert isinstance(lres, list), 'lres: %s' % repr(lres)
-
+
try:
data = mk_lock_response(self, uri, lres)
cr.commit()
diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py
index da463c9eb1b..f53353dd43c 100644
--- a/addons/document_webdav/document_webdav.py
+++ b/addons/document_webdav/document_webdav.py
@@ -43,7 +43,7 @@ class document_davdir(osv.osv):
elif dbro.type == 'ressource':
return nodes.node_res_dir
else:
- raise ValueError("dir node for %s type", dbro.type)
+ raise ValueError("Directory node for %s type.", dbro.type)
def _prepare_context(self, cr, uid, nctx, context=None):
nctx.node_file_class = nodes.node_file
@@ -67,18 +67,18 @@ document_davdir()
class dav_dir_property(osv.osv):
""" Arbitrary WebDAV properties, attached to document.directories.
-
+
Some DAV properties have to be settable at directories, depending
on the database directory structure.
-
+
Example would be the principal-URL.
-
+
There _can_ be properties without a directory, which means that they
globally apply to all the directories (aka. collections) of the
present database.
"""
_name = 'document.webdav.dir.property'
-
+
_columns = {
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
@@ -90,25 +90,25 @@ class dav_dir_property(osv.osv):
'value': fields.text('Value'),
'do_subst': fields.boolean('Substitute', required=True),
}
-
+
_defaults = {
'do_subst': False,
}
-
+
dav_dir_property()
class dav_file_property(osv.osv):
""" Arbitrary WebDAV properties, attached to ir.attachments.
-
+
A special case is the locks that can be applied on file nodes.
-
+
There _can_ be properties without a file (RFC?), which means that they
globally apply to all the attachments of the present database.
-
+
TODO access permissions, per property.
"""
_name = 'document.webdav.file.property'
-
+
_columns = {
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
@@ -120,11 +120,11 @@ class dav_file_property(osv.osv):
'value': fields.text('Value'),
'do_subst': fields.boolean('Substitute', required=True),
}
-
+
_defaults = {
'do_subst': False,
}
-
+
dav_file_property()
#eof
diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py
index a4dda231bd8..f1f2e58c835 100755
--- a/addons/document_webdav/test_davclient.py
+++ b/addons/document_webdav/test_davclient.py
@@ -69,9 +69,9 @@ class PersistentTransport(Transport):
host, extra_headers, x509 = Transport.get_host_info(self,host)
if extra_headers == None:
extra_headers = []
-
+
extra_headers.append( ( 'Connection', 'keep-alive' ))
-
+
return host, extra_headers, x509
def _parse_response(self, file, sock, response):
@@ -122,9 +122,9 @@ class PersistentTransport(Transport):
resp = h._conn.getresponse()
# TODO: except BadStatusLine, e:
-
+
errcode, errmsg, headers = resp.status, resp.reason, resp.msg
-
+
if errcode != 200:
raise ProtocolError(
@@ -145,7 +145,7 @@ class PersistentTransport(Transport):
class CompressedTransport(PersistentTransport):
def send_content(self, connection, request_body):
connection.putheader("Content-Type", "text/xml")
-
+
if len(request_body) > 512 or True:
buffer = StringIO.StringIO()
output = gzip.GzipFile(mode='wb', fileobj=buffer)
@@ -176,7 +176,7 @@ class SafePersistentTransport(PersistentTransport):
class AuthClient(object):
def getAuth(self, atype, realm):
raise NotImplementedError("Cannot authenticate for %s" % atype)
-
+
def resolveFailedRealm(self, realm):
""" Called when, using a known auth type, the realm is not in cache
"""
@@ -195,7 +195,7 @@ class BasicAuthClient(AuthClient):
_logger.debug("missing key: \"%s\"" % realm)
self.resolveFailedRealm(realm)
return 'Basic '+ self._realm_dict[realm]
-
+
def addLogin(self, realm, username, passwd):
""" Add some known username/password for a specific login.
This function should be called once, for each realm
@@ -210,7 +210,7 @@ class BasicAuthClient(AuthClient):
class addAuthTransport:
""" Intermediate class that authentication algorithm to http transport
"""
-
+
def setAuthClient(self, authobj):
""" Set the authentication client object.
This method must be called before any request is issued, that
@@ -218,7 +218,7 @@ class addAuthTransport:
"""
assert isinstance(authobj, AuthClient)
self._auth_client = authobj
-
+
def request(self, host, handler, request_body, verbose=0):
# issue XML-RPC request
@@ -226,7 +226,7 @@ class addAuthTransport:
h = self.make_connection(host)
if verbose:
h.set_debuglevel(1)
-
+
tries = 0
atype = None
realm = None
@@ -246,7 +246,7 @@ class addAuthTransport:
resp = h._conn.getresponse()
# except BadStatusLine, e:
tries += 1
-
+
if resp.status == 401:
if 'www-authenticate' in resp.msg:
(atype,realm) = resp.msg.getheader('www-authenticate').split(' ',1)
@@ -258,7 +258,7 @@ class addAuthTransport:
_logger.debug("Resp: %r %r", resp.version,resp.isclosed(), resp.will_close)
_logger.debug("Want to do auth %s for realm %s", atype, realm)
if atype != 'Basic':
- raise ProtocolError(host+handler, 403,
+ raise ProtocolError(host+handler, 403,
"Unknown authentication method: %s" % atype, resp.msg)
continue # with the outer while loop
else:
@@ -268,17 +268,17 @@ class addAuthTransport:
if resp.status != 200:
raise ProtocolError( host + handler,
resp.status, resp.reason, resp.msg )
-
+
self.verbose = verbose
-
+
try:
sock = h._conn.sock
except AttributeError:
sock = None
-
+
return self._parse_response(h.getfile(), sock, resp)
- raise ProtocolError(host+handler, 403, "No authentication",'')
+ raise ProtocolError(host+handler, 403, "No authentication.",'')
class PersistentAuthTransport(addAuthTransport,PersistentTransport):
pass
@@ -302,7 +302,7 @@ class HTTPSConnection(httplib.HTTPSConnection):
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
ca_certs=ca_certs,
cert_reqs=cert_reqs)
-
+
def getpeercert(self):
import ssl
@@ -316,14 +316,14 @@ class HTTPSConnection(httplib.HTTPSConnection):
if cert[0-lf] != '\n':
cert = cert[:0-lf]+'\n'+cert[0-lf:]
_logger.debug("len-footer: %s cert: %r", lf, cert[0-lf])
-
+
return cert
class DAVClient(object):
"""An instance of a WebDAV client, connected to the OpenERP server
"""
-
+
def __init__(self, user=None, passwd=None, dbg=0, use_ssl=False, useragent=False, timeout=None):
if use_ssl:
self.host = config.get_misc('httpsd', 'interface', False)
@@ -353,10 +353,10 @@ class DAVClient(object):
def get_creds(self, obj, cr, uid):
"""Read back the user credentials from cr, uid
-
+
@param obj is any orm object, in order to use its pool
@param uid is the numeric id, which we will try to reverse resolve
-
+
note: this is a hackish way to get the credentials. It is expected
to break if "base_crypt" is used.
"""
@@ -366,7 +366,7 @@ class DAVClient(object):
self.user = res[0]['login']
self.passwd = res[0]['password']
if self.passwd.startswith('$1$'):
- # md5 by base crypt. We cannot decode, wild guess
+ # md5 by base crypt. We cannot decode, wild guess
# that passwd = login
self.passwd = self.user
return True
@@ -402,7 +402,7 @@ class DAVClient(object):
r1 = conn.getresponse()
except httplib.BadStatusLine, bsl:
log.warning("Bad status line: %s", bsl.line)
- raise Exception('Bad status line')
+ raise Exception('Bad status line.')
if r1.status == 401: # and r1.headers:
if 'www-authenticate' in r1.msg:
(atype,realm) = r1.msg.getheader('www-authenticate').split(' ',1)
@@ -415,7 +415,7 @@ class DAVClient(object):
auths = base64.encodestring(self.user + ':' + self.passwd)
if auths[-1] == "\n":
auths = auths[:-1]
- hdrs['Authorization']= 'Basic '+ auths
+ hdrs['Authorization']= 'Basic '+ auths
#sleep(1)
conn.request(method, path, body, hdrs )
r1 = conn.getresponse()
@@ -437,7 +437,7 @@ class DAVClient(object):
doc = xml.dom.minidom.parseString(data1)
_logger.debug("XML Body:\n %s", doc.toprettyxml(indent="\t"))
except Exception:
- _logger.warning("could not print xml", exc_info=True)
+ _logger.warning("Cannot print XML.", exc_info=True)
pass
conn.close()
return r1.status, r1.msg, data1
@@ -475,10 +475,10 @@ class DAVClient(object):
assert s == 200, "Status: %r" % s
assert 'OPTIONS' in m.getheader('Allow')
_logger.debug('Options: %r', m.getheader('Allow'))
-
+
if expect:
self._assert_headers(expect, m)
-
+
def _parse_prop_response(self, data):
""" Parse a propfind/propname response
"""
@@ -488,7 +488,7 @@ class DAVClient(object):
if node.nodeType == node.TEXT_NODE:
rc.append(node.data)
return ''.join(rc)
-
+
def getElements(node, namespaces=None, strict=False):
for cnod in node.childNodes:
if cnod.nodeType != node.ELEMENT_NODE:
@@ -534,10 +534,10 @@ class DAVClient(object):
rstatus = int(sta)
else:
_logger.debug("What is <%s> inside a ?", pno.tagName)
-
+
else:
_logger.debug("Unknown node: %s", cno.tagName)
-
+
res.setdefault(href,[]).append((status, res_nss))
return res
@@ -558,7 +558,7 @@ class DAVClient(object):
propstr += '' %(nscount, p, nscount, ns)
nscount += 1
propstr += ''
-
+
body="""
%s""" % propstr
hdrs = { 'Content-Type': 'text/xml; charset=utf-8',
@@ -566,7 +566,7 @@ class DAVClient(object):
'Depth': depth,
}
- s, m, d = self._http_request(self.davpath + path, method='PROPFIND',
+ s, m, d = self._http_request(self.davpath + path, method='PROPFIND',
hdrs=hdrs, body=body)
assert s == 207, "Bad status: %s" % s
ctype = m.getheader('Content-Type').split(';',1)[0]
@@ -578,7 +578,7 @@ class DAVClient(object):
else:
assert len(res) >= 1
return res
-
+
def gd_propname(self, path, depth=0):
body="""
@@ -587,7 +587,7 @@ class DAVClient(object):
'Accept': 'text/xml',
'Depth': depth
}
- s, m, d = self._http_request(self.davpath + path, method='PROPFIND',
+ s, m, d = self._http_request(self.davpath + path, method='PROPFIND',
hdrs=hdrs, body=body)
assert s == 207, "Bad status: %s" % s
ctype = m.getheader('Content-Type').split(';',1)[0]
@@ -605,7 +605,7 @@ class DAVClient(object):
def gd_lsl(self, path):
""" Return a list of 'ls -l' kind of data for a folder
-
+
This is based on propfind.
"""
@@ -616,7 +616,7 @@ class DAVClient(object):
propnames = [ l[1] for l in lspairs]
propres = self.gd_propfind(path, props=propnames, depth=1)
-
+
res = []
for href, pr in propres.items():
lsline = {}
@@ -638,9 +638,9 @@ class DAVClient(object):
lsline[lsp[0]] = lsp[2]
else:
_logger.debug("Strange status: %s", st)
-
+
res.append(lsline)
-
+
return res
def gd_get(self, path, crange=None, mime=None, compare=None):
@@ -651,7 +651,7 @@ class DAVClient(object):
if isinstance(crange, tuple):
crange = [crange,]
if not isinstance(crange, list):
- raise TypeError("Range must be a tuple or list of tuples")
+ raise TypeError("Range must be a tuple or list of tuples.")
rs = []
for r in crange:
rs.append('%d-%d' % r)
@@ -683,13 +683,13 @@ class DAVClient(object):
return ctype, rrange, d
def gd_put(self, path, body=None, srcpath=None, mime=None, noclobber=False, ):
- """ HTTP PUT
+ """ HTTP PUT
@param noclobber will prevent overwritting a resource (If-None-Match)
@param mime will set the content-type
"""
hdrs = { }
if not (body or srcpath):
- raise ValueError("PUT must have something to send")
+ raise ValueError("PUT must have something to send.")
if (not body) and srcpath:
fd = open(srcpath, 'rb')
body = fd.read()
@@ -698,7 +698,7 @@ class DAVClient(object):
hdrs['Content-Type'] = mime
if noclobber:
hdrs['If-None-Match'] = '*'
- s, m, d = self._http_request(self.davpath + path, method='PUT',
+ s, m, d = self._http_request(self.davpath + path, method='PUT',
hdrs=hdrs, body=body)
assert s == (201), "Bad status: %s" % s
etag = m.getheader('ETag')
diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py
index baa394e94a1..903dd6a16ba 100644
--- a/addons/document_webdav/webdav.py
+++ b/addons/document_webdav/webdav.py
@@ -65,7 +65,7 @@ class Prop2xml(object):
def createText2Node(self, data):
if not isinstance(data, StringTypes):
- raise TypeError, "node contents must be a string"
+ raise TypeError, "Node contents must be a string."
t = Text2()
t.data = data
t.ownerDocument = self.doc
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
index 65ebb49ff5f..28909e61167 100644
--- a/addons/document_webdav/webdav_server.py
+++ b/addons/document_webdav/webdav_server.py
@@ -73,7 +73,7 @@ def OpenDAVConfig(**kw):
class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
verbose = False
-
+
protocol_version = 'HTTP/1.1'
_HTTP_OPTIONS= { 'DAV' : ['1', '2'],
'Allow' : [ 'GET', 'HEAD', 'COPY', 'MOVE', 'POST', 'PUT',
@@ -119,7 +119,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
if up.path.startswith(self.davpath):
self.headers['Destination'] = up.path[len(self.davpath):]
else:
- raise DAV_Forbidden("Not allowed to copy/move outside webdav path")
+ raise DAV_Forbidden("Not allowed to copy/move outside webdav path.")
# TODO: locks
DAVRequestHandler.copymove(self, CLASS)
@@ -304,7 +304,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
res = dc.unlock(uri, token)
except DAV_Error, (ec, dd):
return self.send_status(ec, dd)
-
+
if res == True:
self.send_body(None, '204', 'OK', 'Resource unlocked.')
else:
@@ -338,7 +338,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
if isinstance(ldif, list):
if len(ldif) !=1 or (not isinstance(ldif[0], TagList)) \
or len(ldif[0].list) != 1:
- raise DAV_Error(400, "Cannot accept multiple tokens")
+ raise DAV_Error(400, "Cannot accept multiple tokens.")
ldif = ldif[0].list[0]
if ldif[0] == '<' and ldif[-1] == '>':
ldif = ldif[1:-1]
@@ -352,7 +352,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
lock_data.update(self._lock_unlock_parse(body))
if lock_data['refresh'] and not lock_data.get('token', False):
- raise DAV_Error(400, 'Lock refresh must specify token')
+ raise DAV_Error(400, 'Lock refresh must specify token.')
lock_data['depth'] = depth
@@ -487,7 +487,7 @@ class dummy_dav_interface(object):
class DAVStaticHandler(http_server.StaticHTTPHandler):
""" A variant of the Static handler, which will serve dummy DAV requests
"""
-
+
verbose = False
protocol_version = 'HTTP/1.1'
_HTTP_OPTIONS= { 'DAV' : ['1', '2'],
@@ -503,13 +503,13 @@ class DAVStaticHandler(http_server.StaticHTTPHandler):
self.end_headers()
if hasattr(self, '_flush'):
self._flush()
-
+
if self.command != 'HEAD':
self.wfile.write(content)
def do_PROPFIND(self):
"""Answer to PROPFIND with generic data.
-
+
A rough copy of python-webdav's do_PROPFIND, but hacked to work
statically.
"""
@@ -575,7 +575,7 @@ try:
handler._config = conf
reg_http_service(directory, DAVHandler, DAVAuthProvider)
_logger.info("WebDAV service registered at path: %s/ "% directory)
-
+
if not (config.get_misc('webdav', 'no_root_hack', False)):
# Now, replace the static http handler with the dav-enabled one.
# If a static-http service has been specified for our server, then
@@ -592,7 +592,7 @@ try:
# an _ugly_ hack: we put that dir back in tools.config.misc, so that
# the StaticHttpHandler can find its dir_path.
config.misc.setdefault('static-http',{})['dir_path'] = dir_path
-
+
reg_http_service('/', DAVStaticHandler)
except Exception, e:
@@ -617,10 +617,10 @@ def init_well_known():
init_well_known()
class PrincipalsRedirect(RedirectHTTPHandler):
-
-
+
+
redirect_paths = {}
-
+
def _find_redirect(self):
for b, r in self.redirect_paths.items():
if self.path.startswith(b):
@@ -628,7 +628,7 @@ class PrincipalsRedirect(RedirectHTTPHandler):
return False
def init_principals_redirect():
- """ Some devices like the iPhone will look under /principals/users/xxx for
+ """ Some devices like the iPhone will look under /principals/users/xxx for
the user's properties. In OpenERP we _cannot_ have a stray /principals/...
working path, since we have a database path and the /webdav/ component. So,
the best solution is to redirect the url with 301. Luckily, it does work in
diff --git a/addons/edi/edi_service.py b/addons/edi/edi_service.py
index f48cc60950a..63fe38786e0 100644
--- a/addons/edi/edi_service.py
+++ b/addons/edi/edi_service.py
@@ -40,7 +40,7 @@ class edi(netsvc.ExportService):
res = getattr(edi_document, method_name)(cr, *method_args)
cr.commit()
except Exception:
- _logger.exception('Failed to execute EDI method %s with args %r', method_name, method_args)
+ _logger.exception('Failed to execute EDI method %s with args %r.', method_name, method_args)
raise
finally:
cr.close()
@@ -63,7 +63,7 @@ class edi(netsvc.ExportService):
# No security check for these methods
pass
else:
- raise KeyError("Method not found: %s" % method)
+ raise KeyError("Method not found: %s." % method)
fn = getattr(self, 'exp_'+method)
return fn(*params)
diff --git a/addons/edi/i18n/edi.pot b/addons/edi/i18n/edi.pot
index d5ddad1151b..5c1e6e00d29 100644
--- a/addons/edi/i18n/edi.pot
+++ b/addons/edi/i18n/edi.pot
@@ -118,7 +118,7 @@ msgstr ""
#. module: edi
#: code:addons/edi/models/edi.py:152
#, python-format
-msgid "Missing Application"
+msgid "Missing Application !"
msgstr ""
#. module: edi
diff --git a/addons/edi/models/edi.py b/addons/edi/models/edi.py
index dadfeb81209..6d11db1c52c 100644
--- a/addons/edi/models/edi.py
+++ b/addons/edi/models/edi.py
@@ -129,7 +129,7 @@ class edi_document(osv.osv):
_logger.debug("get_document(%s)", edi_token)
edi_ids = self.search(cr, uid, [('name','=', edi_token)], context=context)
if not edi_ids:
- raise ValueError('Invalid EDI token: %s' % edi_token)
+ raise ValueError('Invalid EDI token: %s.' % edi_token)
edi = self.browse(cr, uid, edi_ids[0], context=context)
return edi.document
@@ -147,16 +147,16 @@ class edi_document(osv.osv):
res = []
for edi_document in edi_documents:
module = edi_document.get('__import_module') or edi_document.get('__module')
- assert module, 'a `__module` or `__import_module` attribute is required in each EDI document'
+ assert module, 'a `__module` or `__import_module` attribute is required in each EDI document.'
if module != 'base' and not ir_module.search(cr, uid, [('name','=',module),('state','=','installed')]):
- raise osv.except_osv(_('Missing Application'),
+ raise osv.except_osv(_('Missing application.'),
_("The document you are trying to import requires the OpenERP `%s` application. "
"You can install it by connecting as the administrator and opening the configuration assistant.")%(module,))
model = edi_document.get('__import_model') or edi_document.get('__model')
- assert model, 'a `__model` or `__import_model` attribute is required in each EDI document'
+ assert model, 'a `__model` or `__import_model` attribute is required in each EDI document.'
model_obj = self.pool.get(model)
assert model_obj, 'model `%s` cannot be found, despite module `%s` being available - '\
- 'this EDI document seems invalid or unsupported' % (model,module)
+ 'this EDI document seems invalid or unsupported.' % (model,module)
record_id = model_obj.edi_import(cr, uid, edi_document, context=context)
record_action = model_obj._edi_record_display_action(cr, uid, record_id, context=context)
res.append((model, record_id, record_action))
@@ -202,7 +202,7 @@ class edi_document(osv.osv):
may be retrieved, without authentication.
"""
if edi_url:
- assert not edi_document, 'edi_document must not be provided if edi_url is given'
+ assert not edi_document, 'edi_document must not be provided if edi_url is given.'
edi_document = urllib2.urlopen(edi_url).read()
assert edi_document, 'EDI Document is empty!'
edi_documents = self.deserialize(edi_document)
@@ -219,7 +219,7 @@ class EDIMixin(object):
model_name = edi_document.get('__imported_model') or edi_document.get('__model') or self._name
for attribute in attributes:
assert edi_document.get(attribute),\
- 'Attribute `%s` is required in %s EDI documents' % (attribute, model_name)
+ 'Attribute `%s` is required in %s EDI documents.' % (attribute, model_name)
# private method, not RPC-exposed as it creates ir.model.data entries as
# SUPERUSER based on its parameters
@@ -261,7 +261,7 @@ class EDIMixin(object):
ext_id = existing_id or safe_unique_id(db_uuid, record._name, record.id)
# ID is unique cross-db thanks to db_uuid (already included in existing_module)
module = existing_module or "%s:%s" % (record._original_module, db_uuid)
- _logger.debug("%s: Generating new external ID `%s.%s` for %r", self._name,
+ _logger.debug("%s: Generating new external ID `%s.%s` for %r.", self._name,
module, ext_id, record)
ir_model_data.create(cr, openerp.SUPERUSER_ID,
{'name': ext_id,
@@ -276,7 +276,7 @@ class EDIMixin(object):
# this could happen for data records defined in a module that depends
# on the module that owns the model, e.g. purchase defines
# product.pricelist records.
- _logger.debug('Mismatching module: expected %s, got %s, for %s',
+ _logger.debug('Mismatching module: expected %s, got %s, for %s.',
module, record._original_module, record)
# ID is unique cross-db thanks to db_uuid
module = "%s:%s" % (module, db_uuid)
@@ -464,12 +464,12 @@ class EDIMixin(object):
local_cr = db.cursor()
web_root_url = self.pool.get('ir.config_parameter').get_param(local_cr, uid, 'web.base.url')
if not web_root_url:
- _logger.warning('Ignoring EDI mail notification, web.base.url not defined in parameters')
+ _logger.warning('Ignoring EDI mail notification, web.base.url is not defined in parameters.')
return
mail_tmpl = self._edi_get_object_by_external_id(local_cr, uid, template_ext_id, 'email.template', context=context)
if not mail_tmpl:
# skip EDI export if the template was not found
- _logger.warning('Ignoring EDI mail notification, template %s cannot be located', template_ext_id)
+ _logger.warning('Ignoring EDI mail notification, template %s cannot be located.', template_ext_id)
return
for edi_record in self.browse(local_cr, uid, ids, context=context):
edi_token = self.pool.get('edi.document').export_edi(local_cr, uid, [edi_record], context = context)[0]
@@ -515,7 +515,7 @@ class EDIMixin(object):
file_name = record.name_get()[0][1]
file_name = re.sub(r'[^a-zA-Z0-9_-]', '_', file_name)
file_name += ".pdf"
- ir_attachment = self.pool.get('ir.attachment').create(cr, uid,
+ ir_attachment = self.pool.get('ir.attachment').create(cr, uid,
{'name': file_name,
'datas': result,
'datas_fname': file_name,
@@ -533,10 +533,10 @@ class EDIMixin(object):
file_data = base64.b64decode(attachment.get('content'))
except TypeError:
pass
- assert file_data, 'Incorrect/Missing attachment file content'
- assert attachment.get('name'), 'Incorrect/Missing attachment name'
- assert attachment.get('file_name'), 'Incorrect/Missing attachment file name'
- assert attachment.get('file_name'), 'Incorrect/Missing attachment file name'
+ assert file_data, 'Incorrect/Missing attachment file content.'
+ assert attachment.get('name'), 'Incorrect/Missing attachment name.'
+ assert attachment.get('file_name'), 'Incorrect/Missing attachment file name.'
+ assert attachment.get('file_name'), 'Incorrect/Missing attachment file name.'
ir_attachment.create(cr, uid, {'name': attachment['name'],
'datas_fname': attachment['file_name'],
'res_model': self._name,
@@ -593,22 +593,22 @@ class EDIMixin(object):
target = self._edi_get_object_by_external_id(cr, uid, external_id, model, context=context)
need_new_ext_id = False
if not target:
- _logger.debug("%s: Importing EDI relationship [%r,%r] - ID not found, trying name_get",
+ _logger.debug("%s: Importing EDI relationship [%r,%r] - ID not found, trying name_get.",
self._name, external_id, value)
target = self._edi_get_object_by_name(cr, uid, value, model, context=context)
need_new_ext_id = True
if not target:
- _logger.debug("%s: Importing EDI relationship [%r,%r] - name not found, creating it!",
+ _logger.debug("%s: Importing EDI relationship [%r,%r] - name not found, creating it.",
self._name, external_id, value)
# also need_new_ext_id here, but already been set above
model = self.pool.get(model)
- # should use name_create() but e.g. res.partner won't allow it at the moment
+ # should use name_create() but e.g. res.partner won't allow it at the moment
res_id = model.create(cr, uid, {model._rec_name: value}, context=context)
target = model.browse(cr, uid, res_id, context=context)
if need_new_ext_id:
ext_id_members = split_external_id(external_id)
# module name is never used bare when creating ir.model.data entries, in order
- # to avoid being taken as part of the module's data, and cleanup up at next update
+ # to avoid being taken as part of the module's data, and cleanup up at next update
module = "%s:%s" % (ext_id_members['module'], ext_id_members['db_uuid'])
# create a new ir.model.data entry for this value
self._edi_external_id(cr, uid, target, existing_id=ext_id_members['id'], existing_module=module, context=context)
@@ -622,7 +622,7 @@ class EDIMixin(object):
"""
assert self._name == edi_document.get('__import_model') or \
('__import_model' not in edi_document and self._name == edi_document.get('__model')), \
- "EDI Document Model and current model do not match: '%s' (EDI) vs '%s' (current)" % \
+ "EDI Document Model and current model do not match: '%s' (EDI) vs '%s' (current)." % \
(edi_document['__model'], self._name)
# First check the record is now already known in the database, in which case it is ignored
@@ -640,12 +640,12 @@ class EDIMixin(object):
continue
field_info = self._all_columns.get(field_name)
if not field_info:
- _logger.warning('Ignoring unknown field `%s` when importing `%s` EDI document', field_name, self._name)
+ _logger.warning('Ignoring unknown field `%s` when importing `%s` EDI document.', field_name, self._name)
continue
field = field_info.column
# skip function/related fields
if isinstance(field, fields.function):
- _logger.warning("Unexpected function field value found in '%s' EDI document: '%s'" % (self._name, field_name))
+ _logger.warning("Unexpected function field value is found in '%s' EDI document: '%s'." % (self._name, field_name))
continue
relation_model = field._obj
if field._type == 'many2one':
diff --git a/addons/event/event.py b/addons/event/event.py
index c3942642b3d..4279b8fcd7e 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -103,7 +103,7 @@ class event_event(osv.osv):
for self.event in self.browse(cr, uid, ids, context=context):
total_confirmed = self.event.register_current
if total_confirmed < self.event.register_min or total_confirmed > self.event.register_max and self.event.register_max!=0:
- raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. You should maybe reconsider those limits before going further") % (self.event.name))
+ raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. Please reconsider those limits before going further.") % (self.event.name))
def check_registration_limits_before(self, cr, uid, ids, no_of_registration, context=None):
for event in self.browse(cr, uid, ids, context=context):
@@ -366,7 +366,7 @@ class event_registration(osv.osv):
self.write(cr, uid, ids, values)
self.message_append(cr, uid, ids, _('State set to Done'), body_text=_('Done'))
else:
- raise osv.except_osv(_('Error!'),_("You must wait the event starting day to do this action.") )
+ raise osv.except_osv(_('Error!'),_("You must wait for the starting day of the event to do this action.") )
return True
def button_reg_cancel(self, cr, uid, ids, context=None, *args):
diff --git a/addons/event_moodle/event_moodle.py b/addons/event_moodle/event_moodle.py
index 7414abe4613..19e763e91b0 100644
--- a/addons/event_moodle/event_moodle.py
+++ b/addons/event_moodle/event_moodle.py
@@ -54,7 +54,7 @@ class event_moodle(osv.osv):
"""
moodle_config_wiz_ids = self.search(cr, uid, [], context=context)
if not moodle_config_wiz_ids:
- raise osv.except_osv(('Error!'),("Configure your moodle connexion before"))
+ raise osv.except_osv(('Error!'),("First configure your moodle connection."))
return moodle_config_wiz_ids[0]
def make_url(self, cr, uid, ids, context=None):
@@ -132,7 +132,7 @@ class event_moodle(osv.osv):
"""
if email:
if (email.count('@') != 1 and email.count('.') < 1):
- raise osv.except_osv(_('Error!'),_("Your email '%s' is wrong") % (email))
+ raise osv.except_osv(_('Error!'),_("Your email '%s' is wrong.") % (email))
def make_username(self, username, response_courses):
"""
diff --git a/addons/event_sale/test/confirm.yml b/addons/event_sale/test/confirm.yml
index 53bc7b8b0a1..c46221acc68 100644
--- a/addons/event_sale/test/confirm.yml
+++ b/addons/event_sale/test/confirm.yml
@@ -50,5 +50,5 @@
order = self.pool.get('sale.order').browse(cr, uid,order_id)
registration_ids = self.search(cr,uid,[('origin','=',order.name)])
if registration_ids == []:
- raise osv.except_osv(_('Error!'),_("The registration is not created"))
+ raise osv.except_osv(_('Error!'),_("The registration is not created."))
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index f0e6a5179b4..62b2775a056 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -151,8 +151,8 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
connection = server.connect()
server.write({'state':'done'})
except Exception, e:
- _logger.exception("Failed to connect to %s server %s", server.type, server.name)
- raise osv.except_osv(_("Connection test failed!"), _("Here is what we got instead:\n %s") % tools.ustr(e))
+ _logger.exception("Failed to connect to %s server %s.", server.type, server.name)
+ raise osv.except_osv(_("Connection test failed!"), _("Here is what we got instead:\n %s.") % tools.ustr(e))
finally:
try:
if connection:
@@ -204,7 +204,7 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
count += 1
_logger.info("fetched/processed %s email(s) on %s server %s", count, server.type, server.name)
except Exception, e:
- _logger.exception("Failed to fetch mail from %s server %s", server.type, server.name)
+ _logger.exception("Failed to fetch mail from %s server %s.", server.type, server.name)
finally:
if imap_server:
imap_server.close()
@@ -231,7 +231,7 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
cr.commit()
_logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name)
except Exception, e:
- _logger.exception("Failed to fetch mail from %s server %s", server.type, server.name)
+ _logger.exception("Failed to fetch mail from %s server %s.", server.type, server.name)
finally:
if pop_server:
pop_server.quit()
diff --git a/addons/fetchmail/i18n/fetchmail.pot b/addons/fetchmail/i18n/fetchmail.pot
index 1ee0cb0a8a5..a11c61d1ffc 100644
--- a/addons/fetchmail/i18n/fetchmail.pot
+++ b/addons/fetchmail/i18n/fetchmail.pot
@@ -140,7 +140,7 @@ msgstr ""
#: code:addons/fetchmail/fetchmail.py:155
#, python-format
msgid "Here is what we got instead:\n"
-" %s"
+" %s."
msgstr ""
#. module: fetchmail
diff --git a/addons/google_base_account/i18n/google_base_account.pot b/addons/google_base_account/i18n/google_base_account.pot
index 5a56073a7e7..a4ac4a81c45 100644
--- a/addons/google_base_account/i18n/google_base_account.pot
+++ b/addons/google_base_account/i18n/google_base_account.pot
@@ -106,7 +106,7 @@ msgstr ""
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
-msgid "Authentication fail check the user and password !"
+msgid "Authentication failed. Check the user and password !"
msgstr ""
#. module: google_base_account
diff --git a/addons/google_base_account/wizard/google_login.py b/addons/google_base_account/wizard/google_login.py
index b6cb4f185b9..c502f101f07 100644
--- a/addons/google_base_account/wizard/google_login.py
+++ b/addons/google_base_account/wizard/google_login.py
@@ -74,7 +74,7 @@ class google_login(osv.osv_memory):
}
self.pool.get('res.users').write(cr, uid, uid, res, context=context)
else:
- raise osv.except_osv(_('Error'), _("Authentication fail check the user and password !"))
+ raise osv.except_osv(_('Error!'), _("Authentication failed. Check the user and password."))
return self._get_next_action(cr, uid, context=context)
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index 659c86ad0d1..270c105daab 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -27,7 +27,7 @@ try:
from gdata.docs.service import DOCUMENT_LABEL
import gdata.auth
except ImportError:
- raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list'))
+ raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list.'))
class google_docs_ir_attachment(osv.osv):
_inherit = 'ir.attachment'
@@ -46,7 +46,7 @@ class google_docs_ir_attachment(osv.osv):
#login gmail account
client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context)
if not client:
- raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in users/synchronization"))
+ raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in Users/Users/Synchronization tab."))
return client
def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None):
@@ -88,7 +88,7 @@ class google_docs_ir_attachment(osv.osv):
#copy the document you choose in the configuration
copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)
except:
- raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL"))
+ raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
# create an ir.attachment
self.create(cr, uid, {
'res_model': res_model,
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index db7b0eb18d8..47432e1f527 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -64,7 +64,7 @@ class hr_employee_category(osv.osv):
return True
_constraints = [
- (_check_recursion, 'Error ! You cannot create recursive Categories.', ['parent_id'])
+ (_check_recursion, 'Error! You cannot create recursive Categories.', ['parent_id'])
]
hr_employee_category()
@@ -277,7 +277,7 @@ class hr_employee(osv.osv):
return True
_constraints = [
- (_check_recursion, 'Error ! You cannot create recursive Hierarchy of Employees.', ['parent_id']),
+ (_check_recursion, 'Error! You cannot create recursive hierarchy of Employee(s).', ['parent_id']),
]
hr_employee()
@@ -310,7 +310,7 @@ class res_users(osv.osv):
'user_id': user_id}, context=context)
except:
# Tolerate a missing shortcut. See product/product.py for similar code.
- _logger.debug('Skipped meetings shortcut for user "%s"', data.get('name','=%s AND action IN %s ORDER BY name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out'])))
attendance_ids = [x[0] for x in cr.fetchall()]
if not attendance_ids:
- raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
+ raise osv.except_osv(_('No Data Available !'), _('No records are found for your selection!'))
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context)
for rec in attendance_records:
diff --git a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py
index 55edb1406e8..0ad4323ad78 100644
--- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py
+++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py
@@ -158,25 +158,25 @@ class hr_sign_in_out(osv.osv_memory):
emp_id = data['emp_id']
if 'last_time' in data:
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
- raise osv.except_osv(_('UserError'), _('The sign-out date must be in the past'))
+ raise osv.except_osv(_('User Error!'), _('The sign-out date must be in the past.'))
self.pool.get('hr.attendance').create(cr, uid, {'name': data['last_time'], 'action': 'sign_out',
'employee_id': emp_id}, context=context)
try:
self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in')
except:
- raise osv.except_osv(_('UserError'), _('A sign-in must be right after a sign-out !'))
+ raise osv.except_osv(_('User Error!'), _('A sign-in must be right after a sign-out!'))
return {'type': 'ir.actions.act_window_close'} # To do: Return Success message
def sign_out(self, cr, uid, data, context=None):
emp_id = data['emp_id']
if 'last_time' in data:
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
- raise osv.except_osv(_('UserError'), _('The Sign-in date must be in the past'))
+ raise osv.except_osv(_('User Error!'), _('The sign-in date must be in the past.'))
self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id}, context=context)
try:
self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out')
except:
- raise osv.except_osv(_('UserError'), _('A sign-out must be right after a sign-in !'))
+ raise osv.except_osv(_('User Error!'), _('A sign-out must be right after a sign-in.'))
return {'type': 'ir.actions.act_window_close'} # To do: Return Success message
hr_sign_in_out()
diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py
index 1267f13ac04..90f42d8487a 100644
--- a/addons/hr_contract/hr_contract.py
+++ b/addons/hr_contract/hr_contract.py
@@ -97,7 +97,7 @@ class hr_contract(osv.osv):
return True
_constraints = [
- (_check_dates, 'Error! contract start-date must be lower then contract end-date.', ['date_start', 'date_end'])
+ (_check_dates, 'Error! Contract start-date must be less than contract end-date.', ['date_start', 'date_end'])
]
hr_contract()
diff --git a/addons/hr_contract/i18n/hr_contract.pot b/addons/hr_contract/i18n/hr_contract.pot
index 806ea5aa154..f444a602208 100644
--- a/addons/hr_contract/i18n/hr_contract.pot
+++ b/addons/hr_contract/i18n/hr_contract.pot
@@ -234,7 +234,7 @@ msgstr ""
#. module: hr_contract
#: constraint:hr.contract:0
-msgid "Error! contract start-date must be lower then contract end-date."
+msgid "Error! Contract start-date must be less than contract end-date."
msgstr ""
#. module: hr_contract
diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py
index 5180050ddb9..def21f2b169 100644
--- a/addons/hr_evaluation/hr_evaluation.py
+++ b/addons/hr_evaluation/hr_evaluation.py
@@ -240,7 +240,7 @@ class hr_evaluation(osv.osv):
self.write(cr, uid, ids, {'state':'progress'}, context=context)
for id in self.browse(cr, uid, ids, context=context):
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', 'in', ['done','cancel'])], context=context)):
- raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state"))
+ raise osv.except_osv(_('Warning!'),_("You cannot change state, because some appraisal(s) are in waiting answer or draft state."))
return True
def button_done(self,cr, uid, ids, context=None):
@@ -311,7 +311,7 @@ class hr_evaluation_interview(osv.osv):
flag = False
wating_id = 0
if not id.evaluation_id.id:
- raise osv.except_osv(_('Warning !'),_("You cannot start evaluation without Appraisal."))
+ raise osv.except_osv(_('Warning!'),_("You cannot start evaluation without Appraisal."))
records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id], context=context)[0].survey_request_ids
for child in records:
if child.state == "draft":
diff --git a/addons/hr_evaluation/i18n/hr_evaluation.pot b/addons/hr_evaluation/i18n/hr_evaluation.pot
index 83d186f48c3..0b52d0ced50 100644
--- a/addons/hr_evaluation/i18n/hr_evaluation.pot
+++ b/addons/hr_evaluation/i18n/hr_evaluation.pot
@@ -812,7 +812,7 @@ msgstr ""
#: code:addons/hr_evaluation/hr_evaluation.py:244
#, python-format
msgid ""
-"You cannot change state, because some appraisal in waiting answer or draft "
+"You cannot change state, because some appraisal(s) are in waiting answer or draft state."
"state"
msgstr ""
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index b1192701dfb..c690b91bb54 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -171,7 +171,7 @@ class hr_expense_expense(osv.osv):
else:
acc = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category', context={'force_company': company_id})
if not acc:
- raise osv.except_osv(_('Error !'), _('Please configure Default Expense account for Product purchase, `property_account_expense_categ`'))
+ raise osv.except_osv(_('Error!'), _('Please configure Default Expense account for Product purchase: `property_account_expense_categ`.'))
lines.append((0, False, {
'name': l.name,
'account_id': acc.id,
@@ -183,7 +183,7 @@ class hr_expense_expense(osv.osv):
'account_analytic_id': l.analytic_account.id,
}))
if not exp.employee_id.address_home_id:
- raise osv.except_osv(_('Error !'), _('The employee must have a Home address.'))
+ raise osv.except_osv(_('Error!'), _('The employee must have a home address.'))
acc = exp.employee_id.address_home_id.property_account_payable.id
payment_term_id = exp.employee_id.address_home_id.property_payment_term.id
inv = {
diff --git a/addons/hr_expense/i18n/hr_expense.pot b/addons/hr_expense/i18n/hr_expense.pot
index b98af394fc0..1e79501e478 100644
--- a/addons/hr_expense/i18n/hr_expense.pot
+++ b/addons/hr_expense/i18n/hr_expense.pot
@@ -266,8 +266,8 @@ msgstr ""
#: code:addons/hr_expense/hr_expense.py:173
#, python-format
msgid ""
-"Please configure Default Expense account for Product purchase, "
-"`property_account_expense_categ`"
+"Please configure Default Expense account for Product purchase: "
+"`property_account_expense_categ`."
msgstr ""
#. module: hr_expense
@@ -542,7 +542,7 @@ msgstr ""
#. module: hr_expense
#: code:addons/hr_expense/hr_expense.py:185
#, python-format
-msgid "The employee must have a Home address."
+msgid "The employee must have a home address."
msgstr ""
#. module: hr_expense
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 1cc0e147adf..7eedfa54ce5 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -147,7 +147,7 @@ class hr_holidays(osv.osv):
'holiday_type': 'employee'
}
_sql_constraints = [
- ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category"),
+ ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category."),
('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be before the end date !"),
('date_check', "CHECK ( number_of_days_temp >= 0 )", "The number of days must be greater than 0 !"),
]
@@ -202,7 +202,7 @@ class hr_holidays(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state<>'draft':
- raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is not in draft status !'))
+ raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is not in draft state !'))
return super(hr_holidays, self).unlink(cr, uid, ids, context)
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
@@ -379,7 +379,7 @@ class hr_holidays(osv.osv):
def create_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, ids, _('System notification'),
- _("The %s request has been created and is waiting confirmation")
+ _("The %s request has been created and is waiting confirmation.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
return True
@@ -443,7 +443,7 @@ class hr_employee(osv.osv):
# Find for holidays status
status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
if len(status_ids) != 1 :
- raise osv.except_osv(_('Warning !'),_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
+ raise osv.except_osv(_('Warning!'),_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
status_id = status_ids and status_ids[0] or False
if not status_id:
return False
diff --git a/addons/hr_holidays/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot
index 3763f5ac568..661a9f9cc60 100644
--- a/addons/hr_holidays/i18n/hr_holidays.pot
+++ b/addons/hr_holidays/i18n/hr_holidays.pot
@@ -280,7 +280,7 @@ msgstr ""
#. module: hr_holidays
#: code:addons/hr_holidays/wizard/hr_holidays_summary_department.py:44
#, python-format
-msgid "You have to select at least 1 Department. And try again"
+msgid "You have to select at least one Department. And try again."
msgstr ""
#. module: hr_holidays
@@ -395,7 +395,7 @@ msgstr ""
#. module: hr_holidays
#: sql_constraint:hr.holidays:0
-msgid "You have to select an employee or a category"
+msgid "You have to select an employee or a category."
msgstr ""
#. module: hr_holidays
@@ -575,7 +575,7 @@ msgstr ""
#. module: hr_holidays
#: code:addons/hr_holidays/wizard/hr_holidays_summary_department.py:44
#, python-format
-msgid "Error"
+msgid "Error !"
msgstr ""
#. module: hr_holidays
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department.py b/addons/hr_holidays/wizard/hr_holidays_summary_department.py
index 53f981424d2..efd64c88500 100644
--- a/addons/hr_holidays/wizard/hr_holidays_summary_department.py
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_department.py
@@ -41,7 +41,7 @@ class hr_holidays_summary_dept(osv.osv_memory):
def print_report(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0]
if not data['depts']:
- raise osv.except_osv(_('Error'), _('You have to select at least 1 Department. And try again'))
+ raise osv.except_osv(_('Error!'), _('You have to select at least one Department. And try again.'))
datas = {
'ids': [],
'model': 'ir.ui.menu',
diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py
index a8bafe43685..c82c6db446b 100644
--- a/addons/hr_payroll/hr_payroll.py
+++ b/addons/hr_payroll/hr_payroll.py
@@ -859,18 +859,18 @@ result = rules.NET > categories.NET * 0.10''',
try:
return rule.amount_fix, eval(rule.quantity, localdict), 100.0
except:
- raise osv.except_osv(_('Error'), _('Wrong quantity defined for salary rule %s (%s)')% (rule.name, rule.code))
+ raise osv.except_osv(_('Error!'), _('Wrong quantity defined for salary rule %s (%s).')% (rule.name, rule.code))
elif rule.amount_select == 'percentage':
try:
return eval(rule.amount_percentage_base, localdict), eval(rule.quantity, localdict), rule.amount_percentage
except:
- raise osv.except_osv(_('Error'), _('Wrong percentage base or quantity defined for salary rule %s (%s)')% (rule.name, rule.code))
+ raise osv.except_osv(_('Error!'), _('Wrong percentage base or quantity defined for salary rule %s (%s).')% (rule.name, rule.code))
else:
try:
eval(rule.amount_python_compute, localdict, mode='exec', nocopy=True)
return localdict['result'], 'result_qty' in localdict and localdict['result_qty'] or 1.0, 'result_rate' in localdict and localdict['result_rate'] or 100.0
except:
- raise osv.except_osv(_('Error'), _('Wrong python code defined for salary rule %s (%s) ')% (rule.name, rule.code))
+ raise osv.except_osv(_('Error!'), _('Wrong python code defined for salary rule %s (%s).')% (rule.name, rule.code))
def satisfy_condition(self, cr, uid, rule_id, localdict, context=None):
"""
@@ -887,13 +887,13 @@ result = rules.NET > categories.NET * 0.10''',
result = eval(rule.condition_range, localdict)
return rule.condition_range_min <= result and result <= rule.condition_range_max or False
except:
- raise osv.except_osv(_('Error'), _('Wrong range condition defined for salary rule %s (%s)')% (rule.name, rule.code))
+ raise osv.except_osv(_('Error!'), _('Wrong range condition defined for salary rule %s (%s).')% (rule.name, rule.code))
else: #python code
try:
eval(rule.condition_python, localdict, mode='exec', nocopy=True)
return 'result' in localdict and localdict['result'] or False
except:
- raise osv.except_osv(_('Error'), _('Wrong python condition defined for salary rule %s (%s)')% (rule.name, rule.code))
+ raise osv.except_osv(_('Error!'), _('Wrong python condition defined for salary rule %s (%s).')% (rule.name, rule.code))
hr_salary_rule()
diff --git a/addons/hr_payroll/i18n/hr_payroll.pot b/addons/hr_payroll/i18n/hr_payroll.pot
index 4f66b0ba015..3f70f4b68cb 100644
--- a/addons/hr_payroll/i18n/hr_payroll.pot
+++ b/addons/hr_payroll/i18n/hr_payroll.pot
@@ -551,7 +551,7 @@ msgstr ""
#. module: hr_payroll
#: code:addons/hr_payroll/hr_payroll.py:872
#, python-format
-msgid "Wrong python code defined for salary rule %s (%s) "
+msgid "Wrong python code defined for salary rule %s (%s)."
msgstr ""
#. module: hr_payroll
@@ -711,13 +711,13 @@ msgstr ""
#. module: hr_payroll
#: code:addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py:52
#, python-format
-msgid "You must select employee(s) to generate payslip(s)"
+msgid "You must select employee(s) to generate payslip(s)."
msgstr ""
#. module: hr_payroll
#: code:addons/hr_payroll/hr_payroll.py:861
#, python-format
-msgid "Wrong quantity defined for salary rule %s (%s)"
+msgid "Wrong quantity defined for salary rule %s (%s)."
msgstr ""
#. module: hr_payroll
@@ -755,7 +755,7 @@ msgstr ""
#: code:addons/hr_payroll/hr_payroll.py:889
#: code:addons/hr_payroll/hr_payroll.py:895
#, python-format
-msgid "Error"
+msgid "Error !"
msgstr ""
#. module: hr_payroll
@@ -784,7 +784,7 @@ msgstr ""
#. module: hr_payroll
#: code:addons/hr_payroll/hr_payroll.py:895
#, python-format
-msgid "Wrong python condition defined for salary rule %s (%s)"
+msgid "Wrong python condition defined for salary rule %s (%s)."
msgstr ""
#. module: hr_payroll
@@ -928,7 +928,7 @@ msgstr ""
#. module: hr_payroll
#: code:addons/hr_payroll/hr_payroll.py:889
#, python-format
-msgid "Wrong range condition defined for salary rule %s (%s)"
+msgid "Wrong range condition defined for salary rule %s (%s)."
msgstr ""
#. module: hr_payroll
@@ -1001,7 +1001,7 @@ msgstr ""
#. module: hr_payroll
#: code:addons/hr_payroll/hr_payroll.py:866
#, python-format
-msgid "Wrong percentage base or quantity defined for salary rule %s (%s)"
+msgid "Wrong percentage base or quantity defined for salary rule %s (%s)."
msgstr ""
#. module: hr_payroll
diff --git a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
index 5d806d3809b..1c9be1f9354 100644
--- a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
+++ b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
@@ -49,7 +49,7 @@ class hr_payslip_employees(osv.osv_memory):
to_date = run_data.get('date_end', False)
credit_note = run_data.get('credit_note', False)
if not data['employee_ids']:
- raise osv.except_osv(_("Warning !"), _("You must select employee(s) to generate payslip(s)"))
+ raise osv.except_osv(_("Warning !"), _("You must select employee(s) to generate payslip(s)."))
for emp in emp_pool.browse(cr, uid, data['employee_ids'], context=context):
slip_data = slip_pool.onchange_employee_id(cr, uid, [], from_date, to_date, emp.id, contract_id=False, context=context)
res = {
diff --git a/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py b/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
index ef44a4e253d..418a42bef93 100644
--- a/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
+++ b/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
@@ -35,7 +35,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
context = {}
for case in case_obj.browse(cr, uid, context['active_ids'], context=context):
if case.partner_id:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_('A contact is already defined on this job request.'))
pass
@@ -53,7 +53,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
for case in case_obj.browse(cr, uid, context['active_ids'], context=context):
partner_id = partner_obj.search(cr, uid, [('name', '=', case.partner_name or case.name)], context=context)
if partner_id:
- raise osv.except_osv(_('Error !'),_('A contact is already existing with the same name.'))
+ raise osv.except_osv(_('Error!'),_('A contact is already existing with the same name.'))
partner_id = partner_obj.create(cr, uid, {
'name': case.partner_name or case.name,
'user_id': case.user_id.id,
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py
index 53119853c31..e4db075a554 100644
--- a/addons/hr_timesheet/hr_timesheet.py
+++ b/addons/hr_timesheet/hr_timesheet.py
@@ -172,9 +172,9 @@ class hr_analytic_timesheet(osv.osv):
if emp_id:
ename = emp_obj.browse(cr, uid, emp_id[0], context=context).name
if not vals.get('journal_id',False):
- raise osv.except_osv(_('Warning !'), _('Analytic journal is not defined for employee %s \nDefine an employee for the selected user and assign an analytic journal!')%(ename,))
+ raise osv.except_osv(_('Warning!'), _('No \'Analytic Journal\' is defined for employee %s \nDefine an employee for the selected user and assign an \'Analytic Journal\'!')%(ename,))
if not vals.get('account_id',False):
- raise osv.except_osv(_('Warning !'), _('No analytic account defined on the project.\nPlease set one or we can not automatically fill the timesheet.'))
+ raise osv.except_osv(_('Warning!'), _('No analytic account is defined on the project.\nPlease set one or we cannot automatically fill the timesheet.'))
return super(hr_analytic_timesheet, self).create(cr, uid, vals, context=context)
def on_change_user_id(self, cr, uid, ids, user_id):
diff --git a/addons/hr_timesheet/i18n/hr_timesheet.pot b/addons/hr_timesheet/i18n/hr_timesheet.pot
index 21027a659b1..bbd23784493 100644
--- a/addons/hr_timesheet/i18n/hr_timesheet.pot
+++ b/addons/hr_timesheet/i18n/hr_timesheet.pot
@@ -30,7 +30,7 @@ msgstr ""
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132
#, python-format
-msgid "No employee defined for your user !"
+msgid "Please define employee for your user!"
msgstr ""
#. module: hr_timesheet
@@ -152,13 +152,13 @@ msgstr ""
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132
#, python-format
-msgid "UserError"
+msgid "UserError !"
msgstr ""
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77
#, python-format
-msgid "No cost unit defined for this employee !"
+msgid "Please define cost unit for this employee!"
msgstr ""
#. module: hr_timesheet
@@ -171,7 +171,7 @@ msgstr ""
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_print_employee.py:42
#, python-format
-msgid "Warning"
+msgid "Warning!"
msgstr ""
#. module: hr_timesheet
@@ -322,8 +322,8 @@ msgstr ""
#. module: hr_timesheet
#: code:addons/hr_timesheet/hr_timesheet.py:175
#, python-format
-msgid "Analytic journal is not defined for employee %s \n"
-"Define an employee for the selected user and assign an analytic journal!"
+msgid "No 'Analytic Journal' is defined for employee %s \n"
+"Define an employee for the selected user and assign an 'Analytic Journal'!"
msgstr ""
#. module: hr_timesheet
@@ -576,8 +576,8 @@ msgstr ""
#. module: hr_timesheet
#: code:addons/hr_timesheet/hr_timesheet.py:177
#, python-format
-msgid "No analytic account defined on the project.\n"
-"Please set one or we can not automatically fill the timesheet."
+msgid "No analytic account is defined on the project.\n"
+"Please set one or we cannot automatically fill the timesheet."
msgstr ""
#. module: hr_timesheet
@@ -599,7 +599,7 @@ msgstr ""
#. module: hr_timesheet
#: code:addons/hr_timesheet/wizard/hr_timesheet_print_employee.py:42
#, python-format
-msgid "No employee defined for this user"
+msgid "Please define employee for this user!"
msgstr ""
#. module: hr_timesheet
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
index 12c55f6774a..75bb089bbc7 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
@@ -39,7 +39,7 @@ class analytical_timesheet_employee(osv.osv_memory):
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
if not emp_id:
- raise osv.except_osv(_("Warning"), _("No employee defined for this user"))
+ raise osv.except_osv(_("Warning!"), _("Please define employee for this user!"))
return emp_id and emp_id[0] or False
_defaults = {
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
index e3f7f0c7acb..34cfee40262 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
+++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
@@ -74,7 +74,7 @@ class hr_so_project(osv.osv_memory):
res = timesheet_obj.default_get(cr, uid, ['product_id','product_uom_id'], context=context)
if not res['product_uom_id']:
- raise osv.except_osv(_('UserError'), _('No cost unit defined for this employee !'))
+ raise osv.except_osv(_('User Error!'), _('Please define cost unit for this employee.'))
up = timesheet_obj.on_change_unit_amount(cr, uid, False, res['product_id'], hour,False, res['product_uom_id'])['value']
res['name'] = data['info']
@@ -129,7 +129,7 @@ class hr_si_project(osv.osv_memory):
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
if not emp_id:
- raise osv.except_osv(_('UserError'), _('No employee defined for your user !'))
+ raise osv.except_osv(_('User Error!'), _('Please define employee for your user.'))
return False
def check_state(self, cr, uid, ids, context=None):
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index a4f08a854ec..4cba4a18680 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -157,7 +157,7 @@ class account_analytic_line(osv.osv):
if ( not vals.has_key('invoice_id')) or vals['invoice_id' ] == False:
for line in self.browse(cr, uid, select):
if line.invoice_id:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_('You cannot modify an invoiced analytic line!'))
return True
diff --git a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot
index 768c4be3dac..058c1bdc371 100644
--- a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot
+++ b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot
@@ -227,7 +227,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:64
#, python-format
-msgid "Analytic Account incomplete"
+msgid "Analytic Account incomplete !"
msgstr ""
#. module: hr_timesheet_invoice
@@ -411,7 +411,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:132
#, python-format
-msgid "Configuration Error"
+msgid "Configuration Error !"
msgstr ""
#. module: hr_timesheet_invoice
@@ -530,7 +530,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:132
#, python-format
-msgid "No income account defined for product '%s'"
+msgid "Please define income account for product '%s'."
msgstr ""
#. module: hr_timesheet_invoice
@@ -698,7 +698,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:108
#, python-format
-msgid "Error"
+msgid "Error !"
msgstr ""
#. module: hr_timesheet_invoice
@@ -835,7 +835,7 @@ msgstr ""
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:65
#, python-format
msgid "Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n"
-"%s"
+"%s."
msgstr ""
#. module: hr_timesheet_invoice
@@ -864,7 +864,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py:108
#, python-format
-msgid "At least one line has no product !"
+msgid "At least one line has no product!"
msgstr ""
#. module: hr_timesheet_invoice
@@ -943,7 +943,7 @@ msgstr ""
#. module: hr_timesheet_invoice
#: code:addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py:58
#, python-format
-msgid "No Records Found for Report!"
+msgid "No record(s) found for Report!"
msgstr ""
#. module: hr_timesheet_invoice
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py
index 518bb981df9..0ab5b434a91 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py
@@ -55,7 +55,7 @@ class account_analytic_profit(osv.osv_memory):
('user_id', 'in', data['form']['employee_ids']),
], context=context)
if not ids_chk:
- raise osv.except_osv(_('Data Insufficient!'), _('No Records Found for Report!'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No record(s) found for this report.'))
data['form']['journal_ids'] = [(6, 0, data['form']['journal_ids'])] # Improve me => Change the rml/sxw so that it can support withou [0][2]
data['form']['employee_ids'] = [(6, 0, data['form']['employee_ids'])]
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
index c9b2439596d..76314e1986a 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -61,8 +61,8 @@ class account_analytic_line(osv.osv):
for account in analytic_account_obj.browse(cr, uid, account_ids, context=context):
partner = account.partner_id
if (not partner) or not (account.pricelist_id):
- raise osv.except_osv(_('Analytic Account incomplete'),
- _('Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n%s') % (account.name,))
+ raise osv.except_osv(_('Analytic Account incomplete !'),
+ _('Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n%s.') % (account.name,))
@@ -101,9 +101,9 @@ class account_analytic_line(osv.osv):
product_id = data['product'][0]
product = product_obj.browse(cr, uid, product_id, context=context2)
if not product:
- raise osv.except_osv(_('Error'), _('There is no product defined for the line %s. Please select one or force the product through the wizard.') % (line_name))
+ raise osv.except_osv(_('Error!'), _('There is no product defined for the line %s. Please select one or force the product through the wizard.') % (line_name))
factor = invoice_factor_obj.browse(cr, uid, factor_id, context=context2)
- factor_name = product_obj.name_get(cr, uid, [product_id], context=context2)[0][1]
+ factor_name = product_obj.name_get(cr, uid, [product_id], context=context2)[0][1]
if factor.customer_name:
factor_name += ' - ' + factor.customer_name
@@ -119,7 +119,7 @@ class account_analytic_line(osv.osv):
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
if not account_id:
- raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
+ raise osv.except_osv(_("Configuration Error!"), _("Please define income account for product '%s'.") % product.name)
curr_line = {
'price_unit': price,
'quantity': qty,
@@ -196,7 +196,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
data = context and context.get('active_ids', [])
for analytic in analytic_obj.browse(cr, uid, data, context=context):
if analytic.invoice_id:
- raise osv.except_osv(_('Warning !'), _("Invoice is already linked to some of the analytic line(s)!"))
+ raise osv.except_osv(_('Warning!'), _("Invoice is already linked to some of the analytic line(s)!"))
def do_create(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0]
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index f9d662b9b5d..ca28b5bdb28 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -234,33 +234,33 @@ class hr_timesheet_sheet(osv.osv):
ids_signout = self.pool.get('hr.attendance').search(cr,uid,[('sheet_id', '=', sheet_id),('action','=','sign_out')])
if len(ids_signin) != len(ids_signout):
- raise osv.except_osv(('Warning !'),_('The timesheet cannot be validated as it does not contain an equal number of sign ins and sign outs!'))
+ raise osv.except_osv(('Warning!'),_('The timesheet cannot be validated as it does not contain an equal number of sign ins and sign outs.'))
return True
def copy(self, cr, uid, ids, *args, **argv):
- raise osv.except_osv(_('Error !'), _('You cannot duplicate a timesheet!'))
+ raise osv.except_osv(_('Error!'), _('You cannot duplicate a timesheet.'))
def create(self, cr, uid, vals, *args, **argv):
if 'employee_id' in vals:
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id:
- raise osv.except_osv(_('Error !'), _('In order to create a timesheet for this employee, you must assign it to a user!'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign it to a user.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
- raise osv.except_osv(_('Error !'), _('In order to create a timesheet for this employee, you must link the employee to a product, like \'Consultant\'!'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product, like \'Consultant\'.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
- raise osv.except_osv(_('Error !'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal, like \'Timesheet\'!'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal, like \'Timesheet\'.'))
return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
def write(self, cr, uid, ids, vals, *args, **argv):
if 'employee_id' in vals:
new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False
if not new_user_id:
- raise osv.except_osv(_('Error !'), _('In order to create a timesheet for this employee, you must assign it to a user!'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign it to a user.'))
if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id):
- raise osv.except_osv(_('Error !'), _('You cannot have 2 timesheets that overlaps!\nYou should use the menu \'My Timesheet\' to avoid this problem.'))
+ raise osv.except_osv(_('Error!'), _('You cannot have 2 timesheets that overlaps!\nYou should use the menu \'My Timesheet\' to avoid this problem.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
- raise osv.except_osv(_('Error !'), _('In order to create a timesheet for this employee, you must link the employee to a product!'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
- raise osv.except_osv(_('Error !'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal!'))
+ raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign the employee to an analytic journal.'))
return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, *args, **argv)
def button_confirm(self, cr, uid, ids, context=None):
@@ -271,7 +271,7 @@ class hr_timesheet_sheet(osv.osv):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'hr_timesheet_sheet.sheet', sheet.id, 'confirm', cr)
else:
- raise osv.except_osv(_('Warning !'), _('Please verify that the total difference of the sheet is lower than %.2f !') %(di,))
+ raise osv.except_osv(_('Warning!'), _('Please verify that the total difference of the sheet is lower than %.2f.') %(di,))
return True
def date_today(self, cr, uid, ids, context=None):
@@ -315,7 +315,7 @@ class hr_timesheet_sheet(osv.osv):
def check_sign(self, cr, uid, ids, typ, context=None):
sheet = self.browse(cr, uid, ids, context=context)[0]
if not sheet.date_current == time.strftime('%Y-%m-%d'):
- raise osv.except_osv(_('Error !'), _('You cannot sign in/sign out from an other date than today'))
+ raise osv.except_osv(_('Error!'), _('You cannot sign in/sign out from other date than today.'))
return True
def sign(self, cr, uid, ids, typ, context=None):
@@ -452,9 +452,9 @@ class hr_timesheet_sheet(osv.osv):
sheets = self.read(cr, uid, ids, ['state','total_attendance'], context=context)
for sheet in sheets:
if sheet['state'] in ('confirm', 'done'):
- raise osv.except_osv(_('Invalid action !'), _('You cannot delete a timesheet which is already confirmed!'))
+ raise osv.except_osv(_('Invalid Action!'), _('You cannot delete a timesheet which is already confirmed.'))
elif sheet['total_attendance'] <> 0.00:
- raise osv.except_osv(_('Invalid action !'), _('You cannot delete a timesheet which have attendance entries!'))
+ raise osv.except_osv(_('Invalid Action!'), _('You cannot delete a timesheet which have attendance entries.'))
return super(hr_timesheet_sheet, self).unlink(cr, uid, ids, context=context)
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
@@ -533,7 +533,7 @@ class hr_timesheet_line(osv.osv):
return True
_constraints = [
- (_check_sheet_state, 'You cannot modify an entry in a Confirmed/Done timesheet !.', ['state']),
+ (_check_sheet_state, 'You cannot modify an entry in a Confirmed/Done timesheet !', ['state']),
]
def unlink(self, cr, uid, ids, *args, **kwargs):
@@ -545,7 +545,7 @@ class hr_timesheet_line(osv.osv):
def _check(self, cr, uid, ids):
for att in self.browse(cr, uid, ids):
if att.sheet_id and att.sheet_id.state not in ('draft', 'new'):
- raise osv.except_osv(_('Error !'), _('You can not modify an entry in a confirmed timesheet !'))
+ raise osv.except_osv(_('Error!'), _('You cannot modify an entry in a confirmed timesheet.'))
return True
hr_timesheet_line()
@@ -612,12 +612,12 @@ class hr_attendance(osv.osv):
if 'sheet_id' in context:
ts = self.pool.get('hr_timesheet_sheet.sheet').browse(cr, uid, context['sheet_id'], context=context)
if ts.state not in ('draft', 'new'):
- raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet!'))
+ raise osv.except_osv(_('Error!'), _('You cannot modify an entry in a confirmed timesheet.'))
res = super(hr_attendance,self).create(cr, uid, vals, context=context)
if 'sheet_id' in context:
if context['sheet_id'] != self.browse(cr, uid, res, context=context).sheet_id.id:
- raise osv.except_osv(_('UserError'), _('You cannot enter an attendance ' \
- 'date outside the current timesheet dates!'))
+ raise osv.except_osv(_('User Error!'), _('You cannot enter an attendance ' \
+ 'date outside the current timesheet dates.'))
return res
def unlink(self, cr, uid, ids, *args, **kwargs):
@@ -636,14 +636,14 @@ class hr_attendance(osv.osv):
if 'sheet_id' in context:
for attendance in self.browse(cr, uid, ids, context=context):
if context['sheet_id'] != attendance.sheet_id.id:
- raise osv.except_osv(_('UserError'), _('You cannot enter an attendance ' \
- 'date outside the current timesheet dates!'))
+ raise osv.except_osv(_('User Error!'), _('You cannot enter an attendance ' \
+ 'date outside the current timesheet dates.'))
return res
def _check(self, cr, uid, ids):
for att in self.browse(cr, uid, ids):
if att.sheet_id and att.sheet_id.state not in ('draft', 'new'):
- raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet !'))
+ raise osv.except_osv(_('Error!'), _('You cannot modify an entry in a confirmed timesheet'))
return True
hr_attendance()
diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot
index ae27ef19b88..2bf91768bad 100644
--- a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot
+++ b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot
@@ -50,7 +50,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: code:addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py:38
#, python-format
-msgid "No employee defined for your user !"
+msgid "Please define employee for your user!"
msgstr ""
#. module: hr_timesheet_sheet
@@ -91,7 +91,7 @@ msgstr ""
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:274
#, python-format
msgid ""
-"Please verify that the total difference of the sheet is lower than %.2f !"
+"Please verify that the total difference of the sheet is lower than %.2f!"
msgstr ""
#. module: hr_timesheet_sheet
@@ -589,7 +589,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:646
#, python-format
-msgid "You cannot modify an entry in a confirmed timesheet !"
+msgid "You cannot modify an entry in a confirmed timesheet!"
msgstr ""
#. module: hr_timesheet_sheet
@@ -633,7 +633,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:548
#, python-format
-msgid "You can not modify an entry in a confirmed timesheet !"
+msgid "You cannot modify an entry in a confirmed timesheet !"
msgstr ""
#. module: hr_timesheet_sheet
@@ -775,7 +775,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: constraint:hr.analytic.timesheet:0
-msgid "You cannot modify an entry in a Confirmed/Done timesheet !."
+msgid "You cannot modify an entry in a Confirmed/Done timesheet !"
msgstr ""
#. module: hr_timesheet_sheet
@@ -957,7 +957,7 @@ msgstr ""
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:619
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:639
#, python-format
-msgid "UserError"
+msgid "UserError !"
msgstr ""
#. module: hr_timesheet_sheet
@@ -971,7 +971,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:318
#, python-format
-msgid "You cannot sign in/sign out from an other date than today"
+msgid "You cannot sign in/sign out from other date than today."
msgstr ""
#. module: hr_timesheet_sheet
diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
index 5a8fa2c59b3..fdab774a250 100644
--- a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
+++ b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
@@ -35,7 +35,7 @@ class hr_timesheet_current_open(osv.osv_memory):
user_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context)
if not len(user_ids):
- raise osv.except_osv(_('Error !'), _('No employee defined for your user !'))
+ raise osv.except_osv(_('Error!'), _('Please define employee for your user!'))
ids = ts.search(cr, uid, [('user_id','=',uid),('state','=','draft'),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context)
if len(ids) > 1:
diff --git a/addons/import_base/i18n/import_base.pot b/addons/import_base/i18n/import_base.pot
index cc227de8993..0884229ba74 100644
--- a/addons/import_base/i18n/import_base.pot
+++ b/addons/import_base/i18n/import_base.pot
@@ -72,7 +72,7 @@ msgstr ""
#. module: import_base
#: code:addons/import_base/import_framework.py:190
#, python-format
-msgid "%s is not a valid model name"
+msgid "%s is not a valid model name."
msgstr ""
#. module: import_base
diff --git a/addons/import_base/import_framework.py b/addons/import_base/import_framework.py
index 8bcda79c64e..74d2185b57e 100644
--- a/addons/import_base/import_framework.py
+++ b/addons/import_base/import_framework.py
@@ -186,7 +186,7 @@ class import_framework(Thread):
model_obj = self.obj.pool.get(model)
if not model_obj:
- raise ValueError(_("%s is not a valid model name") % model)
+ raise ValueError(_("%s is not a valid model name.") % model)
_logger.debug(_(" fields imported : ") + str(fields))
(p, r, warning, s) = model_obj.import_data(self.cr, self.uid, fields, res, mode='update', current_module=self.module_name, noupdate=True, context=self.context)
for (field, field_name) in self_dependencies:
diff --git a/addons/import_google/i18n/import_google.pot b/addons/import_google/i18n/import_google.pot
index 6693d75616f..175b8c1b75d 100644
--- a/addons/import_google/i18n/import_google.pot
+++ b/addons/import_google/i18n/import_google.pot
@@ -33,15 +33,15 @@ msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:71
#, python-format
-msgid "No Google Username or password Defined for user.\n"
-"Please define in user view"
+msgid "No Google Username or password is defined for user.\n"
+"Please define on user's form."
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:127
#, python-format
msgid "Invalid login detail !\n"
-" Specify Username/Password."
+" Please specify correct username and password."
msgstr ""
#. module: import_google
@@ -100,7 +100,7 @@ msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:133
#, python-format
-msgid "Please specify correct user and password !"
+msgid "Please specify correct username and password!"
msgstr ""
#. module: import_google
diff --git a/addons/import_google/wizard/import_google_data.py b/addons/import_google/wizard/import_google_data.py
index 49127b85db8..bcc24b9e0de 100644
--- a/addons/import_google/wizard/import_google_data.py
+++ b/addons/import_google/wizard/import_google_data.py
@@ -73,7 +73,7 @@ class synchronize_google(osv.osv_memory):
user_obj = self.pool.get('res.users').browse(cr, uid, uid,context=context)
google=self.pool.get('google.login')
if not user_obj.gmail_user or not user_obj.gmail_password:
- raise osv.except_osv(_('Warning !'), _("No Google Username or password Defined for user.\nPlease define in user view"))
+ raise osv.except_osv(_('Warning!'), _("No Google Username or password is defined for user.\nPlease define on user's form."))
gd_client = google.google_login(user_obj.gmail_user,user_obj.gmail_password,type='group')
if not gd_client:
return [('failed', 'Connection to google fail')]
@@ -127,13 +127,13 @@ class synchronize_google(osv.osv_memory):
gmail_pwd = user_obj.gmail_password
google = self.pool.get('google.login')
if not gmail_user or not gmail_pwd:
- raise osv.except_osv(_('Error'), _("Invalid login detail !\n Specify Username/Password."))
+ raise osv.except_osv(_('Error!'), _("Invalid login detail !\nPlease specify correct username and password."))
if context.get('contact'):
- msg = " Your contacts are being imported in background, an email to %s will be sent when the process is over" % (user_obj.gmail_user)
+ msg = " Your contacts are being imported in background, an email to %s will be sent when the process is over." % (user_obj.gmail_user)
gd_client = google.google_login(gmail_user, gmail_pwd, type='contact')
if not gd_client:
- raise osv.except_osv(_('Error'), _("Please specify correct user and password !"))
+ raise osv.except_osv(_('Error!'), _("Please specify correct username and password!"))
if obj.group_name not in ['all']:
context.update({ 'group_name': obj.group_name})
tables.append('Contact')
@@ -145,7 +145,7 @@ class synchronize_google(osv.osv_memory):
'supplier':sup})
elif context.get('calendar'):
- msg = " You're Meeting are import in background, a email will be send when the process is finished to %s"%(user_obj.gmail_user)
+ msg = " Your meetings are being imported in background, an email to %s will be sent when the process is over."%(user_obj.gmail_user)
tables.append('Events')
current_rec = self.browse(cr, uid, ids, context=context)
diff --git a/addons/import_sugarcrm/i18n/import_sugarcrm.pot b/addons/import_sugarcrm/i18n/import_sugarcrm.pot
index 75caa61ccc3..f54cc75d1aa 100644
--- a/addons/import_sugarcrm/i18n/import_sugarcrm.pot
+++ b/addons/import_sugarcrm/i18n/import_sugarcrm.pot
@@ -188,7 +188,7 @@ msgstr ""
#: code:addons/import_sugarcrm/import_sugarcrm.py:1105
#: code:addons/import_sugarcrm/import_sugarcrm.py:1131
#, python-format
-msgid "%s data required %s Module to be installed, Please install %s module"
+msgid "%s data required %s Module to be installed, Please install %s module."
msgstr ""
#. module: import_sugarcrm
@@ -253,7 +253,7 @@ msgstr ""
#: code:addons/import_sugarcrm/sugar.py:60
#, python-format
msgid "Authentication error !\n"
-"Bad Username or Password bad SugarSoap Api url !"
+"Bad username or password or bad SugarSoap Api url!"
msgstr ""
#. module: import_sugarcrm
@@ -280,7 +280,7 @@ msgstr ""
#: code:addons/import_sugarcrm/import_sugarcrm.py:79
#, python-format
msgid "Authentication error !\n"
-"Bad Username or Password or bad SugarSoap Api url !"
+"Bad username or password or bad SugarSoap Api url!"
msgstr ""
#. module: import_sugarcrm
diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py
index 42ba4382b27..7e1ebe3c256 100644
--- a/addons/import_sugarcrm/import_sugarcrm.py
+++ b/addons/import_sugarcrm/import_sugarcrm.py
@@ -76,7 +76,7 @@ class sugar_import(import_framework):
#login
PortType,sessionid = sugar.login(self.context.get('username',''), self.context.get('password',''), self.context.get('url',''))
if sessionid == '-1':
- raise osv.except_osv(_('Error !'), _('Authentication error !\nBad Username or Password or bad SugarSoap Api url !'))
+ raise osv.except_osv(_('Error!'), _('Authentication error!\nBad username or password or bad SugarSoap Api url!'))
self.context['port'] = PortType
self.context['session_id'] = sessionid
@@ -929,8 +929,8 @@ class sugar_import(import_framework):
"""
def get_email_subject(self, result, error=False):
if error:
- return "Sugarcrm data import failed at %s due to an unexpected error" % self.date_ended
- return "your sugarcrm data were successfully imported at %s" % self.date_ended
+ return "Sugarcrm data import failed at %s due to an unexpected error." % self.date_ended
+ return "your sugarcrm data were successfully imported at %s." % self.date_ended
def get_body_header(self, result):
return "Sugarcrm import : report of last import"
@@ -1094,14 +1094,14 @@ class import_sugarcrm(osv.osv):
def import_from_scheduler_all(self, cr, uid, ids, context=None):
keys, module_list = self.get_key(cr, uid, ids, context)
if not keys:
- raise osv.except_osv(_('Warning !'), _('Select Module to Import.'))
+ raise osv.except_osv(_('Warning!'), _('Select Module to Import.'))
key_list = module_list.keys()
for module in key_list :
module = module_list[module]
state = self.get_all(cr,uid,module,context=context)
if state == False:
keys = ', '.join(key_list)
- raise osv.except_osv(_('Error !!'), _("%s data required %s Module to be installed, Please install %s module") %(keys,module,module))
+ raise osv.except_osv(_('Error !!'), _("%s data required %s Module to be installed, Please install %s module.") %(keys,module,module))
cron_obj = self.pool.get('ir.cron')
url = self.parse_valid_url(context)
args = (keys,context.get('email_user'), context.get('instance_name'), url, context.get('username'), context.get('password') )
@@ -1120,14 +1120,14 @@ class import_sugarcrm(osv.osv):
# """Import all sugarcrm data into openerp module"""
keys, module_list = self.get_key(cr, uid, ids, context)
if not keys:
- raise osv.except_osv(_('Warning !'), _('Select Module to Import.'))
+ raise osv.except_osv(_('Warning!'), _('Select Module to Import.'))
key_list = module_list.keys()
for module in key_list :
module = module_list[module]
state = self._module_installed(cr,uid,module,context=context)
if state == False:
keys = ', '.join(key_list)
- raise osv.except_osv(_('Error !!'), _("%s data required %s Module to be installed, Please install %s module") %(keys,module,module))
+ raise osv.except_osv(_('Error !!'), _("%s data required %s Module to be installed, Please install %s module.") %(keys,module,module))
url = self.parse_valid_url(context)
context.update({'url': url})
imp = sugar_import(self, cr, uid, context.get('instance_name'), "import_sugarcrm", context.get('email_user'), context)
diff --git a/addons/import_sugarcrm/sugar.py b/addons/import_sugarcrm/sugar.py
index df2aa386992..658ddc9e76d 100644
--- a/addons/import_sugarcrm/sugar.py
+++ b/addons/import_sugarcrm/sugar.py
@@ -57,7 +57,7 @@ def login(username, password, url):
try:
response = portType.login(request)
except:
- raise osv.except_osv(_('Error !'), _('Authentication error !\nBad Username or Password bad SugarSoap Api url !'))
+ raise osv.except_osv(_('Error!'), _('Authentication error!\nBad username or password or bad SugarSoap Api url!'))
if -1 == response._return._id:
raise LoginError(response._return._error._description)
diff --git a/addons/import_sugarcrm/sugarsoap_services.py b/addons/import_sugarcrm/sugarsoap_services.py
index b42eb4041c1..38454de9c2a 100644
--- a/addons/import_sugarcrm/sugarsoap_services.py
+++ b/addons/import_sugarcrm/sugarsoap_services.py
@@ -46,7 +46,7 @@ class sugarsoapBindingSOAP:
# op: create_session
def create_session(self, request):
if isinstance(request, create_sessionRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction= URL+"/create_session", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -58,7 +58,7 @@ class sugarsoapBindingSOAP:
# op: end_session
def end_session(self, request):
if isinstance(request, end_sessionRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/end_session", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -70,7 +70,7 @@ class sugarsoapBindingSOAP:
# op: contact_by_email
def contact_by_email(self, request):
if isinstance(request, contact_by_emailRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/contact_by_email", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -82,7 +82,7 @@ class sugarsoapBindingSOAP:
# op: user_list
def user_list(self, request):
if isinstance(request, user_listRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/user_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -94,7 +94,7 @@ class sugarsoapBindingSOAP:
# op: search
def search(self, request):
if isinstance(request, searchRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/search", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -106,7 +106,7 @@ class sugarsoapBindingSOAP:
# op: track_email
def track_email(self, request):
if isinstance(request, track_emailRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/track_email", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -118,7 +118,7 @@ class sugarsoapBindingSOAP:
# op: create_contact
def create_contact(self, request):
if isinstance(request, create_contactRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/create_contact", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -130,7 +130,7 @@ class sugarsoapBindingSOAP:
# op: create_lead
def create_lead(self, request):
if isinstance(request, create_leadRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/create_lead", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -142,7 +142,7 @@ class sugarsoapBindingSOAP:
# op: create_account
def create_account(self, request):
if isinstance(request, create_accountRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/create_account", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -154,7 +154,7 @@ class sugarsoapBindingSOAP:
# op: create_opportunity
def create_opportunity(self, request):
if isinstance(request, create_opportunityRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/create_opportunity", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -166,7 +166,7 @@ class sugarsoapBindingSOAP:
# op: create_case
def create_case(self, request):
if isinstance(request, create_caseRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/create_case", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -178,7 +178,7 @@ class sugarsoapBindingSOAP:
# op: login
def login(self, request):
if isinstance(request, loginRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
@@ -191,7 +191,7 @@ class sugarsoapBindingSOAP:
# op: is_loopback
def is_loopback(self, request):
if isinstance(request, is_loopbackRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/is_loopback", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -203,7 +203,7 @@ class sugarsoapBindingSOAP:
# op: seamless_login
def seamless_login(self, request):
if isinstance(request, seamless_loginRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/seamless_login", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -215,7 +215,7 @@ class sugarsoapBindingSOAP:
#op: get_document_list
def get_document_list(self, request):
if isinstance(request, get_document_revisionRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction="http://"+ IP +"/sugarcrm/soap.php/get_document_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -227,7 +227,7 @@ class sugarsoapBindingSOAP:
# op: get_entry_list
def get_entry_list(self, request):
if isinstance(request, get_entry_listRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_entry_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -242,7 +242,7 @@ class sugarsoapBindingSOAP:
# op: get_entry
def get_entry(self, request):
if isinstance(request, get_entryRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_entry", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -254,7 +254,7 @@ class sugarsoapBindingSOAP:
# op: get_entries
def get_entries(self, request):
if isinstance(request, get_entriesRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -266,7 +266,7 @@ class sugarsoapBindingSOAP:
# op: set_entry
def set_entry(self, request):
if isinstance(request, set_entryRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/set_entry", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -278,7 +278,7 @@ class sugarsoapBindingSOAP:
# op: set_entries
def set_entries(self, request):
if isinstance(request, set_entriesRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/set_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -290,7 +290,7 @@ class sugarsoapBindingSOAP:
# op: set_note_attachment
def set_note_attachment(self, request):
if isinstance(request, set_note_attachmentRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/set_note_attachment", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -302,7 +302,7 @@ class sugarsoapBindingSOAP:
# op: get_note_attachment
def get_note_attachment(self, request):
if isinstance(request, get_note_attachmentRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_note_attachment", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -314,7 +314,7 @@ class sugarsoapBindingSOAP:
# op: relate_note_to_module
def relate_note_to_module(self, request):
if isinstance(request, relate_note_to_moduleRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/relate_note_to_module", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -326,7 +326,7 @@ class sugarsoapBindingSOAP:
# op: get_related_notes
def get_related_notes(self, request):
if isinstance(request, get_related_notesRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_related_notes", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -338,7 +338,7 @@ class sugarsoapBindingSOAP:
# op: logout
def logout(self, request):
if isinstance(request, logoutRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/logout", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -350,7 +350,7 @@ class sugarsoapBindingSOAP:
# op: get_module_fields
def get_module_fields(self, request):
if isinstance(request, get_module_fieldsRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_module_fields", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -362,7 +362,7 @@ class sugarsoapBindingSOAP:
# op: get_available_modules
def get_available_modules(self, request):
if isinstance(request, get_available_modulesRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_available_modules", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -374,7 +374,7 @@ class sugarsoapBindingSOAP:
# op: update_portal_user
def update_portal_user(self, request):
if isinstance(request, update_portal_userRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/update_portal_user", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -386,7 +386,7 @@ class sugarsoapBindingSOAP:
# op: test
def test(self, request):
if isinstance(request, testRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/test", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -398,7 +398,7 @@ class sugarsoapBindingSOAP:
# op: get_user_id
def get_user_id(self, request):
if isinstance(request, get_user_idRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_user_id", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -410,7 +410,7 @@ class sugarsoapBindingSOAP:
# op: get_user_team_id
def get_user_team_id(self, request):
if isinstance(request, get_user_team_idRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_user_team_id", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -422,7 +422,7 @@ class sugarsoapBindingSOAP:
# op: get_server_time
def get_server_time(self, request):
if isinstance(request, get_server_timeRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_server_time", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -434,7 +434,7 @@ class sugarsoapBindingSOAP:
# op: get_gmt_time
def get_gmt_time(self, request):
if isinstance(request, get_gmt_timeRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_gmt_time", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -446,7 +446,7 @@ class sugarsoapBindingSOAP:
# op: get_sugar_flavor
def get_sugar_flavor(self, request):
if isinstance(request, get_sugar_flavorRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_sugar_flavor", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -458,7 +458,7 @@ class sugarsoapBindingSOAP:
# op: get_server_version
def get_server_version(self, request):
if isinstance(request, get_server_versionRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_server_version", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -470,7 +470,7 @@ class sugarsoapBindingSOAP:
# op: get_relationships
def get_relationships(self, request):
if isinstance(request, get_relationshipsRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -482,7 +482,7 @@ class sugarsoapBindingSOAP:
# op: set_relationship
def set_relationship(self, request):
if isinstance(request, set_relationshipRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/set_relationship", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -494,7 +494,7 @@ class sugarsoapBindingSOAP:
# op: set_relationships
def set_relationships(self, request):
if isinstance(request, set_relationshipsRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/set_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -506,7 +506,7 @@ class sugarsoapBindingSOAP:
# op: set_document_revision
def set_document_revision(self, request):
if isinstance(request, set_document_revisionRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/set_document_revision", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -518,7 +518,7 @@ class sugarsoapBindingSOAP:
# op: search_by_module
def search_by_module(self, request):
if isinstance(request, search_by_moduleRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/search_by_module", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -530,7 +530,7 @@ class sugarsoapBindingSOAP:
# op: sync_get_modified_relationships
def sync_get_modified_relationships(self, request):
if isinstance(request, sync_get_modified_relationshipsRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/sync_get_modified_relationships", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -542,7 +542,7 @@ class sugarsoapBindingSOAP:
# op: get_modified_entries
def get_modified_entries(self, request):
if isinstance(request, get_modified_entriesRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_modified_entries", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
@@ -554,7 +554,7 @@ class sugarsoapBindingSOAP:
# op: get_attendee_list
def get_attendee_list(self, request):
if isinstance(request, get_attendee_listRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
+ raise TypeError, "%s incorrect request type!" % (request.__class__)
kw = {}
# no input wsaction
self.binding.Send(None, None, request, soapaction=URL+"/get_attendee_list", encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", **kw)
diff --git a/addons/l10n_be/i18n/l10n_be.pot b/addons/l10n_be/i18n/l10n_be.pot
index 7c7a25137ab..73f7c022830 100644
--- a/addons/l10n_be/i18n/l10n_be.pot
+++ b/addons/l10n_be/i18n/l10n_be.pot
@@ -301,7 +301,7 @@ msgstr ""
#. module: l10n_be
#: code:addons/l10n_be/wizard/l10n_be_vat_intra.py:102
#, python-format
-msgid "The period code you entered is not valid."
+msgid "Period code is not valid."
msgstr ""
#. module: l10n_be
diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
index 95978ac52e7..5e357facd86 100644
--- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
+++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
@@ -3,8 +3,8 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# Adapted by Noviat to
+#
+# Adapted by Noviat to
# - enforce correct vat number
# - support negative balance
# - assign amount of tax code 71-72 correclty to grid 71 or 72
@@ -83,7 +83,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
obj_company = obj_user.browse(cr, uid, uid, context=context).company_id
vat_no = obj_company.partner_id.vat
if not vat_no:
- raise osv.except_osv(_('Data Insufficient'), _('No VAT Number Associated with Main Company!'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No VAT Number Associated with Main Company.'))
vat_no = vat_no.replace(' ','').upper()
vat = vat_no[2:]
@@ -107,9 +107,9 @@ class l10n_be_vat_declaration(osv.osv_memory):
quarter = str(((int(starting_month) - 1) / 3) + 1)
if not email:
- raise osv.except_osv(_('Data Insufficient!'),_('No email address associated with the company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No email address associated with the company.'))
if not phone:
- raise osv.except_osv(_('Data Insufficient!'),_('No phone associated with the company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No phone associated with the company.'))
file_data = {
'issued_by': issued_by,
'vat_no': vat_no,
@@ -130,7 +130,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
'ask_payment': (data['ask_payment'] and 'YES' or 'NO'),
'comments': comments,
}
-
+
data_of_file = """
@@ -186,7 +186,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
'amount': str(abs(item['sum_period'])),
}
data_of_file += '\n\t\t\t%(amount)s' % (grid_amount_data)
-
+
data_of_file += '\n\t\t'
data_of_file += '\n\t\t%(client_nihil)s' % (file_data)
data_of_file += '\n\t\t' % (file_data)
diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
index 68ad3f703e1..8cad2d01a3e 100644
--- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
+++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
@@ -7,7 +7,7 @@
# Corrections & modifications by Noviat nv/sa, (http://www.noviat.be):
# - VAT listing based upon year in stead of fiscal year
# - sql query adapted to select only 'tax-out' move lines
-# - extra button to print readable PDF report
+# - extra button to print readable PDF report
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -61,7 +61,7 @@ class partner_vat(osv.osv_memory):
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
period_ids = obj_period.search(cr, uid, [('date_start' ,'>=', date_start), ('date_stop','<=',date_stop), ('company_id','=',company_id)])
if not period_ids:
- raise osv.except_osv(_('Data Insufficient!'), _('No data for the selected Year.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No data for the selected year.'))
partners = []
partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context)
@@ -78,7 +78,7 @@ class partner_vat(osv.osv_memory):
FROM account_move_line l2
LEFT JOIN account_tax_code c2 ON l2.tax_code_id = c2.id
WHERE c2.code IN ('54','64')
- AND l2.partner_id IN %s
+ AND l2.partner_id IN %s
AND l2.period_id IN %s
GROUP BY l2.partner_id) AS sub2 ON sub1.partner_id = sub2.partner_id
""",(tuple(partner_ids),tuple(period_ids),tuple(partner_ids),tuple(period_ids)))
@@ -176,7 +176,7 @@ class partner_vat_list(osv.osv_memory):
company_vat = obj_cmpny.partner_id.vat
if not company_vat:
- raise osv.except_osv(_('Data Insufficient'),_('No VAT Number Associated with Main Company!'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No VAT number associated with the company.'))
company_vat = company_vat.replace(' ','').upper()
SenderId = company_vat[2:]
@@ -206,9 +206,9 @@ class partner_vat_list(osv.osv_memory):
comp_name = obj_cmpny.name
if not email:
- raise osv.except_osv(_('Data Insufficient!'),_('No email address associated with the company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No email address associated with the company.'))
if not phone:
- raise osv.except_osv(_('Data Insufficient!'),_('No phone associated with the company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No phone associated with the company.'))
annual_listing_data = {
'issued_by': issued_by,
'company_vat': company_vat,
@@ -245,11 +245,11 @@ class partner_vat_list(osv.osv_memory):
%(SenderId)s%(comp_name)s%(street)s
- %(zip)s
- %(city)s
- %(country)s
- %(email)s
- %(phone)s
+ %(zip)s
+ %(city)s
+ %(country)s
+ %(email)s
+ %(phone)s%(period)s
""" % annual_listing_data
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index 2bfc4de6bad..47a29a8457f 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -4,7 +4,7 @@
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
-# Adapted by Noviat to
+# Adapted by Noviat to
# - make the 'mand_id' field optional
# - support Noviat tax code scheme
#
@@ -104,23 +104,23 @@ class partner_vat_intra(osv.osv_memory):
data_company = wiz_data.tax_code_id.company_id
else:
data_company = obj_user.browse(cr, uid, uid, context=context).company_id
-
+
# Get Company vat
company_vat = data_company.partner_id.vat
if not company_vat:
- raise osv.except_osv(_('Data Insufficient'),_('No VAT Number Associated with Main Company!'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No VAT number associated with the company.'))
company_vat = company_vat.replace(' ','').upper()
issued_by = company_vat[:2]
if len(wiz_data.period_code) != 6:
- raise osv.except_osv(_('Wrong Period Code'), _('The period code you entered is not valid.'))
+ raise osv.except_osv(_('Error!'), _('Period code is not valid.'))
if not wiz_data.period_ids:
- raise osv.except_osv(_('Data Insufficient!'),_('Please select at least one Period.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('Please select at least one Period.'))
p_id_list = obj_partner.search(cr, uid, [('vat','!=',False)], context=context)
if not p_id_list:
- raise osv.except_osv(_('Data Insufficient!'),_('No partner has a VAT Number asociated with him.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number asociated with him.'))
seq_declarantnum = obj_sequence.get(cr, uid, 'declarantnum')
dnum = company_vat[2:] + seq_declarantnum[-4:]
@@ -144,14 +144,14 @@ class partner_vat_intra(osv.osv_memory):
if not country:
country = company_vat[:2]
if not email:
- raise osv.except_osv(_('Data Insufficient!'),_('No email address associated with the company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No email address associated with the company.'))
if not phone:
- raise osv.except_osv(_('Data Insufficient!'),_('No phone associated with the company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No phone associated with the company.'))
xmldict.update({
'company_name': data_company.name,
- 'company_vat': company_vat,
+ 'company_vat': company_vat,
'vatnum': company_vat[2:],
- 'mand_id': wiz_data.mand_id,
+ 'mand_id': wiz_data.mand_id,
'sender_date': str(time.strftime('%Y-%m-%d')),
'street': street,
'city': city,
@@ -160,13 +160,13 @@ class partner_vat_intra(osv.osv_memory):
'email': email,
'phone': phone.replace('/','').replace('.','').replace('(','').replace(')','').replace(' ',''),
'period': wiz_data.period_code,
- 'clientlist': [],
+ 'clientlist': [],
'comments': comments,
'issued_by': issued_by,
})
-
+
codes = ('44', '46L', '46T', '48s44', '48s46L', '48s46T')
- cr.execute('''SELECT p.name As partner_name, l.partner_id AS partner_id, p.vat AS vat,
+ cr.execute('''SELECT p.name As partner_name, l.partner_id AS partner_id, p.vat AS vat,
(CASE WHEN t.code = '48s44' THEN '44'
WHEN t.code = '48s46L' THEN '46L'
WHEN t.code = '48s46T' THEN '46T'
@@ -195,8 +195,8 @@ class partner_vat_intra(osv.osv_memory):
xmldict['clientlist'].append({
'partner_name': row['partner_name'],
- 'seq': seq,
- 'vatnum': row['vat'][2:].replace(' ','').upper(),
+ 'seq': seq,
+ 'vatnum': row['vat'][2:].replace(' ','').upper(),
'vat': row['vat'],
'country': row['vat'][:2],
'amount': amt,
@@ -243,7 +243,7 @@ class partner_vat_intra(osv.osv_memory):
data_clientinfo = ''
for client in xml_data['clientlist']:
if not client['vatnum']:
- raise osv.except_osv(_('Data Insufficient!'),_('No vat number defined for %s') % client['partner_name'])
+ raise osv.except_osv(_('Insufficient Data!'),_('No vat number defined for %s.') % client['partner_name'])
data_clientinfo +='\n\t\t\n\t\t\t%(vatnum)s\n\t\t\t%(code)s\n\t\t\t%(amount)s\n\t\t' % (client)
data_decl = '\n\t' % (xml_data)
diff --git a/addons/l10n_ch/i18n/l10n_ch.pot b/addons/l10n_ch/i18n/l10n_ch.pot
index b606d0c46ea..2614ea124a9 100644
--- a/addons/l10n_ch/i18n/l10n_ch.pot
+++ b/addons/l10n_ch/i18n/l10n_ch.pot
@@ -100,7 +100,7 @@ msgstr ""
#. module: l10n_ch
#: code:addons/l10n_ch/wizard/create_dta.py:0
#, python-format
-msgid "The Bank type %s of the bank account: %s is not supported"
+msgid "The Bank type %s of the bank account: %s is not supported."
msgstr ""
#. module: l10n_ch
@@ -279,7 +279,7 @@ msgstr ""
#. module: l10n_ch
#: code:addons/l10n_ch/wizard/bvr_import.py:0
#, python-format
-msgid "The properties account payable account receivable"
+msgid "The properties account payable and account receivable are not set."
msgstr ""
#. module: l10n_ch
@@ -325,7 +325,7 @@ msgstr ""
#. module: l10n_ch
#: code:addons/l10n_ch/wizard/create_dta.py:0
#, python-format
-msgid "not implemented"
+msgid "Not implemented."
msgstr ""
#. module: l10n_ch
@@ -396,7 +396,7 @@ msgstr ""
#. module: l10n_ch
#: code:addons/l10n_ch/wizard/create_dta.py:0
#, python-format
-msgid "No payment mode"
+msgid "No payment mode."
msgstr ""
#. module: l10n_ch
diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py
index dffeedd0caa..1699871dc26 100644
--- a/addons/l10n_ch/report/report_webkit_html.py
+++ b/addons/l10n_ch/report/report_webkit_html.py
@@ -31,7 +31,7 @@ from mako import exceptions
from report import report_sxw
from report_webkit import webkit_report
-from report_webkit import report_helper
+from report_webkit import report_helper
from osv import osv
from osv.osv import except_osv
@@ -68,24 +68,24 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse):
_compile_comma_me = re.compile("^(-?\d+)(\d{3})")
_compile_check_bvr = re.compile('[0-9][0-9]-[0-9]{3,6}-[0-9]')
_compile_check_bvr_add_num = re.compile('[0-9]*$')
-
+
def set_context(self, objects, data, ids, report_type=None):
user = self.pool.get('res.users').browse(self.cr, self.uid, self.uid)
company = user.company_id
if not company.invoice_only:
self._check(ids)
return super(l10n_ch_report_webkit_html, self).set_context(objects, data, ids, report_type=report_type)
-
+
def police_absolute_path(self, inner_path) :
"""Will get the ocrb police absolute path"""
path = addons.get_module_resource(os.path.join('l10n_ch', 'report', inner_path))
return path
-
+
def bvr_absolute_path(self) :
"""Will get the ocrb police absolute path"""
path = addons.get_module_resource(os.path.join('l10n_ch', 'report', 'bvr1.jpg'))
return path
-
+
def headheight(self):
report_id = self.pool.get('ir.actions.report.xml').search(self.cr, self.uid, [('name','=', 'BVR invoice')])[0]
report = self.pool.get('ir.actions.report.xml').browse(self.cr, self.uid, report_id)
@@ -112,8 +112,8 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse):
'12 34567 89012 345'
"""
return ''.join([' '[(i - 2) % nbrspc:] + c for i, c in enumerate(nbr)])
-
-
+
+
def _get_ref(self, inv):
"""Retrieve ESR/BVR reference form invoice in order to print it"""
res = ''
@@ -123,7 +123,7 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse):
if inv.number:
invoice_number = self._compile_get_ref.sub('', inv.number)
return mod10r(res + invoice_number.rjust(26-len(res), '0'))
-
+
def _check(self, invoice_ids):
"""Check if the invoice is ready to be printed"""
if not invoice_ids:
@@ -135,24 +135,24 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse):
for invoice in invoice_obj.browse(cursor, self.uid, ids):
invoice_name = "%s %s" %(invoice.name, invoice.number)
if not invoice.partner_bank_id:
- raise except_osv(_('UserError'),
- _('No bank specified on invoice:\n%s' %(invoice_name)))
+ raise except_osv(_('User Error!'),
+ _('No bank specified on invoice:\n%s.' %(invoice_name)))
if not self._compile_check_bvr.match(
invoice.partner_bank_id.post_number or ''):
- raise except_osv(_('UserError'),
+ raise except_osv(_('User Error!'),
_(('Your bank BVR number should be of the form 0X-XXX-X! '
'Please check your company '
- 'information for the invoice:\n%s')
+ 'information for the invoice:\n%s.')
%(invoice_name)))
if invoice.partner_bank_id.bvr_adherent_num \
and not self._compile_check_bvr_add_num.match(
invoice.partner_bank_id.bvr_adherent_num):
- raise except_osv(_('UserError'),
+ raise except_osv(_('User Error!'),
_(('Your bank BVR adherent number must contain only '
'digits!\nPlease check your company '
- 'information for the invoice:\n%s') %(invoice_name)))
+ 'information for the invoice:\n%s.') %(invoice_name)))
return ''
-
+
def mako_template(text):
"""Build a Mako template.
@@ -162,15 +162,15 @@ def mako_template(text):
return Template(text, input_encoding='utf-8', output_encoding='utf-8', lookup=tmp_lookup)
class BVRWebKitParser(webkit_report.WebKitParser):
-
+
def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None):
"""generate the PDF"""
context = context or {}
if report_xml.report_type != 'webkit':
return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context)
- self.parser_instance = self.parser(cursor,
- uid,
- self.name2,
+ self.parser_instance = self.parser(cursor,
+ uid,
+ self.name2,
context=context)
self.pool = pooler.get_pool(cursor.dbname)
objs = self.getObjects(cursor, uid, ids, context)
@@ -183,13 +183,13 @@ class BVRWebKitParser(webkit_report.WebKitParser):
if not template and report_xml.report_webkit_data :
template = report_xml.report_webkit_data
if not template :
- raise except_osv(_('Error'),_('Webkit Report template not found !'))
+ raise except_osv(_('Error!'),_('Webkit Report template not found.'))
header = report_xml.webkit_header.html
footer = report_xml.webkit_header.footer_html
if not header and report_xml.header:
raise except_osv(
- _('No header defined for this Webkit report!'),
- _('Please set a header in company settings')
+ _('No header defined for this Webkit report.'),
+ _('Please set a header in company settings.')
)
if not report_xml.header :
header = ''
@@ -212,7 +212,7 @@ class BVRWebKitParser(webkit_report.WebKitParser):
self.parser_instance.localcontext['objects'] = [obj]
if not company.bvr_only:
try:
- html = body_mako_tpl.render(helper=helper,
+ html = body_mako_tpl.render(helper=helper,
css=css,
_=self.translate_call,
**self.parser_instance.localcontext)
@@ -221,16 +221,16 @@ class BVRWebKitParser(webkit_report.WebKitParser):
htmls.append(html)
if not company.invoice_only:
try:
- bvr = body_bvr_tpl.render(helper=helper,
+ bvr = body_bvr_tpl.render(helper=helper,
css=css,
_=self.translate_call,
**self.parser_instance.localcontext)
except Exception, e:
raise Exception(exceptions.text_error_template().render())
- htmls.append(bvr)
+ htmls.append(bvr)
head_mako_tpl = Template(header, input_encoding='utf-8', output_encoding='utf-8')
try:
- head = head_mako_tpl.render(helper=helper,
+ head = head_mako_tpl.render(helper=helper,
css=css,
_debug=False,
_=self.translate_call,
@@ -241,16 +241,16 @@ class BVRWebKitParser(webkit_report.WebKitParser):
if footer and company.invoice_only :
foot_mako_tpl = Template(footer, input_encoding='utf-8', output_encoding='utf-8')
try:
- foot = foot_mako_tpl.render(helper=helper,
- css=css,
+ foot = foot_mako_tpl.render(helper=helper,
+ css=css,
_=self.translate_call,
**self.parser_instance.localcontext)
except Exception, e:
raise Exception(exceptions.text_error_template().render())
if report_xml.webkit_debug :
try:
- deb = head_mako_tpl.render(helper=helper,
- css=css,
+ deb = head_mako_tpl.render(helper=helper,
+ css=css,
_debug=html,
_=self.translate_call,
**self.parser_instance.localcontext)
@@ -260,10 +260,10 @@ class BVRWebKitParser(webkit_report.WebKitParser):
bin = self.get_lib(cursor, uid)
pdf = self.generate_pdf(bin, report_xml, head, foot, htmls)
return (pdf, 'pdf')
-
+
BVRWebKitParser('report.invoice_web_bvr',
- 'account.invoice',
+ 'account.invoice',
'addons/l10n_ch/report/report_webkit_html.mako',
parser=l10n_ch_report_webkit_html)
diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py
index e5c5b7e5053..38ba1e2a7d9 100644
--- a/addons/l10n_ch/wizard/bvr_import.py
+++ b/addons/l10n_ch/wizard/bvr_import.py
@@ -71,9 +71,9 @@ def _import(self, cursor, user, data, context=None):
statement_obj = self.pool.get('account.bank.statement')
property_obj = self.pool.get('ir.property')
file = data['form']['file']
- if not file:
- raise osv.except_osv(_('UserError'),
- _('Please select a file first!'))
+ if not file:
+ raise osv.except_osv(_('User Error!'),
+ _('Please select a file first.'))
statement_id = data['id']
records = []
total_amount = 0
@@ -90,12 +90,12 @@ def _import(self, cursor, user, data, context=None):
if line[0:3] in ('999', '995'):
if find_total:
- raise osv.except_osv(_('Error'),
- _('Too much total record found!'))
+ raise osv.except_osv(_('Error!'),
+ _('Too much total record found.'))
find_total = True
if lines:
- raise osv.except_osv(_('Error'),
- _('Record found after total record!'))
+ raise osv.except_osv(_('Error!'),
+ _('Record found after total record.'))
amount = float(line[39:49]) + (float(line[49:51]) / 100)
cost = float(line[69:76]) + (float(line[76:78]) / 100)
if line[2] == '5':
@@ -104,11 +104,11 @@ def _import(self, cursor, user, data, context=None):
if round(amount - total_amount, 2) >= 0.01 \
or round(cost - total_cost, 2) >= 0.01:
- raise osv.except_osv(_('Error'),
- _('Total record different from the computed!'))
+ raise osv.except_osv(_('Error!'),
+ _('Total record different from the computed.'))
if int(line[51:63]) != len(records):
- raise osv.except_osv(_('Error'),
- _('Number record different from the computed!'))
+ raise osv.except_osv(_('Error!'),
+ _('Number record different from the computed.'))
else:
record = {
'reference': line[12:39],
@@ -119,8 +119,8 @@ def _import(self, cursor, user, data, context=None):
}
if record['reference'] != mod10r(record['reference'][:-1]):
- raise osv.except_osv(_('Error'),
- _('Recursive mod10 is invalid for reference: %s') % \
+ raise osv.except_osv(_('Error!'),
+ _('Recursive mod10 is invalid for reference: %s.') % \
record['reference'])
if line[2] == '5':
@@ -221,11 +221,11 @@ def _import(self, cursor, user, data, context=None):
if value :
account_id = int(value.split(',')[1])
else :
- raise osv.except_osv(_('Error'),
- _('The properties account payable account receivable are not set'))
+ raise osv.except_osv(_('Error!'),
+ _('The properties account payable and account receivable are not set.'))
if not account_id and line_ids:
- raise osv.except_osv(_('Error'),
- _('The properties account payable account receivable are not set'))
+ raise osv.except_osv(_('Error!'),
+ _('The properties account payable and account receivable are not set.'))
values['account_id'] = account_id
values['partner_id'] = partner_id
statement_line_obj.create(cursor, user, values, context=context)
diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py
index 836853fa4fa..695fe763aa9 100644
--- a/addons/l10n_ch/wizard/create_dta.py
+++ b/addons/l10n_ch/wizard/create_dta.py
@@ -99,7 +99,7 @@ class record:
Must instanciate a fields list, field = (name,size)
and update a local_values dict.
"""
- raise _('not implemented')
+ raise _('Not implemented.')
def generate(self):
res=''
@@ -372,17 +372,17 @@ def _create_dta(obj, cr, uid, data, context=None):
# raise osv.except_osv(_('Order not confirmed'),
# _('Please confirm it'))
if not payment.mode:
- raise osv.except_osv(_('Error'),
- _('No payment mode'))
+ raise osv.except_osv(_('Error!'),
+ _('No payment mode.'))
bank = payment.mode.bank_id
if not bank:
- raise osv.except_osv(_('Error'), _('No bank account for the company.'))
+ raise osv.except_osv(_('Error!'), _('No bank account for the company.'))
v['comp_bank_name']= bank.bank and bank.bank.name or False
v['comp_bank_clearing'] = bank.bank.clearing
if not v['comp_bank_clearing']:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('You must provide a Clearing Number for your bank account.'))
user = pool.get('res.users').browse(cr,uid,[uid])[0]
@@ -404,7 +404,7 @@ def _create_dta(obj, cr, uid, data, context=None):
#else:
# v['comp_bank_iban'] = ''
if not v['comp_bank_iban']:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('No IBAN for the company bank account.'))
res_partner_bank_obj = pool.get('res.partner.bank')
@@ -415,10 +415,10 @@ def _create_dta(obj, cr, uid, data, context=None):
for pline in payment.line_ids:
if not pline.bank_id:
- raise osv.except_osv(_('Error'), _('No bank account defined\n' \
+ raise osv.except_osv(_('Error!'), _('No bank account defined\n' \
'on line: %s') % pline.name)
if not pline.bank_id.bank:
- raise osv.except_osv(_('Error'), _('No bank defined\n' \
+ raise osv.except_osv(_('Error!'), _('No bank defined\n' \
'for the bank account: %s\n' \
'on the partner: %s\n' \
'on line: %s') + (pline.bank_id.state, pline.partner_id.name, pline.name))
@@ -431,7 +431,7 @@ def _create_dta(obj, cr, uid, data, context=None):
v['partner_bank_name'] = pline.bank_id.bank.name or False
v['partner_bank_clearing'] = pline.bank_id.bank.clearing or False
if not v['partner_bank_name'] :
- raise osv.except_osv(_('Error'), _('No bank name defined\n' \
+ raise osv.except_osv(_('Error!'), _('No bank name defined\n' \
'for the bank account: %s\n' \
'on the partner: %s\n' \
'on line: %s') % (pline.bank_id.state, pline.partner_id.name, pline.name))
@@ -460,7 +460,7 @@ def _create_dta(obj, cr, uid, data, context=None):
v['partner_bvr'] = v['partner_bvr'].rjust(9, '0')
is_9_pos_adherent = False
else:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('Wrong postal number format.\n'
'It must be 12-123456-9 or 12345 format'))
@@ -519,7 +519,7 @@ def _create_dta(obj, cr, uid, data, context=None):
v['comp_country'] = co_addr.country_id and co_addr.country_id.code+'-' or ''
record_type = record_gt836
if not v['partner_bank_iban']:
- raise osv.except_osv(_('Error'), _('No IBAN defined \n' \
+ raise osv.except_osv(_('Error!'), _('No IBAN defined \n' \
'for the bank account: %s\n' + \
'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] , pline.name))
@@ -535,37 +535,37 @@ def _create_dta(obj, cr, uid, data, context=None):
+ ' ' + v['partner_bank_city'] \
+ ' ' + v['partner_bank_country']
else:
- raise osv.except_osv(_('Error'), _('You must provide the bank city '
+ raise osv.except_osv(_('Error!'), _('You must provide the bank city '
'or the bic code for the partner bank: \n %d\n' + \
'on line: %s') %(res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1], pline.name))
elif elec_pay == 'bvrbank' or elec_pay == 'bvrpost':
from tools import mod10r
if not v['reference']:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('You must provide ' \
'a BVR reference number \n' \
'for the line: %s') % pline.name)
v['reference'] = v['reference'].replace(' ', '')
if is_9_pos_adherent:
if len(v['reference']) > 27:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('BVR reference number is not valid \n'
'for the line: %s. \n'
'Reference is too long.') % pline.name)
# do a mod10 check
if mod10r(v['reference'][:-1]) != v['reference']:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('BVR reference number is not valid \n'
'for the line: %s. \n'
- 'Mod10 check failed') % pline.name)
+ 'Mod10 check failed.') % pline.name)
# fill reference with 0
v['reference'] = v['reference'].rjust(27, '0')
else:
# reference of BVR adherent with 5 positions number
# have 15 positions references
if len(v['reference']) > 15:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_('BVR reference number is not valid \n'
'for the line: %s. \n'
'Reference is too long '
@@ -575,19 +575,19 @@ def _create_dta(obj, cr, uid, data, context=None):
v['reference'] = v['reference'].rjust(15, '0').ljust(27, ' ')
if not v['partner_bvr']:
- raise osv.except_osv(_('Error'), _('You must provide a BVR number\n'
+ raise osv.except_osv(_('Error!'), _('You must provide a BVR number\n'
'for the bank account: %s' \
'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id],context)[0][1] ,pline.name))
record_type = record_gt826
elif elec_pay == 'bvbank':
if not v['partner_bank_number'] :
- raise osv.except_osv(_('Error'), _('You must provide ' \
+ raise osv.except_osv(_('Error!'), _('You must provide ' \
'a bank number \n' \
'for the partner bank: %s\n' \
'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] , pline.name))
if not v['partner_bank_clearing']:
- raise osv.except_osv(_('Error'), _('You must provide ' \
+ raise osv.except_osv(_('Error!'), _('You must provide ' \
'a Clearing Number\n' \
'for the partner bank: %s\n' \
'on line %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] , pline.name))
@@ -595,7 +595,7 @@ def _create_dta(obj, cr, uid, data, context=None):
record_type = record_gt827
elif elec_pay == 'bvpost':
if not v['partner_post_number']:
- raise osv.except_osv(_('Error'), _('You must provide ' \
+ raise osv.except_osv(_('Error!'), _('You must provide ' \
'a post number \n' \
'for the partner bank: %s\n' \
'on line: %s') % (res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] ,pline.name))
@@ -603,7 +603,7 @@ def _create_dta(obj, cr, uid, data, context=None):
v['partner_bank_number'] = '/C/'+v['partner_post_number']
record_type = record_gt827
else:
- raise osv.except_osv(_('Error'), _('The Bank type %s of the bank account: %s is not supported') \
+ raise osv.except_osv(_('Error!'), _('The Bank type %s of the bank account: %s is not supported.') \
% (elec_pay, res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1],))
dta_line = record_type(v).generate()
diff --git a/addons/l10n_fr_rib/bank.py b/addons/l10n_fr_rib/bank.py
index 992f6331adb..b5d284ac45d 100644
--- a/addons/l10n_fr_rib/bank.py
+++ b/addons/l10n_fr_rib/bank.py
@@ -50,12 +50,12 @@ class res_partner_bank(osv.osv):
# compute the key
key = 97 - (100 * int(rib)) % 97
if int(bank_acc.key) != key:
- raise osv.except_osv(_('Error'),
+ raise osv.except_osv(_('Error!'),
_("The RIB key %s does not correspond to the other codes: %s %s %s.") % \
(bank_acc.key, bank_acc.bank_code, bank_acc.office, bank_acc.rib_acc_number) )
if bank_acc.acc_number:
if not self.is_iban_valid(cr, uid, bank_acc.acc_number):
- raise osv.except_osv(_('Error'), _("The IBAN %s is not valid.") % bank_acc.acc_number)
+ raise osv.except_osv(_('Error!'), _("The IBAN %s is not valid.") % bank_acc.acc_number)
return True
def onchange_bank_id(self, cr, uid, ids, bank_id, context=None):
diff --git a/addons/marketing_campaign/i18n/marketing_campaign.pot b/addons/marketing_campaign/i18n/marketing_campaign.pot
index a1c06f6037d..4fc2c18936f 100644
--- a/addons/marketing_campaign/i18n/marketing_campaign.pot
+++ b/addons/marketing_campaign/i18n/marketing_campaign.pot
@@ -170,7 +170,7 @@ msgstr ""
#. module: marketing_campaign
#: code:addons/marketing_campaign/marketing_campaign.py:214
#, python-format
-msgid "You can not duplicate a campaign, it's not supported yet."
+msgid "You cannot duplicate a campaign, Not supported yet."
msgstr ""
#. module: marketing_campaign
@@ -638,7 +638,7 @@ msgstr ""
#. module: marketing_campaign
#: code:addons/marketing_campaign/marketing_campaign.py:148
#, python-format
-msgid "The campaign cannot be started: it doesn't have any starting activity. Modify campaign's activities to mark one as the starting point."
+msgid "The campaign cannot be started. It does not have any starting activity. Modify campaign's activities to mark one as the starting point."
msgstr ""
#. module: marketing_campaign
@@ -797,7 +797,7 @@ msgstr ""
#. module: marketing_campaign
#: code:addons/marketing_campaign/marketing_campaign.py:136
#, python-format
-msgid "The campaign cannot be started: there are no activities in it."
+msgid "The campaign cannot be started. There are no activities in it."
msgstr ""
#. module: marketing_campaign
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 417bd694624..e268f3db5dd 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -53,7 +53,7 @@ def _find_fieldname(model, field):
for fn in all_columns:
if all_columns[fn] is field:
return fn
- raise ValueError('field not found: %r' % (field,))
+ raise ValueError('Field not found: %r' % (field,))
class selection_converter(object):
"""Format the selection in the browse record objects"""
@@ -133,7 +133,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
campaign = self.browse(cr, uid, ids[0])
if not campaign.activity_ids:
- raise osv.except_osv(_("Error"), _("The campaign cannot be started: there are no activities in it."))
+ raise osv.except_osv(_("Error"), _("The campaign cannot be started. There are no activities in it."))
has_start = False
has_signal_without_from = False
@@ -145,7 +145,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
has_signal_without_from = True
if not has_start and not has_signal_without_from:
- raise osv.except_osv(_("Error"), _("The campaign cannot be started: it doesn't have any starting activity. Modify campaign's activities to mark one as the starting point."))
+ raise osv.except_osv(_("Error"), _("The campaign cannot be started. It does not have any starting activity. Modify campaign's activities to mark one as the starting point."))
return self.write(cr, uid, ids, {'state': 'running'})
@@ -172,7 +172,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
#dead code
def _signal(self, cr, uid, record, signal, run_existing=True, context=None):
if not signal:
- raise ValueError('signal cannot be False')
+ raise ValueError('Signal cannot be False.')
Workitems = self.pool.get('marketing.campaign.workitem')
domain = [('object_id.model', '=', record._table._name),
@@ -211,7 +211,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
# prevent duplication until the server properly duplicates several levels of nested o2m
def copy(self, cr, uid, id, default=None, context=None):
- raise osv.except_osv(_("Operation not supported"), _("You can not duplicate a campaign, it's not supported yet."))
+ raise osv.except_osv(_("Operation not supported"), _("You cannot duplicate a campaign, Not supported yet."))
def _find_duplicate_workitems(self, cr, uid, record, campaign_rec, context=None):
"""Finds possible duplicates workitems for a record in this campaign, based on a uniqueness
@@ -505,7 +505,7 @@ class marketing_campaign_activity(osv.osv):
method = '_process_wi_%s' % (activity.type,)
action = getattr(self, method, None)
if not action:
- raise NotImplementedError('method %r in not implemented on %r object' % (method, self))
+ raise NotImplementedError('Method %r is not implemented on %r object.' % (method, self))
workitem_obj = self.pool.get('marketing.campaign.workitem')
workitem = workitem_obj.browse(cr, uid, wi_id, context=context)
@@ -539,7 +539,7 @@ class marketing_campaign_transition(osv.osv):
assert len(ids) == 1
transition = self.browse(cr, uid, ids[0], context=context)
if transition.trigger != 'time':
- raise ValueError('Delta is only relevant for timed transiton')
+ raise ValueError('Delta is only relevant for timed transition.')
return relativedelta(**{str(transition.interval_type): transition.interval_nbr})
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index b75a813f285..f6bcc5087e6 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -407,10 +407,10 @@ class Partner(osv.osv):
fpos_id = partner.property_account_position and partner.property_account_position.id or False
addr = self.address_get(cr, uid, [partner.id], ['invoice'])
if partner.free_member:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_("Partner is a free Member."))
if not addr.get('invoice', False):
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_("Partner doesn't have an address to make the invoice."))
quantity = 1
line_value = {
diff --git a/addons/mrp/i18n/mrp.pot b/addons/mrp/i18n/mrp.pot
index 1223b21f55d..9230657df97 100644
--- a/addons/mrp/i18n/mrp.pot
+++ b/addons/mrp/i18n/mrp.pot
@@ -668,7 +668,7 @@ msgstr ""
#: code:addons/mrp/wizard/change_production_qty.py:78
#: code:addons/mrp/wizard/change_production_qty.py:83
#, python-format
-msgid "Couldn't find bill of material for product"
+msgid "Cannot find bill of material for this product."
msgstr ""
#. module: mrp
@@ -791,7 +791,7 @@ msgstr ""
#. module: mrp
#: code:addons/mrp/mrp.py:626
#, python-format
-msgid "Could not cancel manufacturing order !"
+msgid "Cannot cancel manufacturing order!"
msgstr ""
#. module: mrp
@@ -819,7 +819,7 @@ msgstr ""
#. module: mrp
#: code:addons/mrp/mrp.py:503
#, python-format
-msgid "Cannot delete a manufacturing order in state '%s'"
+msgid "Cannot delete a manufacturing order in state '%s'."
msgstr ""
#. module: mrp
@@ -1275,7 +1275,7 @@ msgstr ""
#. module: mrp
#: code:addons/mrp/mrp.py:603
#, python-format
-msgid "Couldn't find a bill of material for this product."
+msgid "Cannot find a bill of material for this product."
msgstr ""
#. module: mrp
@@ -1881,7 +1881,7 @@ msgstr ""
#: code:addons/mrp/wizard/change_production_qty.py:78
#: code:addons/mrp/wizard/change_production_qty.py:83
#, python-format
-msgid "Error"
+msgid "Error!"
msgstr ""
#. module: mrp
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index ea219621ea6..749d95c0c23 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -451,10 +451,10 @@ class mrp_production(osv.osv):
def _src_id_default(self, cr, uid, ids, context=None):
src_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
return src_location_id.id
-
+
def _dest_id_default(self, cr, uid, ids, context=None):
dest_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
- return dest_location_id.id
+ return dest_location_id.id
_columns = {
'name': fields.char('Reference', size=64, required=True),
@@ -530,7 +530,7 @@ class mrp_production(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for production in self.browse(cr, uid, ids, context=context):
if production.state not in ('draft', 'cancel'):
- raise osv.except_osv(_('Invalid action !'), _('Cannot delete a manufacturing order in state \'%s\'') % production.state)
+ raise osv.except_osv(_('Invalid Action!'), _('Cannot delete a manufacturing order in state \'%s\'.') % production.state)
return super(mrp_production, self).unlink(cr, uid, ids, context=context)
def copy(self, cr, uid, id, default=None, context=None):
@@ -632,7 +632,7 @@ class mrp_production(osv.osv):
self.write(cr, uid, [production.id], {'bom_id': bom_id, 'routing_id': routing_id})
if not bom_id:
- raise osv.except_osv(_('Error'), _("Couldn't find a bill of material for this product."))
+ raise osv.except_osv(_('Error!'), _("Cannot find a bill of material for this product."))
factor = uom_obj._compute_qty(cr, uid, production.product_uom.id, production.product_qty, bom_point.product_uom.id)
res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, properties, routing_id=production.routing_id.id)
results = res[0]
@@ -655,7 +655,7 @@ class mrp_production(osv.osv):
for production in self.browse(cr, uid, ids, context=context):
if production.state == 'confirmed' and production.picking_id.state not in ('draft', 'cancel'):
raise osv.except_osv(
- _('Could not cancel manufacturing order !'),
+ _('Cannot cancel manufacturing order!'),
_('You must first cancel related internal picking attached to this manufacturing order.'))
if production.move_created_ids:
move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids])
@@ -1041,7 +1041,7 @@ class mrp_production(osv.osv):
pick_obj = self.pool.get('stock.picking')
pick_obj.force_assign(cr, uid, [prod.picking_id.id for prod in self.browse(cr, uid, ids)])
return True
-
+
# ---------------------------------------------------
# OpenChatter methods and notifications
# ---------------------------------------------------
diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py
index e85ceda7dd5..6c021c069ab 100644
--- a/addons/mrp/wizard/change_production_qty.py
+++ b/addons/mrp/wizard/change_production_qty.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
@@ -26,7 +26,7 @@ import decimal_precision as dp
class change_production_qty(osv.osv_memory):
_name = 'change.production.qty'
_description = 'Change Quantity of Products'
-
+
_columns = {
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
}
@@ -36,17 +36,17 @@ class change_production_qty(osv.osv_memory):
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param fields: List of fields for which we want default values
- @param context: A standard dictionary
- @return: A dictionary which of fields with values.
- """
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
+ """
if context is None:
context = {}
- res = super(change_production_qty, self).default_get(cr, uid, fields, context=context)
+ res = super(change_production_qty, self).default_get(cr, uid, fields, context=context)
prod_obj = self.pool.get('mrp.production')
prod = prod_obj.browse(cr, uid, context.get('active_id'), context=context)
if 'product_qty' in fields:
- res.update({'product_qty': prod.product_qty})
+ res.update({'product_qty': prod.product_qty})
return res
def _update_product_to_produce(self, cr, uid, prod, qty, context=None):
@@ -55,17 +55,17 @@ class change_production_qty(osv.osv_memory):
move_lines_obj.write(cr, uid, [m.id], {'product_qty': qty})
def change_prod_qty(self, cr, uid, ids, context=None):
- """
+ """
Changes the Quantity of Product.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param ids: List of IDs selected
- @param context: A standard dictionary
+ @param ids: List of IDs selected
+ @param context: A standard dictionary
@return:
"""
record_id = context and context.get('active_id',False)
- assert record_id, _('Active Id is not found')
+ assert record_id, _('Active Id not found')
prod_obj = self.pool.get('mrp.production')
bom_obj = self.pool.get('mrp.bom')
for wiz_qty in self.browse(cr, uid, ids, context=context):
@@ -80,12 +80,12 @@ class change_production_qty(osv.osv_memory):
if not bom_point:
bom_id = bom_obj._bom_find(cr, uid, prod.product_id.id, prod.product_uom.id)
if not bom_id:
- raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
+ raise osv.except_osv(_('Error!'), _("Cannot find bill of material for this product."))
prod_obj.write(cr, uid, [prod.id], {'bom_id': bom_id})
bom_point = bom_obj.browse(cr, uid, [bom_id])[0]
if not bom_id:
- raise osv.except_osv(_('Error'), _("Couldn't find bill of material for product"))
+ raise osv.except_osv(_('Error!'), _("Cannot find bill of material for this product."))
factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor
res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, [])
diff --git a/addons/mrp/wizard/mrp_product_produce.py b/addons/mrp/wizard/mrp_product_produce.py
index a6bd61ac0ff..d014b28b186 100644
--- a/addons/mrp/wizard/mrp_product_produce.py
+++ b/addons/mrp/wizard/mrp_product_produce.py
@@ -61,7 +61,7 @@ class mrp_product_produce(osv.osv_memory):
def do_produce(self, cr, uid, ids, context=None):
production_id = context.get('active_id', False)
- assert production_id, "Production Id should be specified in context as a Active ID"
+ assert production_id, "Production Id should be specified in context as a Active ID."
data = self.browse(cr, uid, ids[0], context=context)
self.pool.get('mrp.production').action_produce(cr, uid, production_id,
data.product_qty, data.mode, context=context)
diff --git a/addons/mrp_operations/i18n/mrp_operations.pot b/addons/mrp_operations/i18n/mrp_operations.pot
index fbcddca8dbc..4642c7cc917 100644
--- a/addons/mrp_operations/i18n/mrp_operations.pot
+++ b/addons/mrp_operations/i18n/mrp_operations.pot
@@ -164,7 +164,7 @@ msgstr ""
#. module: mrp_operations
#: code:addons/mrp_operations/mrp_operations.py:486
#, python-format
-msgid "There is no Operation to be cancelled!"
+msgid "No operation to cancel."
msgstr ""
#. module: mrp_operations
@@ -444,7 +444,7 @@ msgstr ""
#. module: mrp_operations
#: code:addons/mrp_operations/mrp_operations.py:466
#, python-format
-msgid "Operation has already started !Youcan either Pause/Finish/Cancel the operation"
+msgid "Operation has already started! You can either Pause/Finish/Cancel the operation.'))"
msgstr ""
#. module: mrp_operations
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index cab7a109991..8692dab5c87 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -513,7 +513,7 @@ class mrp_operations_operation(osv.osv):
code_lst.append(oper.code_id.start_stop)
if code.start_stop=='start':
if 'start' in code_lst:
- raise osv.except_osv(_('Sorry!'),_('Operation has already started !' 'Youcan either Pause/Finish/Cancel the operation'))
+ raise osv.except_osv(_('Sorry!'),_('Operation has already started! You can either Pause/Finish/Cancel the operation.'))
return False
if code.start_stop=='pause':
if code_lst[len(code_lst)-1]!='resume' and code_lst[len(code_lst)-1]!='start':
@@ -533,7 +533,7 @@ class mrp_operations_operation(osv.osv):
return False
if code.start_stop=='cancel':
if not 'start' in code_lst :
- raise osv.except_osv(_('Error!'),_('There is no Operation to be cancelled!'))
+ raise osv.except_osv(_('Error!'),_('No operation to cancel.'))
return False
if 'done' in code_lst:
raise osv.except_osv(_('Error!'),_('Operation is already finished!'))
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index c9b31dcc5cc..c9dc3f5e7bc 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -333,7 +333,7 @@ class mrp_repair(osv.osv):
self.write(cr, uid, [o.id], {'state': 'confirmed'})
for line in o.operations:
if line.product_id.track_production and not line.prodlot_id:
- raise osv.except_osv(_('Warning'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
+ raise osv.except_osv(_('Warning!'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
mrp_line_obj.write(cr, uid, [l.id for l in o.operations], {'state': 'confirmed'})
self.set_confirm_send_note(cr, uid, ids)
return True
@@ -387,7 +387,7 @@ class mrp_repair(osv.osv):
inv_obj.write(cr, uid, [inv_id], invoice_vals, context=context)
else:
if not repair.partner_id.property_account_receivable:
- raise osv.except_osv(_('Error !'), _('No account defined for partner "%s".') % repair.partner_id.name )
+ raise osv.except_osv(_('Error!'), _('No account defined for partner "%s".') % repair.partner_id.name )
account_id = repair.partner_id.property_account_receivable.id
inv = {
'name': repair.name,
@@ -415,7 +415,7 @@ class mrp_repair(osv.osv):
elif operation.product_id.categ_id.property_account_income_categ:
account_id = operation.product_id.categ_id.property_account_income_categ.id
else:
- raise osv.except_osv(_('Error !'), _('No account defined for product "%s".') % operation.product_id.name )
+ raise osv.except_osv(_('Error!'), _('No account defined for product "%s".') % operation.product_id.name )
invoice_line_id = inv_line_obj.create(cr, uid, {
'invoice_id': inv_id,
@@ -437,14 +437,14 @@ class mrp_repair(osv.osv):
else:
name = fee.name
if not fee.product_id:
- raise osv.except_osv(_('Warning !'), _('No product defined on Fees!'))
+ raise osv.except_osv(_('Warning!'), _('No product defined on Fees!'))
if fee.product_id.property_account_income:
account_id = fee.product_id.property_account_income.id
elif fee.product_id.categ_id.property_account_income_categ:
account_id = fee.product_id.categ_id.property_account_income_categ.id
else:
- raise osv.except_osv(_('Error !'), _('No account defined for product "%s".') % fee.product_id.name)
+ raise osv.except_osv(_('Error!'), _('No account defined for product "%s".') % fee.product_id.name)
invoice_fee_id = inv_line_obj.create(cr, uid, {
'invoice_id': inv_id,
@@ -562,41 +562,41 @@ class mrp_repair(osv.osv):
self.write(cr, uid, [repair.id], {'state': 'done'})
self.set_done_send_note(cr, uid, [repair.id], context)
return res
-
+
def create(self, cr, uid, vals, context=None):
repair_id = super(mrp_repair, self).create(cr, uid, vals, context=context)
self.create_send_note(cr, uid, [repair_id], context=context)
return repair_id
-
+
def create_send_note(self, cr, uid, ids, context=None):
for repair in self.browse(cr, uid, ids, context):
message = _("Repair Order for %s has been created." % (repair.product_id.name))
self.message_append_note(cr, uid, [repair.id], body=message, context=context)
return True
-
+
def set_start_send_note(self, cr, uid, ids, context=None):
for repair in self.browse(cr, uid, ids, context):
message = _("Repair Order for %s has been started." % (repair.product_id.name))
self.message_append_note(cr, uid, [repair.id], body=message, context=context)
return True
-
+
def set_toinvoiced_send_note(self, cr, uid, ids, context=None):
for repair in self.browse(cr, uid, ids, context):
message = _("Draft Invoice of %s %s waiting for validation.") % (repair.invoice_id.amount_total, repair.invoice_id.currency_id.symbol)
self.message_append_note(cr, uid, [repair.id], body=message, context=context)
return True
-
+
def set_confirm_send_note(self, cr, uid, ids, context=None):
for repair in self.browse(cr, uid, ids, context):
message = _( "Repair Order for %s has been accepted." % (repair.product_id.name))
self.message_append_note(cr, uid, [repair.id], body=message, context=context)
return True
-
+
def set_cancel_send_note(self, cr, uid, ids, context=None):
message = _("Repair has been cancelled.")
self.message_append_note(cr, uid, ids, body=message, context=context)
return True
-
+
def set_ready_send_note(self, cr, uid, ids, context=None):
message = _("Repair Order is now ready to repair.")
self.message_append_note(cr, uid, ids, body=message, context=context)
diff --git a/addons/mrp_repair/wizard/cancel_repair.py b/addons/mrp_repair/wizard/cancel_repair.py
index 2d65c93847d..af8b2278c63 100644
--- a/addons/mrp_repair/wizard/cancel_repair.py
+++ b/addons/mrp_repair/wizard/cancel_repair.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
@@ -31,42 +31,42 @@ class repair_cancel(osv.osv_memory):
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param ids: List of IDs selected
- @param context: A standard dictionary
- @return:
+ @param ids: List of IDs selected
+ @param context: A standard dictionary
+ @return:
"""
if context is None:
context = {}
record_id = context and context.get('active_id', False) or False
- assert record_id, _('Active ID is not Found')
+ assert record_id, _('Active ID not Found')
repair_order_obj = self.pool.get('mrp.repair')
repair_line_obj = self.pool.get('mrp.repair.line')
repair_order = repair_order_obj.browse(cr, uid, record_id, context=context)
-
+
if repair_order.invoiced or repair_order.invoice_method == 'none':
- repair_order_obj.action_cancel(cr, uid, [record_id], context=context)
+ repair_order_obj.action_cancel(cr, uid, [record_id], context=context)
else:
raise osv.except_osv(_('Warning!'),_('Repair order is not invoiced.'))
-
+
return {'type': 'ir.actions.act_window_close'}
-
+
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
""" Changes the view dynamically
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
- @param context: A standard dictionary
+ @param context: A standard dictionary
@return: New arch of view.
"""
if context is None:
context = {}
res = super(repair_cancel, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
- record_id = context and context.get('active_id', False) or False
+ record_id = context and context.get('active_id', False) or False
active_model = context.get('active_model')
-
+
if not record_id or (active_model and active_model != 'mrp.repair'):
return res
-
+
repair_order = self.pool.get('mrp.repair').browse(cr, uid, record_id, context=context)
if not repair_order.invoiced:
res['arch'] = """
@@ -77,7 +77,7 @@ class repair_cancel(osv.osv_memory):
-
+
"""
return res
diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot
index 0246ca65227..8c766f112f2 100644
--- a/addons/point_of_sale/i18n/point_of_sale.pot
+++ b/addons/point_of_sale/i18n/point_of_sale.pot
@@ -496,7 +496,7 @@ msgstr ""
#. module: point_of_sale
#: code:addons/point_of_sale/wizard/pos_box_entries.py:105
#, python-format
-msgid "Please check that income account is set to %s"
+msgid "Please check that income account is set to %s."
msgstr ""
#. module: point_of_sale
@@ -1146,7 +1146,7 @@ msgstr ""
#, python-format
msgid ""
"There is no receivable account defined to make payment for the partner: \"%s"
-"\" (id:%d)"
+"\" (id:%d)."
msgstr ""
#. module: point_of_sale
@@ -1201,7 +1201,7 @@ msgstr ""
#. module: point_of_sale
#: code:addons/point_of_sale/point_of_sale.py:282
#, python-format
-msgid "There is no receivable account defined to make payment"
+msgid "There is no receivable account defined to make payment."
msgstr ""
#. module: point_of_sale
@@ -1671,7 +1671,7 @@ msgstr ""
#. module: point_of_sale
#: help:pos.order,user_id:0
msgid ""
-"Person who uses the the cash register. It could be a reliever, a student or "
+"Person who uses the the cash register. It can be a reliever, a student or "
"an interim employee."
msgstr ""
@@ -1852,7 +1852,7 @@ msgstr ""
#. module: point_of_sale
#: code:addons/point_of_sale/point_of_sale.py:472
#, python-format
-msgid "There is no income account defined for this product: \"%s\" (id:%d)"
+msgid "There is no income account defined for this product: \"%s\" (id:%d)."
msgstr ""
#. module: point_of_sale
@@ -2523,7 +2523,7 @@ msgstr ""
#. module: point_of_sale
#: code:addons/point_of_sale/wizard/pos_box_out.py:86
#, python-format
-msgid "please check that account is set to %s"
+msgid "please check that account is set to %s."
msgstr ""
#. module: point_of_sale
@@ -2707,7 +2707,7 @@ msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/point_of_sale/static/src/xml/pos.xml:145
msgid ""
-"There are pending operations that could not be saved into the database, are "
+"There are pending operations that cannot be saved into the database, are "
"you sure you want to exit?"
msgstr ""
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 3ee61c45765..c7d07b9eb5f 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -301,8 +301,8 @@ class pos_session(osv.osv):
return True
_constraints = [
- (_check_unicity, "You can not create two active sessions with the same responsible!", ['user_id', 'state']),
- (_check_pos_config, "You can not create two active sessions related to the same point of sale!", ['config_id']),
+ (_check_unicity, "You cannot create two active sessions with the same responsible!", ['user_id', 'state']),
+ (_check_pos_config, "You cannot create two active sessions related to the same point of sale!", ['config_id']),
]
def create(self, cr, uid, values, context=None):
@@ -366,7 +366,7 @@ class pos_session(osv.osv):
if abs(st.difference) > st.journal_id.amount_authorized_diff:
# The pos manager can close statements with maximums.
if not self.pool.get('ir.model.access').check_groups(cr, uid, "point_of_sale.group_pos_manager"):
- raise osv.except_osv( _('Error !'),
+ raise osv.except_osv( _('Error!'),
_("Your ending balance is too different from the theorical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff))
if st.difference:
if st.difference > 0.0:
@@ -376,7 +376,7 @@ class pos_session(osv.osv):
account_id = st.journal_id.loss_account_id.id
name= _('Point of Sale Loss')
if not account_id:
- raise osv.except_osv( _('Error !'),
+ raise osv.except_osv( _('Error!'),
_("Please set your profit and loss accounts on your payment method '%s'.") % (st.journal_id.name,))
bsl.create(cr, uid, {
'statement_id': st.id,
@@ -403,8 +403,8 @@ class pos_session(osv.osv):
for order in session.order_ids:
if order.state != 'paid':
raise osv.except_osv(
- _('Error !'),
- _("You can not confirm all orders of this session, because they have not the 'paid' status"))
+ _('Error!'),
+ _("You cannot confirm all orders of this session, because they have not the 'paid' status"))
else:
wf_service.trg_validate(uid, 'pos.order', order.id, 'done', cr)
@@ -513,7 +513,7 @@ class pos_order(osv.osv):
'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True),
'shop_id': fields.related('session_id', 'config_id', 'shop_id', relation='sale.shop', type='many2one', string='Shop', store=True, readonly=True),
'date_order': fields.datetime('Order Date', readonly=True, select=True),
- 'user_id': fields.many2one('res.users', 'Salesman', help="Person who uses the the cash register. It could be a reliever, a student or an interim employee."),
+ 'user_id': fields.many2one('res.users', 'Salesman', help="Person who uses the the cash register. It can be a reliever, a student or an interim employee."),
'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_total': fields.function(_amount_all, string='Total', multi='all'),
'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
@@ -674,10 +674,10 @@ class pos_order(osv.osv):
if not args['account_id']:
if not args['partner_id']:
- msg = _('There is no receivable account defined to make payment')
+ msg = _('There is no receivable account defined to make payment.')
else:
- msg = _('There is no receivable account defined to make payment for the partner: "%s" (id:%d)') % (order.partner_id.name, order.partner_id.id,)
- raise osv.except_osv(_('Configuration Error !'), msg)
+ msg = _('There is no receivable account defined to make payment for the partner: "%s" (id:%d).') % (order.partner_id.name, order.partner_id.id,)
+ raise osv.except_osv(_('Configuration Error!'), msg)
context.pop('pos_session_id', False)
@@ -693,7 +693,7 @@ class pos_order(osv.osv):
break
if not statement_id:
- raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
+ raise osv.except_osv(_('Error!'), _('You have to open at least one cashbox.'))
args.update({
'statement_id' : statement_id,
@@ -759,7 +759,7 @@ class pos_order(osv.osv):
continue
if not order.partner_id:
- raise osv.except_osv(_('Error'), _('Please provide a partner for the sale.'))
+ raise osv.except_osv(_('Error!'), _('Please provide a partner for the sale.'))
acc = order.partner_id.property_account_receivable.id
inv = {
@@ -839,7 +839,7 @@ class pos_order(osv.osv):
#session_ids = set(order.session_id for order in self.browse(cr, uid, ids, context=context))
if session and not all(session.id == order.session_id.id for order in self.browse(cr, uid, ids, context=context)):
- raise osv.except_osv(_('Error!'), _('The selected orders do not have the same session !'))
+ raise osv.except_osv(_('Error!'), _('Selected orders do not have the same session!'))
current_company = user_proxy.browse(cr, uid, uid, context=context).company_id
@@ -944,8 +944,8 @@ class pos_order(osv.osv):
elif line.product_id.categ_id.property_account_income_categ.id:
income_account = line.product_id.categ_id.property_account_income_categ.id
else:
- raise osv.except_osv(_('Error !'), _('There is no income '\
- 'account defined for this product: "%s" (id:%d)') \
+ raise osv.except_osv(_('Error!'), _('Please define income '\
+ 'account for this product: "%s" (id:%d).') \
% (line.product_id.name, line.product_id.id, ))
# Empty the tax list as long as there is no tax code:
diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py
index 0e1cd98fb47..0677ac0e8d9 100644
--- a/addons/point_of_sale/report/pos_invoice.py
+++ b/addons/point_of_sale/report/pos_invoice.py
@@ -43,7 +43,7 @@ class pos_invoice(report_sxw.rml_parse):
if order.invoice_id and order.invoice_id not in iids:
if not order.invoice_id:
- raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.'))
+ raise osv.except_osv(_('Error!'), _('Please create an invoice for this sale.'))
iids.append(order.invoice_id)
nids.append(order.invoice_id.id)
data['ids'] = nids
diff --git a/addons/point_of_sale/wizard/pos_box.py b/addons/point_of_sale/wizard/pos_box.py
index a79ab0fa779..8c3b0aa4607 100644
--- a/addons/point_of_sale/wizard/pos_box.py
+++ b/addons/point_of_sale/wizard/pos_box.py
@@ -20,7 +20,7 @@ class PosBox(CashBox):
bank_statements = [record.cash_register_id for record in records if record.cash_register_id]
if not bank_statements:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error!'),
_("There is no cash register for this PoS Session"))
return self._run(cr, uid, ids, bank_statements, context=context)
diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py
index db54249d883..2920be50130 100644
--- a/addons/point_of_sale/wizard/pos_box_entries.py
+++ b/addons/point_of_sale/wizard/pos_box_entries.py
@@ -43,7 +43,7 @@ def get_journal(self, cr, uid, context=None):
res = statement_obj.read(cr, uid, obj_ids, ['journal_id'], context=context)
res = [(r['journal_id']) for r in res]
if not len(res) and context:
- raise osv.except_osv(_('Error !'), _('You do not have any open cash register. You must create a payment method or open a cash register.'))
+ raise osv.except_osv(_('Error!'), _('You do not have any open cash register. You must create a payment method or open a cash register.'))
return res
class pos_box_entries(osv.osv_memory):
@@ -115,12 +115,12 @@ class pos_box_entries(osv.osv_memory):
curr_company = res_obj.browse(cr, uid, uid, context=context).company_id.id
statement_id = statement_obj.search(cr, uid, [('journal_id', '=', int(data['journal_id'])), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context)
if not statement_id:
- raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
+ raise osv.except_osv(_('Error!'), _('You have to open at least one cashbox.'))
product = product_obj.browse(cr, uid, int(data['product_id']))
acc_id = product.property_account_income or product.categ_id.property_account_income_categ
if not acc_id:
- raise osv.except_osv(_('Error !'), _('Please check that income account is set to %s')%(product_obj.browse(cr, uid, data['product_id']).name))
+ raise osv.except_osv(_('Error!'), _('Please check that income account is set to %s.')%(product_obj.browse(cr, uid, data['product_id']).name))
if statement_id:
statement_id = statement_id[0]
if not statement_id:
diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py
index f09ea4e6d6d..e8366b019a4 100644
--- a/addons/point_of_sale/wizard/pos_box_out.py
+++ b/addons/point_of_sale/wizard/pos_box_out.py
@@ -86,9 +86,9 @@ class pos_box_out(osv.osv_memory):
product = product_obj.browse(cr, uid, data['product_id'], context=context)
acc_id = product.property_account_expense or product.categ_id.property_account_expense_categ
if not acc_id:
- raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(product.name))
+ raise osv.except_osv(_('Error!'), _('please check that account is set to %s.')%(product.name))
if not statement_ids:
- raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
+ raise osv.except_osv(_('Error!'), _('You have to open at least one cashbox.'))
vals['statement_id'] = statement_ids[0]
vals['journal_id'] = data['journal_id']
vals['account_id'] = acc_id.id
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index a5f4ae252d8..572f6470c34 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -46,7 +46,7 @@ class pos_open_statement(osv.osv_memory):
st_ids = []
j_ids = journal_obj.search(cr, uid, [('journal_user','=',1)], context=context)
if not j_ids:
- raise osv.except_osv(_('No Cash Register Defined !'), _('You must define which payment method must be available through the point of sale by reusing existing bank and cash through "Accounting > Configuration > Financial Accounting > Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend > Configuration > Payment Methods".'))
+ raise osv.except_osv(_('No Cash Register Defined !'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".'))
for journal in journal_obj.browse(cr, uid, j_ids, context=context):
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context)
@@ -60,11 +60,11 @@ class pos_open_statement(osv.osv_memory):
'journal_id': journal.id,
'user_id': uid,
'state': 'draft',
- 'name': number
+ 'name': number
})
statement_id = statement_obj.create(cr, uid, data, context=context)
st_ids.append(int(statement_id))
-
+
if journal.opening_control:
statement_obj.button_open(cr, uid, [statement_id], context)
@@ -74,7 +74,7 @@ class pos_open_statement(osv.osv_memory):
form_id = form_res and form_res[1] or False
search_res = mod_obj.get_object_reference(cr, uid, 'account', 'view_account_bank_statement_filter')
search_id = search_res and search_res[1] or False
-
+
return {
'type': 'ir.actions.act_window',
'name': _('List of Cash Registers'),
@@ -85,7 +85,7 @@ class pos_open_statement(osv.osv_memory):
'views': [(tree_id, 'tree'), (form_id, 'form')],
'search_view_id': search_id,
}
-
+
pos_open_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 1c83711abf7..ea473839005 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -135,8 +135,8 @@ class procurement_order(osv.osv):
if s['state'] in ['draft','cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid action !'),
- _('Cannot delete Procurement Order(s) which are in %s state!') % \
+ raise osv.except_osv(_('Invalid Action!'),
+ _('Cannot delete Procurement Order(s) which are in %s state.') % \
s['state'])
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
@@ -166,7 +166,7 @@ class procurement_order(osv.osv):
"""
return all(procurement.move_id.state == 'cancel' for procurement in self.browse(cr, uid, ids, context=context))
- #This Function is create to avoid a server side Error Like 'ERROR:tests.mrp:name 'check_move' is not defined'
+ #This Function is create to avoid a server side Error Like 'ERROR:tests.mrp:name 'check_move' is not defined'
def check_move(self, cr, uid, ids, context=None):
pass
@@ -277,7 +277,7 @@ class procurement_order(osv.osv):
if not res:
return False
return True
-
+
def check_buy(self, cr, uid, ids):
""" Checks product type.
@return: True or Product Id.
@@ -327,8 +327,8 @@ class procurement_order(osv.osv):
move_obj = self.pool.get('stock.move')
for procurement in self.browse(cr, uid, ids, context=context):
if procurement.product_qty <= 0.00:
- raise osv.except_osv(_('Data Insufficient !'),
- _('Please check the quantity in procurement order(s), it should not be 0 or less!'))
+ raise osv.except_osv(_('Insufficient Data!'),
+ _('Quantity in procurement order(s) must be greater than 0.'))
if procurement.product_id.type in ('product', 'consu'):
if not procurement.move_id:
source = procurement.location_id.id
@@ -359,7 +359,7 @@ class procurement_order(osv.osv):
message = _('From stock: products assigned.')
self.write(cr, uid, ids, {'state': 'running',
'message': message}, context=context)
- self.message_append_note(cr, uid, ids, body=message, context=context)
+ self.message_append_note(cr, uid, ids, body=message, context=context)
self.running_send_note(cr, uid, ids, context=context)
return True
@@ -392,7 +392,7 @@ class procurement_order(osv.osv):
if message:
message = _("Procurement '%s' is in exception: ") % (procurement.name) + message
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
- self.message_append_note(cr, uid, [procurement.id], body=message, context=context)
+ self.message_append_note(cr, uid, [procurement.id], body=message, context=context)
return ok
def action_produce_assign_service(self, cr, uid, ids, context=None):
@@ -607,7 +607,7 @@ class stock_warehouse_orderpoint(osv.osv):
v = {'product_uom': prod.uom_id.id}
return {'value': v}
return {}
-
+
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}
@@ -615,7 +615,7 @@ class stock_warehouse_orderpoint(osv.osv):
'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.orderpoint') or '',
})
return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context=context)
-
+
stock_warehouse_orderpoint()
class product_product(osv.osv):
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 75882c4f5dd..806d9683e68 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -174,7 +174,7 @@ class product_pricelist(osv.osv):
('date_end', '>=', date),
])
if len(pricelist_ids) != len(pricelist_version_ids):
- raise osv.except_osv(_('Warning !'), _("At least one pricelist has no active version !\nPlease create or activate one."))
+ raise osv.except_osv(_('Warning!'), _("At least one pricelist has no active version !\nPlease create or activate one."))
# product.product:
product_ids = [i[0] for i in products_by_qty_by_partner]
diff --git a/addons/product/product.py b/addons/product/product.py
index b0da88dfce8..1a9732a67c8 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -141,7 +141,7 @@ class product_uom(osv.osv):
context = {}
if from_unit.category_id.id <> to_unit.category_id.id:
if context.get('raise-exception', True):
- raise osv.except_osv(_('Error !'), _('Conversion from Product UoM %s to Default UoM %s is not possible as they both belong to different Category!.') % (from_unit.name,to_unit.name,))
+ raise osv.except_osv(_('Error!'), _('Conversion from Product UoM %s to Default UoM %s is not possible as they both belong to different Category!.') % (from_unit.name,to_unit.name,))
else:
return qty
amount = qty / from_unit.factor
@@ -168,12 +168,12 @@ class product_uom(osv.osv):
if value == 'reference':
return {'value': {'factor': 1, 'factor_inv': 1}}
return {}
-
+
def write(self, cr, uid, ids, vals, context=None):
if 'category_id' in vals:
for uom in self.browse(cr, uid, ids, context=context):
if uom.category_id.id != vals['category_id']:
- raise osv.except_osv(_('Warning'),_("Cannot change the category of existing Unit of Measure '%s'.") % (uom.name,))
+ raise osv.except_osv(_('Warning!'),_("Cannot change the category of existing Unit of Measure '%s'.") % (uom.name,))
return super(product_uom, self).write(cr, uid, ids, vals, context=context)
product_uom()
@@ -232,7 +232,7 @@ class product_category(osv.osv):
_parent_store = True
_parent_order = 'sequence, name'
_order = 'parent_left'
-
+
def _check_recursion(self, cr, uid, ids, context=None):
level = 100
while len(ids):
@@ -331,7 +331,7 @@ class product_template(osv.osv):
for product in self.browse(cr, uid, ids, context=context):
old_uom = product.uom_po_id
if old_uom.category_id.id != new_uom.category_id.id:
- raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may desactivate this product from the 'Procurement & Locations' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
+ raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may deactivate this product from the 'Procurement & Locations' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
return super(product_template, self).write(cr, uid, ids, vals, context=context)
_defaults = {
@@ -462,8 +462,8 @@ class product_product(osv.osv):
res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + \
(data['name'] or '') + (data['variants'] and (' - '+data['variants']) or '')
return res
-
-
+
+
def _get_main_product_supplier(self, cr, uid, product, context=None):
"""Determines the main (best) product supplier for ``product``,
returning the corresponding ``supplierinfo`` record, or False
diff --git a/addons/project/project.py b/addons/project/project.py
index 4ee2ad74e03..7e1880646c7 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -167,8 +167,8 @@ class project(osv.osv):
mail_alias = self.pool.get('mail.alias')
for proj in self.browse(cr, uid, ids):
if proj.tasks:
- raise osv.except_osv(_('Operation Not Permitted !'),
- _('You cannot delete a project containing tasks. You may disable it instead by unticking the Active checkbox.'))
+ raise osv.except_osv(_('Invalid Action!'),
+ _('You cannot delete a project containing tasks. You can either delete all the project\'s tasks and then delete the project or simply deactivate the project.'))
elif proj.alias_id:
alias_ids.append(proj.alias_id.id)
res = super(project, self).unlink(cr, uid, ids, *args, **kwargs)
@@ -203,7 +203,7 @@ class project(osv.osv):
project_ids = project_obj.search(cr, uid, [('message_ids.user_id.id', 'in', args[0][2])], context=context)
return [('id', 'in', project_ids)]
- # Lambda indirection method to avoid passing a copy of the overridable method when declaring the field
+ # Lambda indirection method to avoid passing a copy of the overridable method when declaring the field
_alias_models = lambda self, *args, **kwargs: self._get_alias_models(*args, **kwargs)
_columns = {
@@ -239,10 +239,10 @@ class project(osv.osv):
'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'task_count': fields.function(_task_count, type='integer', string="Open Tasks"),
'color': fields.integer('Color Index'),
- 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
+ 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
help="Internal email associated with this project. Incoming emails are automatically synchronized"
"with Tasks (or optionally Issues if the Issue Tracker module is installed)."),
- 'alias_model': fields.selection(_alias_models, "Alias Model", select=True, required=True,
+ 'alias_model': fields.selection(_alias_models, "Alias Model", select=True, required=True,
help="The kind of document created when an email is received on this project's email alias"),
'privacy_visibility': fields.selection([('public','Public'), ('followers','Followers Only')], 'Privacy / Visibility', required=True),
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
@@ -417,7 +417,7 @@ class project(osv.osv):
for project in projects:
if (not project.members) and force_members:
- raise osv.except_osv(_('Warning !'),_("You must assign members on the project '%s' !") % (project.name,))
+ raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s' !") % (project.name,))
resource_pool = self.pool.get('resource.resource')
@@ -525,7 +525,7 @@ def Project():
mail_alias = self.pool.get('mail.alias')
if not vals.get('alias_id'):
name = vals.pop('alias_name', None) or vals['name']
- alias_id = mail_alias.create_unique_alias(cr, uid,
+ alias_id = mail_alias.create_unique_alias(cr, uid,
{'alias_name': "project_"+short_name(name)},
model_name=vals.get('alias_model', 'project.task'),
context=context)
@@ -1133,7 +1133,7 @@ class task(base_stage, osv.osv):
#TO FIX:Kanban view doesn't raise warning
#stages = [stage.id for stage in t.project_id.type_ids]
#if new_stage not in stages:
- #raise osv.except_osv(_('Warning !'), _('Stage is not defined in the project.'))
+ #raise osv.except_osv(_('Warning!'), _('Stage is not defined in the project.'))
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
super(task,self).write(cr, uid, [t.id], write_vals, context=context)
self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
@@ -1273,7 +1273,7 @@ class account_analytic_account(osv.osv):
'use_tasks': fields.boolean('Tasks Mgmt.',help="If check,this contract will be available in the project menu and you will be able to manage tasks or track issues"),
'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),
}
-
+
def on_change_template(self, cr, uid, ids, template_id, context=None):
res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, context=context)
if template_id and 'value' in res:
@@ -1322,7 +1322,7 @@ class account_analytic_account(osv.osv):
project_obj = self.pool.get('project.project')
analytic_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])
if analytic_ids:
- raise osv.except_osv(_('Warning !'), _('Please delete the project linked with this account first.'))
+ raise osv.except_osv(_('Warning!'), _('Please delete the project linked with this account first.'))
return super(account_analytic_account, self).unlink(cr, uid, ids, *args, **kwargs)
class project_project(osv.osv):
diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py
index 373c8425a8c..04c9689cc27 100644
--- a/addons/project_gtd/wizard/project_gtd_empty.py
+++ b/addons/project_gtd/wizard/project_gtd_empty.py
@@ -49,7 +49,7 @@ class project_timebox_empty(osv.osv_memory):
ids = obj_tb.search(cr, uid, [], context=context)
if not len(ids):
- raise osv.except_osv(_('Error !'), _('No timebox child of this one !'))
+ raise osv.except_osv(_('Error!'), _('No timebox child of this one !'))
tids = obj_task.search(cr, uid, [('timebox_id', '=', context['active_id'])])
for task in obj_task.browse(cr, uid, tids, context):
if (task.state in ('cancel','done')) or (task.user_id.id <> uid):
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 7911135f5f1..935935e28ca 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -437,7 +437,7 @@ class project_issue(base_stage, osv.osv):
if case.task_id:
self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
else:
- raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
+ raise osv.except_osv(_('Warning!'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
self.case_set(cr, uid, ids, 'draft', data, context=context)
self.case_escalate_send_note(cr, uid, [case.id], context=context)
return True
diff --git a/addons/project_issue_sheet/i18n/project_issue_sheet.pot b/addons/project_issue_sheet/i18n/project_issue_sheet.pot
index 781effb40de..441e319d5fa 100644
--- a/addons/project_issue_sheet/i18n/project_issue_sheet.pot
+++ b/addons/project_issue_sheet/i18n/project_issue_sheet.pot
@@ -23,7 +23,7 @@ msgstr ""
#. module: project_issue_sheet
#: code:addons/project_issue_sheet/project_issue_sheet.py:57
#, python-format
-msgid "The Analytic Account is in pending !"
+msgid "The Analytic Account is pending !"
msgstr ""
#. module: project_issue_sheet
diff --git a/addons/project_issue_sheet/project_issue_sheet.py b/addons/project_issue_sheet/project_issue_sheet.py
index e9396f9d030..3d079cd2983 100644
--- a/addons/project_issue_sheet/project_issue_sheet.py
+++ b/addons/project_issue_sheet/project_issue_sheet.py
@@ -54,7 +54,7 @@ class project_issue(osv.osv):
result = {}
if account and account.state == 'pending':
- result = {'warning' : {'title' : _('Analytic Account'), 'message' : _('The Analytic Account is in pending !')}}
+ result = {'warning' : {'title' : _('Analytic Account'), 'message' : _('The Analytic Account is pending !')}}
return result
diff --git a/addons/project_timesheet/i18n/project_timesheet.pot b/addons/project_timesheet/i18n/project_timesheet.pot
index de25cca742b..358dae585a9 100644
--- a/addons/project_timesheet/i18n/project_timesheet.pot
+++ b/addons/project_timesheet/i18n/project_timesheet.pot
@@ -26,13 +26,13 @@ msgstr ""
#. module: project_timesheet
#: code:addons/project_timesheet/project_timesheet.py:55
#, python-format
-msgid "No employee defined for user \"%s\". You must create one."
+msgid "Please define employee for user \"%s\". You must create one."
msgstr ""
#. module: project_timesheet
#: code:addons/project_timesheet/project_timesheet.py:63
#, python-format
-msgid "No journal defined on the related employee.\n"
+msgid "Please define journal on the related employee.\n"
"Fill in the timesheet tab of the employee form."
msgstr ""
@@ -329,7 +329,7 @@ msgstr ""
#. module: project_timesheet
#: code:addons/project_timesheet/project_timesheet.py:59
#, python-format
-msgid "No product defined on the related employee.\n"
+msgid "Please define product on the related employee.\n"
"Fill in the timesheet tab of the employee form."
msgstr ""
@@ -355,7 +355,7 @@ msgstr ""
#. module: project_timesheet
#: code:addons/project_timesheet/project_timesheet.py:247
#, python-format
-msgid "You cannot select a Analytic Account which is in Close or Cancelled state"
+msgid "You cannot select a Analytic Account which is in Close or Cancelled state."
msgstr ""
#. module: project_timesheet
@@ -412,7 +412,7 @@ msgstr ""
#. module: project_timesheet
#: code:addons/project_timesheet/project_timesheet.py:70
#, python-format
-msgid "No product and product category property account defined on the related employee.\n"
+msgid "Please define product and product category property account on the related employee.\n"
"Fill in the timesheet tab of the employee form."
msgstr ""
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index 565710f5664..e4374f096fd 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -78,22 +78,22 @@ class project_work(osv.osv):
if not emp_id:
user_name = self.pool.get('res.users').read(cr, uid, [user_id], ['name'])[0]['name']
raise osv.except_osv(_('Bad Configuration !'),
- _('No employee defined for user "%s". You must create one.')% (user_name,))
+ _('Please define employee for user "%s". You must create one.')% (user_name,))
emp = self.pool.get('hr.employee').browse(cr, uid, emp_id[0])
if not emp.product_id:
raise osv.except_osv(_('Bad Configuration !'),
- _('No product defined on the related employee.\nFill in the timesheet tab of the employee form.'))
+ _('Please define product on the related employee.\nFill in the timesheet tab of the employee form.'))
if not emp.journal_id:
raise osv.except_osv(_('Bad Configuration !'),
- _('No journal defined on the related employee.\nFill in the timesheet tab of the employee form.'))
+ _('Please define journal on the related employee.\nFill in the timesheet tab of the employee form.'))
a = emp.product_id.product_tmpl_id.property_account_expense.id
if not a:
a = emp.product_id.categ_id.property_account_expense_categ.id
if not a:
raise osv.except_osv(_('Bad Configuration !'),
- _('No product and product category property account defined on the related employee.\nFill in the timesheet tab of the employee form.'))
+ _('Please define product and product category property account on the related employee.\nFill in the timesheet tab of the employee form.'))
res['product_id'] = emp.product_id.id
res['journal_id'] = emp.journal_id.id
res['general_account_id'] = a
@@ -116,7 +116,7 @@ class project_work(osv.osv):
vals_line['product_id'] = result['product_id']
vals_line['date'] = vals['date'][:10]
- #calculate quantity based on employee's product's uom
+ #calculate quantity based on employee's product's uom
vals_line['unit_amount'] = vals['hours']
default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id
@@ -254,7 +254,7 @@ class res_partner(osv.osv):
def unlink(self, cursor, user, ids, context=None):
parnter_id=self.pool.get('project.project').search(cursor, user, [('partner_id', 'in', ids)])
if parnter_id:
- raise osv.except_osv(_('Invalid action !'), _('You cannot delete a partner which is assigned to project, we suggest you to uncheck the active box!'))
+ raise osv.except_osv(_('Invalid Action!'), _('You cannot delete a partner which is assigned to project, but you can uncheck the active box.'))
return super(res_partner,self).unlink(cursor, user, ids,
context=context)
res_partner()
@@ -270,7 +270,7 @@ class account_analytic_line(osv.osv):
st = acc.to_invoice.id
res['value']['to_invoice'] = st or False
if acc.state == 'close' or acc.state == 'cancelled':
- raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state'))
- return res
+ raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
+ return res
account_analytic_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot
index 44355e26cea..d0b77b2ea66 100644
--- a/addons/purchase/i18n/purchase.pot
+++ b/addons/purchase/i18n/purchase.pot
@@ -61,7 +61,7 @@ msgstr ""
#. module: purchase
#: code:addons/purchase/purchase.py:236
#, python-format
-msgid "In order to delete a purchase order, it must be cancelled first!"
+msgid "In order to delete a purchase order, You must cancel it first.'))"
msgstr ""
#. module: purchase
@@ -391,9 +391,9 @@ msgid "Stock Move"
msgstr ""
#. module: purchase
-#: code:addons/purchase/purchase.py:419
+#: code:addons/purchase/purchase.py:506
#, python-format
-msgid "You must first cancel all invoices related to this purchase order."
+msgid "First cancel all invoices related to this purchase order."
msgstr ""
#. module: purchase
@@ -441,7 +441,7 @@ msgid "Order in last month"
msgstr ""
#. module: purchase
-#: code:addons/purchase/purchase.py:412
+#: code:addons/purchase/purchase.py:499
#, python-format
msgid "You must first cancel all receptions related to this purchase order."
msgstr ""
@@ -634,14 +634,13 @@ msgstr ""
#: code:addons/purchase/purchase.py:737
#, python-format
msgid ""
-"You have to select a partner in the purchase form !\n"
-"Please set one partner before choosing a product."
+"Select a partner in purchase order to choose a product."
msgstr ""
#. module: purchase
#: code:addons/purchase/purchase.py:349
#, python-format
-msgid "There is no purchase journal defined for this company: \"%s\" (id:%d)"
+msgid "Define purchase journal for this company: \"%s\" (id:%d)."
msgstr ""
#. module: purchase
@@ -671,9 +670,9 @@ msgid "Miscellaneous"
msgstr ""
#. module: purchase
-#: code:addons/purchase/purchase.py:769
+#: code:addons/purchase/purchase.py:924
#, python-format
-msgid "The selected supplier only sells this product by %s"
+msgid "The selected supplier only sells this product by %s."
msgstr ""
#. module: purchase
@@ -736,9 +735,9 @@ msgid "Receptions"
msgstr ""
#. module: purchase
-#: code:addons/purchase/purchase.py:285
+#: code:addons/purchase/purchase.py:370
#, python-format
-msgid "You cannot confirm a purchase order without any lines."
+msgid "You cannot confirm a purchase order without any purchase order line."
msgstr ""
#. module: purchase
@@ -1173,7 +1172,7 @@ msgid "Cancel Purchase Order"
msgstr ""
#. module: purchase
-#: code:addons/purchase/purchase.py:411 code:addons/purchase/purchase.py:418
+#: code:addons/purchase/purchase.py:498 code:addons/purchase/purchase.py:505
#, python-format
msgid "Unable to cancel this purchase order!"
msgstr ""
@@ -1745,7 +1744,7 @@ msgstr ""
#: code:addons/purchase/purchase.py:359
#: code:addons/purchase/wizard/purchase_line_invoice.py:112
#, python-format
-msgid "There is no expense account defined for this product: \"%s\" (id:%d)"
+msgid "Define expense account for this company: \"%s\" (id:%d)."
msgstr ""
#. module: purchase
@@ -1762,8 +1761,7 @@ msgstr ""
#: code:addons/purchase/purchase.py:735
#, python-format
msgid ""
-"You have to select a pricelist or a supplier in the purchase form !\n"
-"Please set one before choosing a product."
+"Select a price list for a supplier in the purchase form to choose a product."
msgstr ""
#. module: purchase
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index afdca95f544..b02e959301f 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -224,13 +224,13 @@ class purchase_order(osv.osv):
_inherit = ['ir.needaction_mixin', 'mail.thread']
_description = "Purchase Order"
_order = "name desc"
-
+
def create(self, cr, uid, vals, context=None):
order = super(purchase_order, self).create(cr, uid, vals, context=context)
if order:
self.create_send_note(cr, uid, [order], context=context)
return order
-
+
def unlink(self, cr, uid, ids, context=None):
purchase_orders = self.read(cr, uid, ids, ['state'], context=context)
unlink_ids = []
@@ -238,7 +238,7 @@ class purchase_order(osv.osv):
if s['state'] in ['draft','cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid action !'), _('In order to delete a purchase order, it must be cancelled first!'))
+ raise osv.except_osv(_('Invalid Action!'), _('In order to delete a purchase order, you must cancel it first.'))
# TODO: temporary fix in 5.0, to remove in 5.2 when subflows support
# automatically sending subflow.delete upon deletion
@@ -291,7 +291,7 @@ class purchase_order(osv.osv):
if not po.invoice_ids:
context.update({'active_ids' : [line.id for line in po.order_line]})
wizard_obj.makeInvoices(cr, uid, [], context=context)
-
+
for po in self.browse(cr, uid, ids, context=context):
inv_ids+= [invoice.id for invoice in po.invoice_ids]
res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
@@ -367,7 +367,7 @@ class purchase_order(osv.osv):
todo = []
for po in self.browse(cr, uid, ids, context=context):
if not po.order_line:
- raise osv.except_osv(_('Error !'),_('You cannot confirm a purchase order without any lines.'))
+ raise osv.except_osv(_('Error!'),_('You cannot confirm a purchase order without any purchase order line.'))
for line in po.order_line:
if line.state=='draft':
todo.append(line.id)
@@ -427,8 +427,8 @@ class purchase_order(osv.osv):
pay_acc_id = order.partner_id.property_account_payable.id
journal_ids = journal_obj.search(cr, uid, [('type', '=','purchase'),('company_id', '=', order.company_id.id)], limit=1)
if not journal_ids:
- raise osv.except_osv(_('Error !'),
- _('There is no purchase journal defined for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id))
+ raise osv.except_osv(_('Error!'),
+ _('Define purchase journal for this company: "%s" (id:%d).') % (order.company_id.name, order.company_id.id))
# generate invoice line correspond to PO line and link that to created invoice (inv_id) and PO line
inv_lines = []
@@ -438,7 +438,7 @@ class purchase_order(osv.osv):
if not acc_id:
acc_id = po_line.product_id.categ_id.property_account_expense_categ.id
if not acc_id:
- raise osv.except_osv(_('Error !'), _('There is no expense account defined for this product: "%s" (id:%d)') % (po_line.product_id.name, po_line.product_id.id,))
+ raise osv.except_osv(_('Error!'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
else:
acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category').id
fpos = order.fiscal_position or False
@@ -476,12 +476,12 @@ class purchase_order(osv.osv):
if res:
self.invoice_send_note(cr, uid, ids, res, context)
return res
-
+
def invoice_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'approved'}, context=context)
self.invoice_done_send_note(cr, uid, ids, context=context)
return True
-
+
def has_stockable_product(self,cr, uid, ids, *args):
for order in self.browse(cr, uid, ids):
for order_line in order.order_line:
@@ -495,15 +495,15 @@ class purchase_order(osv.osv):
for pick in purchase.picking_ids:
if pick.state not in ('draft','cancel'):
raise osv.except_osv(
- _('Unable to cancel this purchase order!'),
- _('You must first cancel all receptions related to this purchase order.'))
+ _('Unable to cancel this purchase order.'),
+ _('First cancel all receptions related to this purchase order.'))
for pick in purchase.picking_ids:
wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_cancel', cr)
for inv in purchase.invoice_ids:
if inv and inv.state not in ('cancel','draft'):
raise osv.except_osv(
- _('Unable to cancel this purchase order!'),
- _('You must first cancel all invoices related to this purchase order.'))
+ _('Unable to cancel this purchase order.'),
+ _('You must first cancel all receptions related to this purchase order.'))
if inv:
wf_service.trg_validate(uid, 'account.invoice', inv.id, 'invoice_cancel', cr)
self.write(cr,uid,ids,{'state':'cancel'})
@@ -727,18 +727,18 @@ class purchase_order(osv.osv):
wf_service.trg_redirect(uid, 'purchase.order', old_id, neworder_id, cr)
wf_service.trg_validate(uid, 'purchase.order', old_id, 'purchase_cancel', cr)
return orders_info
-
+
# --------------------------------------
# OpenChatter methods and notifications
# --------------------------------------
-
+
def get_needaction_user_ids(self, cr, uid, ids, context=None):
result = super(purchase_order, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'approved':
result[obj.id].append(obj.validator.id)
return result
-
+
def create_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, body=_("Request for quotation created."), context=context)
@@ -746,7 +746,7 @@ class purchase_order(osv.osv):
for obj in self.browse(cr, uid, ids, context=context):
self.message_subscribe(cr, uid, [obj.id], [obj.validator.id], context=context)
self.message_append_note(cr, uid, [obj.id], body=_("Quotation for %sconverted to a Purchase Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
-
+
def shipment_send_note(self, cr, uid, ids, picking_id, context=None):
for order in self.browse(cr, uid, ids, context=context):
for picking in (pck for pck in order.picking_ids if pck.id == picking_id):
@@ -755,21 +755,21 @@ class purchase_order(osv.osv):
picking_datetime = fields.DT.datetime.strptime(picking.min_date, DEFAULT_SERVER_DATETIME_FORMAT)
picking_date_str = fields.datetime.context_timestamp(cr, uid, picking_datetime, context=context).strftime(DATETIME_FORMATS_MAP['%+'] + " (%Z)")
self.message_append_note(cr, uid, [order.id], body=_("Shipment %sscheduled for %s.") % (picking.name, picking_date_str), context=context)
-
+
def invoice_send_note(self, cr, uid, ids, invoice_id, context=None):
for order in self.browse(cr, uid, ids, context=context):
for invoice in (inv for inv in order.invoice_ids if inv.id == invoice_id):
self.message_append_note(cr, uid, [order.id], body=_("Draft Invoice of %s %s is waiting for validation.") % (invoice.amount_total, invoice.currency_id.symbol), context=context)
-
+
def shipment_done_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("""Shipment received."""), context=context)
-
+
def invoice_done_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Invoice paid."), context=context)
-
+
def draft_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, body=_("Purchase Order has been set to draft."), context=context)
-
+
def 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=_("Purchase Order for %scancelled.") % (obj.partner_id.name), context=context)
@@ -886,9 +886,9 @@ class purchase_order_line(osv.osv):
# - check for the presence of partner_id and pricelist_id
if not pricelist_id:
- raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist or a supplier in the purchase form !\nPlease set one before choosing a product.'))
+ raise osv.except_osv(_('No Pricelist !'), _('Select a price list for a supplier in the purchase form to choose a product.'))
if not partner_id:
- raise osv.except_osv(_('No Partner!'), _('You have to select a partner in the purchase form !\nPlease set one partner before choosing a product.'))
+ raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.'))
# - determine name and notes based on product in partner lang.
lang = res_partner.browse(cr, uid, partner_id).lang
@@ -908,7 +908,7 @@ class purchase_order_line(osv.osv):
uom_id = product_uom_po_id
if product.uom_id.category_id.id != product_uom.browse(cr, uid, uom_id, context=context).category_id.id:
- res['warning'] = {'title': _('Warning'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure')}
+ res['warning'] = {'title': _('Warning!'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure.')}
uom_id = product_uom_po_id
res['value'].update({'product_uom': uom_id})
@@ -923,10 +923,10 @@ class purchase_order_line(osv.osv):
if supplier.name.id == partner_id:
supplierinfo = supplier
if supplierinfo.product_uom.id != uom_id:
- res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name }
+ res['warning'] = {'title': _('Warning!'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name }
min_qty = product_uom._compute_qty(cr, uid, supplierinfo.product_uom.id, supplierinfo.min_qty, to_uom_id=uom_id)
if qty < min_qty: # If the supplier quantity is greater than entered from user, set minimal.
- res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier has a minimal quantity set to %s %s, you should not purchase less.') % (supplierinfo.min_qty, supplierinfo.product_uom.name)}
+ res['warning'] = {'title': _('Warning!'), 'message': _('The selected supplier has a minimal quantity set to %s %s, you should not purchase less.') % (supplierinfo.min_qty, supplierinfo.product_uom.name)}
qty = min_qty
dt = self._get_date_planned(cr, uid, supplierinfo, date_order, context=context).strftime(DEFAULT_SERVER_DATETIME_FORMAT)
@@ -1086,7 +1086,7 @@ procurement_order()
class mail_message(osv.osv):
_name = 'mail.message'
_inherit = 'mail.message'
-
+
def _postprocess_sent_message(self, cr, uid, message, context=None):
if message.model == 'purchase.order':
wf_service = netsvc.LocalService("workflow")
diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py
index d43f617265f..edce941ab7b 100644
--- a/addons/purchase/wizard/purchase_line_invoice.py
+++ b/addons/purchase/wizard/purchase_line_invoice.py
@@ -106,9 +106,8 @@ class purchase_line_invoice(osv.osv_memory):
if not a:
a = line.product_id.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)') % \
+ raise osv.except_osv(_('Error!'),
+ _('Define expense account for this product: "%s" (id:%d).') % \
(line.product_id.name, line.product_id.id,))
else:
a = property_obj.get(cr, uid,
diff --git a/addons/purchase/wizard/purchase_order_group.py b/addons/purchase/wizard/purchase_order_group.py
index 427c9c165fc..99ae11a7ba8 100644
--- a/addons/purchase/wizard/purchase_order_group.py
+++ b/addons/purchase/wizard/purchase_order_group.py
@@ -44,7 +44,7 @@ class purchase_order_group(osv.osv_memory):
context={}
res = super(purchase_order_group, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if context.get('active_model','') == 'purchase.order' and len(context['active_ids']) < 2:
- raise osv.except_osv(_('Warning'),
+ raise osv.except_osv(_('Warning!'),
_('Please select multiple order to merge in the list view.'))
return res
def merge_orders(self, cr, uid, ids, context=None):
diff --git a/addons/purchase_requisition/i18n/purchase_requisition.pot b/addons/purchase_requisition/i18n/purchase_requisition.pot
index c8866a068e6..b3b8aa3bdc3 100644
--- a/addons/purchase_requisition/i18n/purchase_requisition.pot
+++ b/addons/purchase_requisition/i18n/purchase_requisition.pot
@@ -29,7 +29,7 @@ msgstr ""
#. module: purchase_requisition
#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:42
#, python-format
-msgid "No Product in Tender"
+msgid "No Product in Tender."
msgstr ""
#. module: purchase_requisition
diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py
index 8ba12657405..9d9350e3257 100644
--- a/addons/purchase_requisition/purchase_requisition.py
+++ b/addons/purchase_requisition/purchase_requisition.py
@@ -150,7 +150,7 @@ class purchase_requisition(osv.osv):
res = {}
for requisition in self.browse(cr, uid, ids, context=context):
if supplier.id in filter(lambda x: x, [rfq.state <> 'cancel' and rfq.partner_id.id or None for rfq in requisition.purchase_ids]):
- raise osv.except_osv(_('Warning'), _('You have already one %s purchase order for this partner, you must cancel this purchase order to create a new quotation.') % rfq.state)
+ raise osv.except_osv(_('Warning!'), _('You have already one %s purchase order for this partner, you must cancel this purchase order to create a new quotation.') % rfq.state)
location_id = requisition.warehouse_id.lot_input_id.id
purchase_id = purchase_order.create(cr, uid, {
'origin': requisition.name,
diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
index b18f6f3836e..40057fae197 100644
--- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py
+++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py
@@ -38,7 +38,7 @@ class purchase_requisition_partner(osv.osv_memory):
record_id = context and context.get('active_id', False) or False
tender = self.pool.get('purchase.requisition').browse(cr, uid, record_id, context=context)
if not tender.line_ids:
- raise osv.except_osv(_('Error!'), _('No Product in Tender'))
+ raise osv.except_osv(_('Error!'), _('No Product in Tender.'))
return res
def create_order(self, cr, uid, ids, context=None):
diff --git a/addons/report_webkit/i18n/report_webkit.pot b/addons/report_webkit/i18n/report_webkit.pot
index 7a381b8728e..ec614d00f8d 100644
--- a/addons/report_webkit/i18n/report_webkit.pot
+++ b/addons/report_webkit/i18n/report_webkit.pot
@@ -90,7 +90,7 @@ msgstr ""
#: code:addons/report_webkit/webkit_report.py:285
#: code:addons/report_webkit/webkit_report.py:296
#, python-format
-msgid "Webkit render"
+msgid "Webkit render!"
msgstr ""
#. module: report_webkit
@@ -113,7 +113,7 @@ msgstr ""
#. module: report_webkit
#: code:addons/report_webkit/webkit_report.py:167
#, python-format
-msgid "Webkit raise an error"
+msgid "Webkit raise an error!"
msgstr ""
#. module: report_webkit
@@ -273,7 +273,7 @@ msgstr ""
#. module: report_webkit
#: code:addons/report_webkit/webkit_report.py:224
#, python-format
-msgid "Please set a header in company settings"
+msgid "Please set a header in company settings."
msgstr ""
#. module: report_webkit
@@ -497,7 +497,7 @@ msgstr ""
#. module: report_webkit
#: code:addons/report_webkit/webkit_report.py:218
#, python-format
-msgid "Webkit Report template not found !"
+msgid "Webkit report template not found!"
msgstr ""
#. module: report_webkit
diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py
index 04980695f8f..e1ce5a38c6b 100644
--- a/addons/report_webkit/webkit_report.py
+++ b/addons/report_webkit/webkit_report.py
@@ -164,7 +164,7 @@ class WebKitParser(report_sxw):
status = subprocess.call(command, stderr=subprocess.PIPE) # ignore stderr
if status :
raise except_osv(
- _('Webkit raise an error' ),
+ _('Webkit raise an error!' ),
status
)
except Exception:
@@ -215,13 +215,13 @@ class WebKitParser(report_sxw):
if not template and report_xml.report_webkit_data :
template = report_xml.report_webkit_data
if not template :
- raise except_osv(_('Error!'), _('Webkit Report template not found !'))
+ raise except_osv(_('Error!'), _('Webkit report template not found!'))
header = report_xml.webkit_header.html
footer = report_xml.webkit_header.footer_html
if not header and report_xml.header:
raise except_osv(
_('No header defined for this Webkit report!'),
- _('Please set a header in company settings')
+ _('Please set a header in company settings.')
)
if not report_xml.header :
header = ''
@@ -249,7 +249,7 @@ class WebKitParser(report_sxw):
except Exception, e:
msg = exceptions.text_error_template().render()
_logger.error(msg)
- raise except_osv(_('Webkit render'), msg)
+ raise except_osv(_('Webkit render!'), msg)
else:
try :
html = body_mako_tpl.render(helper=helper,
@@ -260,7 +260,7 @@ class WebKitParser(report_sxw):
except Exception, e:
msg = exceptions.text_error_template().render()
_logger.error(msg)
- raise except_osv(_('Webkit render'), msg)
+ raise except_osv(_('Webkit render!'), msg)
head_mako_tpl = mako_template(header)
try :
head = head_mako_tpl.render(helper=helper,
@@ -269,7 +269,7 @@ class WebKitParser(report_sxw):
_debug=False,
**self.parser_instance.localcontext)
except Exception, e:
- raise except_osv(_('Webkit render'),
+ raise except_osv(_('Webkit render!'),
exceptions.text_error_template().render())
foot = False
if footer :
@@ -282,7 +282,7 @@ class WebKitParser(report_sxw):
except:
msg = exceptions.text_error_template().render()
_logger.error(msg)
- raise except_osv(_('Webkit render'), msg)
+ raise except_osv(_('Webkit render!'), msg)
if report_xml.webkit_debug :
try :
deb = head_mako_tpl.render(helper=helper,
@@ -293,7 +293,7 @@ class WebKitParser(report_sxw):
except Exception, e:
msg = exceptions.text_error_template().render()
_logger.error(msg)
- raise except_osv(_('Webkit render'), msg)
+ raise except_osv(_('Webkit render!'), msg)
return (deb, 'html')
bin = self.get_lib(cursor, uid)
pdf = self.generate_pdf(bin, report_xml, head, foot, htmls)
diff --git a/addons/resource/faces/task.py b/addons/resource/faces/task.py
index f5240112277..81379c67240 100644
--- a/addons/resource/faces/task.py
+++ b/addons/resource/faces/task.py
@@ -91,8 +91,8 @@ class _IncompleteError(Exception):
Exception.__init__(self, *args)
else:
Exception.__init__(self,
- "not enough data for calculating task, "\
- "maybe you have a recursive reference",
+ "Not enough data for calculating task, "\
+ "maybe you have a recursive reference.",
*args)
#@-node:__init__
#@-others
@@ -1997,7 +1997,7 @@ class Task(object):
except IndexError:
raise AttributeError()
- exception = AttributeError("'%s' is not a valid attribute of '%s'"
+ exception = AttributeError("'%s' is not a valid attribute of '%s'."
% (name, self.path))
exception.is_frozen = self._is_frozen
raise exception
@@ -2925,7 +2925,7 @@ class Task(object):
try:
dest, dattr = self.__at_compile
- raise RecursionError("Recursive definition of %s(%s) and %s(%s)" \
+ raise RecursionError("Recursive definition of %s(%s) and %s(%s)." \
% (self.path, attrib_name, dest.path, dattr))
except AttributeError: pass
@@ -3325,7 +3325,7 @@ class Task(object):
#@+node:__assert
def __assert(self, value):
if not value:
- warnings.warn('assertion in scenario: "%s"' % self.scenario,
+ warnings.warn('Assertion in scenario: "%s".' % self.scenario,
RuntimeWarning, 2)
#@-node:__assert
#@+node:_warn
diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot
index 2c477d1d7a0..19f86364672 100644
--- a/addons/sale/i18n/sale.pot
+++ b/addons/sale/i18n/sale.pot
@@ -131,8 +131,8 @@ msgstr ""
#: code:addons/sale/sale.py:295
#, python-format
msgid ""
-"In order to delete a confirmed sale order, you must cancel it before ! To "
-"cancel a sale order, you must first cancel related picking or delivery "
+"In order to delete a confirmed sales order, you must cancel it! To "
+"cancel a sale order, you must first cancel related picking for delivery "
"orders."
msgstr ""
@@ -380,7 +380,7 @@ msgstr ""
#. module: sale
#: code:addons/sale/sale.py:617
#, python-format
-msgid "Could not cancel this sales order !"
+msgid "Cannot cancel this sales order!"
msgstr ""
#. module: sale
@@ -796,7 +796,7 @@ msgstr ""
#. module: sale
#: code:addons/sale/sale.py:1078
#, python-format
-msgid "Could not cancel sales order line!"
+msgid "Cannot cancel sales order line!"
msgstr ""
#. module: sale
@@ -974,7 +974,7 @@ msgstr ""
#. module: sale
#: code:addons/sale/sale.py:413
#, python-format
-msgid "There is no sales journal defined for this company: \"%s\" (id:%d)"
+msgid "Please define sales journal for this company: \"%s\" (id:%d)."
msgstr ""
#. module: sale
@@ -1290,7 +1290,7 @@ msgstr ""
#. module: sale
#: code:addons/sale/sale.py:603
#, python-format
-msgid "Could not cancel sales order !"
+msgid "Cannot cancel sales order!"
msgstr ""
#. module: sale
@@ -1460,8 +1460,8 @@ msgstr ""
#: code:addons/sale/sale.py:1171
#, python-format
msgid ""
-"You have to select a customer in the sales form !\n"
-"Please set one customer before choosing a product."
+"Before choosing a product,\n "
+"select a customer in the sales form."
msgstr ""
#. module: sale
@@ -1492,7 +1492,7 @@ msgstr ""
#. module: sale
#: code:addons/sale/sale.py:604
#, python-format
-msgid "You must first cancel all picking attached to this sales order."
+msgid "You must first cancel all delivery order(s) attached to this sales order."
msgstr ""
#. module: sale
@@ -1571,7 +1571,7 @@ msgstr ""
#: code:addons/sale/sale.py:1017
#: code:addons/sale/wizard/sale_make_invoice_advance.py:71
#, python-format
-msgid "There is no income account defined for this product: \"%s\" (id:%d)"
+msgid "Please define income account for this product: \"%s\" (id:%d)."
msgstr ""
#. module: sale
@@ -1682,7 +1682,7 @@ msgstr ""
#: code:addons/sale/sale.py:1269
#, python-format
msgid ""
-"Couldn't find a pricelist line matching this product and quantity.\n"
+"Cannot find a pricelist line matching this product and quantity.\n"
"You have to change either the product, the quantity or the pricelist."
msgstr ""
@@ -1981,7 +1981,7 @@ msgstr ""
#. module: sale
#: code:addons/sale/sale.py:618
#, python-format
-msgid "You must first cancel all invoices attached to this sales order."
+msgid "First cancel all invoices attached to this sales order."
msgstr ""
#. module: sale
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index f920b34ca42..d77b157ddd5 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -50,7 +50,7 @@ class sale_order(osv.osv):
_name = "sale.order"
_inherit = ['ir.needaction_mixin', 'mail.thread']
_description = "Sales Order"
-
+
def copy(self, cr, uid, id, default=None, context=None):
if not default:
@@ -295,7 +295,7 @@ class sale_order(osv.osv):
if s['state'] in ['draft', 'cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid action !'), _('In order to delete a confirmed sale order, you must cancel it before ! To cancel a sale order, you must first cancel related picking or delivery orders.'))
+ raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it.\nTo do so, you must first cancel related picking for delivery orders.'))
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
@@ -418,8 +418,8 @@ class sale_order(osv.osv):
[('type', '=', 'sale'), ('company_id', '=', order.company_id.id)],
limit=1)
if not journal_ids:
- raise osv.except_osv(_('Error !'),
- _('There is no sales journal defined for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id))
+ raise osv.except_osv(_('Error!'),
+ _('Please define sales journal for this company: "%s" (id:%d).') % (order.company_id.name, order.company_id.id))
invoice_vals = {
'name': order.client_order_ref or '',
@@ -481,7 +481,7 @@ class sale_order(osv.osv):
'form': self.read(cr, uid, ids[0], context=context),
}
return {'type': 'ir.actions.report.xml', 'report_name': 'sale.order', 'datas': datas, 'nodestroy': True}
-
+
def manual_invoice(self, cr, uid, ids, context=None):
""" create invoices for the given sale orders (ids), and open the form
view of one of the newly created invoices
@@ -547,7 +547,7 @@ class sale_order(osv.osv):
result.update(view_id = res and res[1] or False)
return result
-
+
def action_view_delivery(self, cr, uid, ids, context=None):
'''
This function returns an action that display existing delivery orders of given sale order ids. It can either be a in a list or in a form view, if there is only one delivery order to show.
@@ -600,7 +600,7 @@ class sale_order(osv.osv):
currency_id = o.pricelist_id.currency_id.id
if (o.partner_id.id in partner_currency) and (partner_currency[o.partner_id.id] <> currency_id):
raise osv.except_osv(
- _('Error !'),
+ _('Error!'),
_('You cannot group sales having different currencies for the same partner.'))
partner_currency[o.partner_id.id] = currency_id
@@ -702,8 +702,8 @@ class sale_order(osv.osv):
for pick in sale.picking_ids:
if pick.state not in ('draft', 'cancel'):
raise osv.except_osv(
- _('Could not cancel sales order !'),
- _('You must first cancel all picking attached to this sales order.'))
+ _('Cannot cancel sales order!'),
+ _('You must first cancel all delivery order(s) attached to this sales order.'))
if pick.state == 'cancel':
for mov in pick.move_lines:
proc_ids = proc_obj.search(cr, uid, [('move_id', '=', mov.id)])
@@ -716,8 +716,8 @@ class sale_order(osv.osv):
for inv in sale.invoice_ids:
if inv.state not in ('draft', 'cancel'):
raise osv.except_osv(
- _('Could not cancel this sales order !'),
- _('You must first cancel all invoices attached to this sales order.'))
+ _('Cannot cancel this sales order!'),
+ _('First cancel all invoices attached to this sales order.'))
for r in self.read(cr, uid, ids, ['invoice_ids']):
for inv in r['invoice_ids']:
wf_service.trg_validate(uid, 'account.invoice', inv, 'invoice_cancel', cr)
@@ -728,7 +728,7 @@ class sale_order(osv.osv):
return True
def action_button_confirm(self, cr, uid, ids, context=None):
- 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.'
wf_service = netsvc.LocalService('workflow')
wf_service.trg_validate(uid, 'sale.order', ids[0], 'order_confirm', cr)
@@ -750,7 +750,7 @@ class sale_order(osv.osv):
def action_wait(self, cr, uid, ids, context=None):
for o in self.browse(cr, uid, ids):
if not o.order_line:
- raise osv.except_osv(_('Error !'),_('You cannot confirm a sale order which has no line.'))
+ raise osv.except_osv(_('Error!'),_('You cannot confirm a sale order which has no line.'))
if (o.order_policy == 'manual'):
self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)})
else:
@@ -763,7 +763,7 @@ class sale_order(osv.osv):
'''
This function opens a window to compose an email, with the edi sale template message loaded by default
'''
- 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.'
mod_obj = self.pool.get('ir.model.data')
template = mod_obj.get_object_reference(cr, uid, 'sale', 'email_template_edi_sale')
template_id = template and template[1] or False
@@ -1021,27 +1021,27 @@ class sale_order(osv.osv):
# ------------------------------------------------
# OpenChatter methods and notifications
# ------------------------------------------------
-
+
def get_needaction_user_ids(self, cr, uid, ids, context=None):
result = super(sale_order, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if (obj.state == 'manual' or obj.state == 'progress'):
result[obj.id].append(obj.user_id.id)
return result
-
+
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_subscribe(cr, uid, [obj.id], [obj.user_id.id], context=context)
self.message_append_note(cr, uid, [obj.id], body=_("Quotation for %s has been created.") % (obj.partner_id.name), context=context)
-
+
def confirm_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=_("Quotation for %sconverted to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
-
+
def 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=_("Sale Order for %scancelled.") % (obj.partner_id.name), context=context)
-
+
def delivery_send_note(self, cr, uid, ids, picking_id, context=None):
for order in self.browse(cr, uid, ids, context=context):
for picking in (pck for pck in order.picking_ids if pck.id == picking_id):
@@ -1050,22 +1050,22 @@ class sale_order(osv.osv):
picking_datetime = fields.DT.datetime.strptime(picking.min_date, DEFAULT_SERVER_DATETIME_FORMAT)
picking_date_str = fields.datetime.context_timestamp(cr, uid, picking_datetime, context=context).strftime(DATETIME_FORMATS_MAP['%+'] + " (%Z)")
self.message_append_note(cr, uid, [order.id], body=_("Delivery Order %sscheduled for %s.") % (picking.name, picking_date_str), context=context)
-
+
def delivery_end_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Order delivered."), context=context)
-
+
def invoice_paid_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Invoice paid."), context=context)
-
+
def invoice_send_note(self, cr, uid, ids, invoice_id, context=None):
for order in self.browse(cr, uid, ids, context=context):
for invoice in (inv for inv in order.invoice_ids if inv.id == invoice_id):
self.message_append_note(cr, uid, [order.id], body=_("Draft Invoice of %s %s waiting for validation.") % (invoice.amount_total, invoice.currency_id.symbol), context=context)
-
+
def action_cancel_draft_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, body='Sale order has been set in draft.', context=context)
-
-
+
+
sale_order()
# TODO add a field price_unit_uos
@@ -1192,8 +1192,8 @@ class sale_order_line(osv.osv):
if not account_id:
account_id = line.product_id.categ_id.property_account_income_categ.id
if not account_id:
- raise osv.except_osv(_('Error !'),
- _('There is no income account defined for this product: "%s" (id:%d)') % \
+ raise osv.except_osv(_('Error!'),
+ _('Please define income account for this product: "%s" (id:%d).') % \
(line.product_id.name, line.product_id.id,))
else:
prop = self.pool.get('ir.property').get(cr, uid,
@@ -1209,8 +1209,8 @@ class sale_order_line(osv.osv):
fpos = line.order_id.fiscal_position or False
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
if not account_id:
- raise osv.except_osv(_('Error !'),
- _('There is no income category account defined in default Properties for Product Category or Fiscal Position is not defined !'))
+ raise osv.except_osv(_('Error!'),
+ _('There is no Fiscal Position defined or Income category account defined for default properties of Product categories.'))
return {
'name': line.name,
'origin': line.order_id.name,
@@ -1249,11 +1249,11 @@ class sale_order_line(osv.osv):
def button_cancel(self, cr, uid, ids, context=None):
for line in self.browse(cr, uid, ids, context=context):
if line.invoiced:
- raise osv.except_osv(_('Invalid action !'), _('You cannot cancel a sale order line that has already been invoiced!'))
+ raise osv.except_osv(_('Invalid Action!'), _('You cannot cancel a sale order line that has already been invoiced.'))
for move_line in line.move_ids:
if move_line.state != 'cancel':
raise osv.except_osv(
- _('Could not cancel sales order line!'),
+ _('Cannot cancel sales order line!'),
_('You must first cancel stock moves attached to this sales order line.'))
return self.write(cr, uid, ids, {'state': 'cancel'})
@@ -1333,7 +1333,7 @@ class sale_order_line(osv.osv):
(qty, ean, qty_pack, type_ul.name)
warning_msgs += _("Picking Information ! : ") + warn_msg + "\n\n"
warning = {
- 'title': _('Configuration Error !'),
+ 'title': _('Configuration Error!'),
'message': warning_msgs
}
result['product_uom_qty'] = qty
@@ -1346,7 +1346,7 @@ class sale_order_line(osv.osv):
context = context or {}
lang = lang or context.get('lang',False)
if not partner_id:
- raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sales form !\nPlease set one customer before choosing a product.'))
+ raise osv.except_osv(_('No Customer Defined !'), _('Before choosing a product,\n select a customer in the sales form.'))
warning = {}
product_uom_obj = self.pool.get('product.uom')
partner_obj = self.pool.get('res.partner')
@@ -1445,7 +1445,7 @@ class sale_order_line(osv.osv):
'date': date_order,
})[pricelist]
if price is False:
- warn_msg = _("Couldn't find a pricelist line matching this product and quantity.\n"
+ warn_msg = _("Cannot find a pricelist line matching this product and quantity.\n"
"You have to change either the product, the quantity or the pricelist.")
warning_msgs += _("No valid pricelist line found ! :") + warn_msg +"\n\n"
@@ -1453,7 +1453,7 @@ class sale_order_line(osv.osv):
result.update({'price_unit': price})
if warning_msgs:
warning = {
- 'title': _('Configuration Error !'),
+ 'title': _('Configuration Error!'),
'message' : warning_msgs
}
return {'value': result, 'domain': domain, 'warning': warning}
@@ -1479,18 +1479,18 @@ class sale_order_line(osv.osv):
"""Allows to delete sales order lines in draft,cancel states"""
for rec in self.browse(cr, uid, ids, context=context):
if rec.state not in ['draft', 'cancel']:
- raise osv.except_osv(_('Invalid action !'), _('Cannot delete a sales order line which is in state \'%s\'!') %(rec.state,))
+ raise osv.except_osv(_('Invalid Action!'), _('Cannot delete a sales order line which is in state \'%s\'.') %(rec.state,))
return super(sale_order_line, self).unlink(cr, uid, ids, context=context)
sale_order_line()
class mail_message(osv.osv):
_inherit = 'mail.message'
-
+
def _postprocess_sent_message(self, cr, uid, message, context=None):
if message.model == 'sale.order':
wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'sale.order', message.res_id, 'quotation_sent', cr)
+ wf_service.trg_validate(uid, 'sale.order', message.res_id, 'quotation_sent', cr)
return super(mail_message, self)._postprocess_sent_message(cr, uid, message=message, context=context)
mail_message()
diff --git a/addons/sale/wizard/sale_line_invoice.py b/addons/sale/wizard/sale_line_invoice.py
index cfd19252d96..613b07039d5 100644
--- a/addons/sale/wizard/sale_line_invoice.py
+++ b/addons/sale/wizard/sale_line_invoice.py
@@ -108,7 +108,7 @@ class sale_order_line_make_invoice(osv.osv_memory):
sales_order_obj.write(cr, uid, [line.order_id.id], {'state': 'progress'})
if not invoices:
- raise osv.except_osv(_('Warning'), _('Invoice cannot be created for this Sales Order Line due to one of the following reasons:\n1.The state of this sales order line is either "draft" or "cancel"!\n2.The Sales Order Line is Invoiced!'))
+ raise osv.except_osv(_('Warning!'), _('Invoice cannot be created for this Sales Order Line due to one of the following reasons:\n1.The state of this sales order line is either "draft" or "cancel"!\n2.The Sales Order Line is Invoiced!'))
return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/sale/wizard/sale_make_invoice.py b/addons/sale/wizard/sale_make_invoice.py
index b4b3772a91a..c874323e2b8 100644
--- a/addons/sale/wizard/sale_make_invoice.py
+++ b/addons/sale/wizard/sale_make_invoice.py
@@ -39,7 +39,7 @@ class sale_make_invoice(osv.osv_memory):
record_id = context and context.get('active_id', False)
order = self.pool.get('sale.order').browse(cr, uid, record_id, context=context)
if order.state == 'draft':
- raise osv.except_osv(_('Warning !'),'You can not create invoice when sales order is not confirmed.')
+ raise osv.except_osv(_('Warning!'),'You cannot create invoice when sales order is not confirmed.')
return False
def make_invoices(self, cr, uid, ids, context=None):
diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py
index a09325d663d..0952d820ebe 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.py
+++ b/addons/sale/wizard/sale_make_invoice_advance.py
@@ -99,7 +99,7 @@ class sale_advance_payment_inv(osv.osv_memory):
for sale in sale_obj.browse(cr, uid, sale_ids, context=context):
if sale.order_policy == 'postpaid':
raise osv.except_osv(
- _('Error'),
+ _('Error!'),
_("You cannot make an advance on a sales order \
that is defined as 'Automatic Invoice after delivery'."))
@@ -114,12 +114,12 @@ class sale_advance_payment_inv(osv.osv_memory):
prop_id = prop and prop.id or False
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, sale.fiscal_position.id or False, prop_id)
if not account_id:
- raise osv.except_osv(_('Configuration Error !'),
+ raise osv.except_osv(_('Configuration Error!'),
_('There is no income account defined as global property.'))
res['account_id'] = account_id
if not res.get('account_id'):
- raise osv.except_osv(_('Configuration Error !'),
- _('There is no income account defined for this product: "%s" (id:%d)') % \
+ raise osv.except_osv(_('Configuration Error!'),
+ _('There is no income account defined for this product: "%s" (id:%d).') % \
(wizard.product_id.name, wizard.product_id.id,))
# determine invoice amount
diff --git a/addons/sale_crm/i18n/sale_crm.pot b/addons/sale_crm/i18n/sale_crm.pot
index f32adb6e193..94a25994d20 100644
--- a/addons/sale_crm/i18n/sale_crm.pot
+++ b/addons/sale_crm/i18n/sale_crm.pot
@@ -45,7 +45,7 @@ msgstr ""
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:89
#, python-format
-msgid "Customer has no addresses defined!"
+msgid "No address defined for customer!"
msgstr ""
#. module: sale_crm
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 1125f3fc051..6ca9ac8230f 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -85,8 +85,8 @@ class crm_make_sale(osv.osv_memory):
['default', 'invoice', 'delivery', 'contact'])
pricelist = partner.property_product_pricelist.id
if False in partner_addr.values():
- raise osv.except_osv(_('Data Insufficient!'), _('Customer has no addresses defined!'))
-
+ raise osv.except_osv(_('Insufficient Data!'), _('No addresse(s) defined for this customer.'))
+
vals = {
'origin': _('Opportunity: %s') % str(case.id),
'section_id': case.section_id and case.section_id.id or False,
diff --git a/addons/share/i18n/share.pot b/addons/share/i18n/share.pot
index 8d4c4c57024..dd253268703 100644
--- a/addons/share/i18n/share.pot
+++ b/addons/share/i18n/share.pot
@@ -110,7 +110,7 @@ msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:643
#, python-format
-msgid "You must be a member of the Share/User group to use the share wizard"
+msgid "You must be a member of the Share/User group to use the share wizard."
msgstr ""
#. module: share
@@ -174,7 +174,7 @@ msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:640
#, python-format
-msgid "Action and Access Mode are required to create a shared access"
+msgid "Action and Access Mode are required to create a shared access."
msgstr ""
#. module: share
@@ -257,7 +257,7 @@ msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:647
#, python-format
-msgid "Please indicate the emails of the persons to share with, one per line"
+msgid "Please indicate the emails of the persons to share with, one per line."
msgstr ""
#. module: share
@@ -416,7 +416,7 @@ msgstr ""
#: code:addons/share/wizard/share_wizard.py:60
#: code:addons/share/wizard/share_wizard.py:635
#, python-format
-msgid "Sharing access could not be created"
+msgid "Sharing access cannot be created."
msgstr ""
#. module: share
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 5c6cc973fe7..b14da39633e 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -57,7 +57,7 @@ class share_wizard(osv.TransientModel):
The error_message should have been translated with _().
"""
if not condition:
- raise osv.except_osv(_('Sharing access could not be created'), error_message)
+ raise osv.except_osv(_('Sharing access cannot be created.'), error_message)
def has_group(self, cr, uid, module, group_xml_id, context=None):
"""Returns True if current user is a member of the group identified by the module, group_xml_id pair."""
@@ -649,19 +649,19 @@ class share_wizard(osv.TransientModel):
rule_name=rule_name, restrict=True, context=context)
except Exception:
_logger.exception('Failed to create share access')
- raise osv.except_osv(_('Sharing access could not be created'),
+ raise osv.except_osv(_('Sharing access cannot be created.'),
_('Sorry, the current screen and filter you are trying to share are not supported at the moment.\nYou may want to try a simpler filter.'))
def _check_preconditions(self, cr, uid, wizard_data, context=None):
self._assert(wizard_data.action_id and wizard_data.access_mode,
- _('Action and Access Mode are required to create a shared access'),
+ _('Action and Access Mode are required to create a shared access.'),
context=context)
self._assert(self.has_share(cr, uid, context=context),
- _('You must be a member of the Share/User group to use the share wizard'),
+ _('You must be a member of the Share/User group to use the share wizard.'),
context=context)
if wizard_data.user_type == 'emails':
self._assert((wizard_data.new_users or wizard_data.email_1 or wizard_data.email_2 or wizard_data.email_3),
- _('Please indicate the emails of the persons to share with, one per line'),
+ _('Please indicate the emails of the persons to share with, one per line.'),
context=context)
def _create_share_users_group(self, cr, uid, wizard_data, context=None):
diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot
index 3832e3197c7..9b46cdde703 100644
--- a/addons/stock/i18n/stock.pot
+++ b/addons/stock/i18n/stock.pot
@@ -213,7 +213,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:2516
#, python-format
-msgid "Missing partial picking data for move #%s"
+msgid "Missing partial picking data for move #%s."
msgstr ""
#. module: stock
@@ -313,7 +313,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:1149
#, python-format
-msgid "You cannot cancel picking because stock move is in done state !"
+msgid "You cannot cancel picking because stock move is in done state!"
msgstr ""
#. module: stock
@@ -344,7 +344,7 @@ msgstr ""
#: code:addons/stock/stock.py:2119
#, python-format
msgid ""
-"Can not create Journal Entry, Input Account defined on this product and "
+"Cannot create Journal Entry, Input Account of this product and "
"Valuation account on category of this product are same."
msgstr ""
@@ -533,8 +533,8 @@ msgstr ""
#: code:addons/stock/stock.py:2125
#, python-format
msgid ""
-"There is no stock output account defined for this product or its category: "
-"\"%s\" (id: %d)"
+"Please define stock output account for this product or its category: "
+"\"%s\" (id: %d)."
msgstr ""
#. module: stock
@@ -557,7 +557,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:760
#, python-format
-msgid "You can not process picking without stock moves"
+msgid "You cannot process picking without stock moves."
msgstr ""
#. module: stock
@@ -675,8 +675,8 @@ msgstr ""
#: code:addons/stock/stock.py:2131
#, python-format
msgid ""
-"There is no inventory Valuation account defined on the product category: \"%s"
-"\" (id: %d)"
+"Please define inventory Valuation account on the product category: \"%s"
+"\" (id: %d)."
msgstr ""
#. module: stock
@@ -699,7 +699,7 @@ msgstr ""
#. module: stock
#: constraint:stock.move:0
-msgid "You try to assign a lot which is not from the same product"
+msgid "You try to assign a lot which is not from the same product."
msgstr ""
#. module: stock
@@ -792,7 +792,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/product.py:75
#, python-format
-msgid "Valuation Account is not specified for Product Category: %s"
+msgid "Specify valuation Account for Product Category: %s."
msgstr ""
#. module: stock
@@ -1043,7 +1043,7 @@ msgstr ""
#: code:addons/stock/product.py:147
#, python-format
msgid ""
-"There is no stock output account defined for this product: \"%s\" (id: %d)"
+"Please define stock output account for this product: \"%s\" (id: %d)."
msgstr ""
#. module: stock
@@ -1370,7 +1370,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/product.py:92
#, python-format
-msgid "Company is not specified in Location"
+msgid "Specify company in Location."
msgstr ""
#. module: stock
@@ -1471,7 +1471,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/wizard/stock_invoice_onshipping.py:112
#, python-format
-msgid "No Invoices were created"
+msgid "Please create Invoices."
msgstr ""
#. module: stock
@@ -1521,7 +1521,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:2337
#, python-format
-msgid "Please provide a positive quantity to scrap!"
+msgid "Please provide a positive quantity to scrap."
msgstr ""
#. module: stock
@@ -1755,7 +1755,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:513
#, python-format
-msgid "You can not remove a lot line !"
+msgid "You cannot remove a lot line!"
msgstr ""
#. module: stock
@@ -1767,7 +1767,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:1157
#, python-format
-msgid "You cannot remove the picking which is in %s state !"
+msgid "You cannot remove the picking which is in %s state!"
msgstr ""
#. module: stock
@@ -1873,7 +1873,7 @@ msgstr ""
#: code:addons/stock/stock.py:2116
#, python-format
msgid ""
-"Can not create Journal Entry, Output Account defined on this product and "
+"Cannot create Journal Entry, Output Account of this product and "
"Valuation account on category of this product are same."
msgstr ""
@@ -1906,8 +1906,8 @@ msgstr ""
#: code:addons/stock/stock.py:2122
#, python-format
msgid ""
-"There is no stock input account defined for this product or its category: "
-"\"%s\" (id: %d)"
+"Please define stock input account for this product or its category: "
+"\"%s\" (id: %d)."
msgstr ""
#. module: stock
@@ -2138,7 +2138,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/product.py:89
#, python-format
-msgid "Could not find any difference between standard price and new price!"
+msgid "No difference between standard price and new price!"
msgstr ""
#. module: stock
@@ -2253,7 +2253,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:1697
#, python-format
-msgid "Operation forbidden"
+msgid "Operation forbidden !"
msgstr ""
#. module: stock
@@ -2451,7 +2451,7 @@ msgstr ""
#: code:addons/stock/wizard/stock_change_product_qty.py:78
#: code:addons/stock/wizard/stock_change_standard_price.py:107
#, python-format
-msgid "Active ID is not set in Context"
+msgid "Active ID is not set in Context."
msgstr ""
#. module: stock
@@ -2504,7 +2504,7 @@ msgstr ""
#. module: stock
#: constraint:stock.move:0
-msgid "You can not move products from or to a location of the type view."
+msgid "You cannot move products from or to a location of the type view."
msgstr ""
#. module: stock
@@ -2548,13 +2548,13 @@ msgstr ""
#: code:addons/stock/product.py:121
#, python-format
msgid ""
-"There is no stock input account defined for this product: \"%s\" (id: %d)"
+"Please define stock input account for this product: \"%s\" (id: %d)."
msgstr ""
#. module: stock
#: code:addons/stock/stock.py:2445
#, python-format
-msgid "Can not consume a move with negative or zero quantity !"
+msgid "Cannot consume a move with negative or zero quantity."
msgstr ""
#. module: stock
@@ -2842,7 +2842,7 @@ msgstr ""
#: code:addons/stock/stock.py:2379 code:addons/stock/stock.py:2440
#: code:addons/stock/wizard/stock_partial_picking.py:141
#, python-format
-msgid "Please provide Proper Quantity !"
+msgid "Please provide proper Quantity."
msgstr ""
#. module: stock
@@ -3033,8 +3033,8 @@ msgstr ""
#: code:addons/stock/stock.py:1698
#, python-format
msgid ""
-"Quantities, UoMs, Products and Locations cannot be modified on stock moves "
-"that have already been processed (except by the Administrator)"
+"Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves "
+"that have already been processed (except by the Administrator)."
msgstr ""
#. module: stock
@@ -3118,7 +3118,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/stock.py:2311 code:addons/stock/stock.py:2726
#, python-format
-msgid "UserError"
+msgid "UserError!"
msgstr ""
#. module: stock
@@ -3227,7 +3227,7 @@ msgstr ""
#: code:addons/stock/wizard/stock_partial_picking.py:148
#: code:addons/stock/wizard/stock_partial_picking.py:159
#, python-format
-msgid "Warning"
+msgid "Warning!"
msgstr ""
#. module: stock
@@ -3578,7 +3578,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/wizard/stock_return_picking.py:189
#, python-format
-msgid "Please specify at least one non-zero quantity!"
+msgid "Please specify at least one non-zero quantity."
msgstr ""
#. module: stock
@@ -3623,7 +3623,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/product.py:100 code:addons/stock/stock.py:2128
#, python-format
-msgid "There is no journal defined on the product category: \"%s\" (id: %d)"
+msgid "Please define journal on the product category: \"%s\" (id: %d)."
msgstr ""
#. module: stock
@@ -3676,7 +3676,7 @@ msgstr ""
#: code:addons/stock/stock.py:1157
#: code:addons/stock/wizard/stock_invoice_onshipping.py:112
#, python-format
-msgid "Error"
+msgid "Error!"
msgstr ""
#. module: stock
@@ -3739,7 +3739,7 @@ msgstr ""
#, python-format
msgid ""
"Total quantity after split exceeds the quantity to split for this product: "
-"\"%s\" (id: %d)"
+"\"%s\" (id: %d)."
msgstr ""
#. module: stock
@@ -3802,7 +3802,7 @@ msgstr ""
#: code:addons/stock/wizard/stock_return_picking.py:106
#, python-format
msgid ""
-"There are no products to return (only lines in Done state and not fully "
+"No products to return (only lines in Done state and not fully "
"returned yet can be returned)!"
msgstr ""
@@ -3819,7 +3819,7 @@ msgstr ""
#. module: stock
#: code:addons/stock/wizard/stock_move.py:213
#, python-format
-msgid "Processing Error"
+msgid "Processing Error!"
msgstr ""
#. module: stock
@@ -3930,7 +3930,7 @@ msgstr ""
#: code:addons/stock/wizard/stock_return_picking.py:106
#: code:addons/stock/wizard/stock_return_picking.py:189
#, python-format
-msgid "Warning !"
+msgid "Warning!"
msgstr ""
#. module: stock
@@ -3963,7 +3963,7 @@ msgstr ""
#: code:addons/stock/wizard/stock_move.py:213
#, python-format
msgid ""
-"Production lot quantity %d of %s is larger than available quantity (%d) !"
+"Production lot quantity %d of %s is larger than available quantity (%d)!"
msgstr ""
#. module: stock
diff --git a/addons/stock/product.py b/addons/stock/product.py
index e4164ef9e1f..e0e55594eca 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -93,7 +93,7 @@ class product_product(osv.osv):
product_obj=self.browse(cr, uid, ids, context=context)[0]
account_valuation = product_obj.categ_id.property_stock_valuation_account_id
account_valuation_id = account_valuation and account_valuation.id or False
- if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Valuation Account is not specified for Product Category: %s') % (product_obj.categ_id.name))
+ if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Specify valuation Account for Product Category: %s.') % (product_obj.categ_id.name))
move_ids = []
loc_ids = location_obj.search(cr, uid,[('usage','=','internal')])
for rec_id in ids:
@@ -107,10 +107,10 @@ class product_product(osv.osv):
product = self.browse(cr, uid, rec_id, context=c)
qty = product.qty_available
diff = product.standard_price - new_price
- if not diff: raise osv.except_osv(_('Error!'), _("Could not find any difference between standard price and new price!"))
+ if not diff: raise osv.except_osv(_('Error!'), _("No difference between standard price and new price!"))
if qty:
company_id = location.company_id and location.company_id.id or False
- if not company_id: raise osv.except_osv(_('Error!'), _('Company is not specified in Location'))
+ if not company_id: raise osv.except_osv(_('Error!'), _('Please specify company in Location.'))
#
# Accounting Entries
#
@@ -118,8 +118,8 @@ class product_product(osv.osv):
journal_id = product.categ_id.property_stock_journal and product.categ_id.property_stock_journal.id or False
if not journal_id:
raise osv.except_osv(_('Error!'),
- _('There is no journal defined '\
- 'on the product category: "%s" (id: %d)') % \
+ _('Please define journal '\
+ 'on the product category: "%s" (id: %d).') % \
(product.categ_id.name,
product.categ_id.id,))
move_id = move_obj.create(cr, uid, {
@@ -139,8 +139,8 @@ class product_product(osv.osv):
property_stock_account_input_categ.id
if not stock_input_acc:
raise osv.except_osv(_('Error!'),
- _('There is no stock input account defined ' \
- 'for this product: "%s" (id: %d)') % \
+ _('Please define stock input account ' \
+ 'for this product: "%s" (id: %d).') % \
(product.name,
product.id,))
amount_diff = qty * diff
@@ -165,8 +165,8 @@ class product_product(osv.osv):
property_stock_account_output_categ.id
if not stock_output_acc:
raise osv.except_osv(_('Error!'),
- _('There is no stock output account defined ' \
- 'for this product: "%s" (id: %d)') % \
+ _('Please define stock output account ' \
+ 'for this product: "%s" (id: %d).') % \
(product.name,
product.id,))
amount_diff = qty * -diff
diff --git a/addons/stock/report/report_stock.py b/addons/stock/report/report_stock.py
index e16b7ca6e6d..a711cdf23ee 100644
--- a/addons/stock/report/report_stock.py
+++ b/addons/stock/report/report_stock.py
@@ -75,7 +75,7 @@ class stock_report_prodlots(osv.osv):
)""")
def unlink(self, cr, uid, ids, context={}):
- raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
+ raise osv.except_osv(_('Error!'), _('You cannot delete any record!'))
stock_report_prodlots()
@@ -132,7 +132,7 @@ class stock_report_tracklots(osv.osv):
)""")
def unlink(self, cr, uid, ids, context={}):
- raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
+ raise osv.except_osv(_('Error!'), _('You cannot delete any record!'))
stock_report_tracklots()
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index fd45274352b..b770712429c 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -516,7 +516,7 @@ class stock_tracking(osv.osv):
return res
def unlink(self, cr, uid, ids, context=None):
- raise osv.except_osv(_('Error'), _('You can not remove a lot line !'))
+ raise osv.except_osv(_('Error!'), _('You cannot remove a lot line.'))
def action_traceability(self, cr, uid, ids, context={}):
""" It traces the information of a product
@@ -605,7 +605,7 @@ class stock_picking(osv.osv):
res[pick]['min_date'] = dt1
res[pick]['max_date'] = dt2
return res
-
+
def create(self, cr, user, vals, context=None):
if ('name' not in vals) or (vals.get('name')=='/'):
seq_obj_name = 'stock.picking.' + vals['type']
@@ -740,7 +740,7 @@ class stock_picking(osv.osv):
wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_confirm', cr)
move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
if not move_ids:
- raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))
+ raise osv.except_osv(_('Warning!'),_('Not enough stock, unable to reserve the products.'))
self.pool.get('stock.move').action_assign(cr, uid, move_ids)
return True
@@ -762,7 +762,7 @@ class stock_picking(osv.osv):
wf_service = netsvc.LocalService("workflow")
for pick in self.browse(cr, uid, ids):
if not pick.move_lines:
- raise osv.except_osv(_('Error !'),_('You can not process picking without stock moves'))
+ raise osv.except_osv(_('Error!'),_('You cannot process picking without stock moves.'))
wf_service.trg_validate(uid, 'stock.picking', pick.id,
'button_confirm', cr)
return True
@@ -1154,7 +1154,7 @@ class stock_picking(osv.osv):
return True
for move in pick.move_lines:
if move.state == 'done':
- raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state !'))
+ raise osv.except_osv(_('Error!'), _('You cannot cancel picking because stock move is in done state!'))
return True
def unlink(self, cr, uid, ids, context=None):
move_obj = self.pool.get('stock.move')
@@ -1162,7 +1162,7 @@ class stock_picking(osv.osv):
context = {}
for pick in self.browse(cr, uid, ids, context=context):
if pick.state in ['done','cancel']:
- raise osv.except_osv(_('Error'), _('You cannot remove the picking which is in %s state !')%(pick.state,))
+ raise osv.except_osv(_('Error!'), _('You cannot remove the picking which is in %s state!')%(pick.state,))
else:
ids2 = [move.id for move in pick.move_lines]
ctx = context.copy()
@@ -1322,7 +1322,7 @@ class stock_picking(osv.osv):
delivered_pack = self.browse(cr, uid, delivered_pack_id, context=context)
res[pick.id] = {'delivered_picking': delivered_pack.id or False}
-
+
return res
def log_picking(self, cr, uid, ids, context=None):
@@ -1364,11 +1364,11 @@ class stock_picking(osv.osv):
context.update({'view_id': res and res[1] or False})
message += state_list[pick.state]
return True
-
+
# -----------------------------------------
# OpenChatter methods and notifications
# -----------------------------------------
-
+
def _get_document_type(self, type):
type_dict = {
'out': 'Delivery order',
@@ -1376,17 +1376,17 @@ class stock_picking(osv.osv):
'internal': 'Internal picking',
}
return type_dict.get(type, 'Stock picking')
-
+
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 has been created.") % (self._get_document_type(obj.type)), context=context)
-
+
def scrap_send_note(self, cr, uid, ids, quantity, uom, name, context=None):
return self.message_append_note(cr, uid, ids, body= _("%s %s %s has been moved to scrap.") % (quantity, uom, name), context=context)
-
+
def back_order_send_note(self, cr, uid, ids, back_name, context=None):
return self.message_append_note(cr, uid, ids, body=_("Back order %s has been created.") % (back_name), context=context)
-
+
def ship_done_send_note(self, cr, uid, ids, context=None):
type_dict = {
'out': 'delivered',
@@ -1395,11 +1395,11 @@ class stock_picking(osv.osv):
}
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, [obj.id], body=_("Products have been %s.") % (type_dict.get(obj.type, 'move done')), context=context)
-
+
def ship_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 has been cancelled.") % (self._get_document_type(obj.type)), context=context)
-
+
stock_picking()
@@ -1662,12 +1662,12 @@ class stock_move(osv.osv):
_constraints = [
(_check_tracking,
- 'You must assign a serial number for this product',
+ 'You must assign a serial number for this product.',
['prodlot_id']),
- (_check_location, 'You can not move products from or to a location of the type view.',
+ (_check_location, 'You cannot move products from or to a location of the type view.',
['location_id','location_dest_id']),
(_check_product_lot,
- 'You try to assign a lot which is not from the same product',
+ 'You try to assign a lot which is not from the same product.',
['prodlot_id'])]
def _default_location_destination(self, cr, uid, context=None):
@@ -1727,7 +1727,7 @@ class stock_move(osv.osv):
if location_xml_id:
location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id)
return location_id
-
+
def _default_destination_address(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.company_id.partner_id.id
@@ -1753,8 +1753,8 @@ class stock_move(osv.osv):
for move in self.browse(cr, uid, ids, context=context):
if move.state == 'done':
if frozen_fields.intersection(vals):
- raise osv.except_osv(_('Operation forbidden'),
- _('Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator)'))
+ raise osv.except_osv(_('Operation forbidden !'),
+ _('Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
def copy(self, cr, uid, id, default=None, context=None):
@@ -2172,22 +2172,22 @@ class stock_move(osv.osv):
journal_id = accounts['stock_journal']
if acc_dest == acc_valuation:
- raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account defined on this product and Valuation account on category of this product are same.'))
+ raise osv.except_osv(_('Error!'), _('Cannot create Journal Entry, Output Account of this product and Valuation account on category of this product are same.'))
if acc_src == acc_valuation:
- raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Input Account defined on this product and Valuation account on category of this product are same.'))
+ raise osv.except_osv(_('Error!'), _('Cannot create Journal Entry, Input Account of this product and Valuation account on category of this product are same.'))
if not acc_src:
- raise osv.except_osv(_('Error!'), _('There is no stock input account defined for this product or its category: "%s" (id: %d)') % \
+ raise osv.except_osv(_('Error!'), _('Please define stock input account for this product or its category: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
if not acc_dest:
- raise osv.except_osv(_('Error!'), _('There is no stock output account defined for this product or its category: "%s" (id: %d)') % \
+ raise osv.except_osv(_('Error!'), _('Please define stock output account for this product or its category: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
if not journal_id:
- raise osv.except_osv(_('Error!'), _('There is no journal defined on the product category: "%s" (id: %d)') % \
+ raise osv.except_osv(_('Error!'), _('Please define journal on the product category: "%s" (id: %d)') % \
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
if not acc_valuation:
- raise osv.except_osv(_('Error!'), _('There is no inventory Valuation account defined on the product category: "%s" (id: %d)') % \
+ raise osv.except_osv(_('Error!'), _('Please define inventory valuation account on the product category: "%s" (id: %d)') % \
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
return journal_id, acc_src, acc_dest, acc_valuation
@@ -2367,7 +2367,7 @@ class stock_move(osv.osv):
ctx = context.copy()
for move in self.browse(cr, uid, ids, context=context):
if move.state != 'draft' and not ctx.get('call_unlink',False):
- raise osv.except_osv(_('UserError'),
+ raise osv.except_osv(_('User Error!'),
_('You can only delete draft moves.'))
return super(stock_move, self).unlink(
cr, uid, ids, context=ctx)
@@ -2393,7 +2393,7 @@ class stock_move(osv.osv):
"""
#quantity should in MOVE UOM
if quantity <= 0:
- raise osv.except_osv(_('Warning!'), _('Please provide a positive quantity to scrap!'))
+ raise osv.except_osv(_('Warning!'), _('Please provide a positive quantity to scrap.'))
res = []
for move in self.browse(cr, uid, ids, context=context):
move_qty = move.product_qty
@@ -2437,7 +2437,7 @@ class stock_move(osv.osv):
if context is None:
context = {}
if quantity <= 0:
- raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !'))
+ raise osv.except_osv(_('Warning!'), _('Please provide proper quantity.'))
res = []
@@ -2498,12 +2498,12 @@ class stock_move(osv.osv):
if context is None:
context = {}
if quantity <= 0:
- raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !'))
+ raise osv.except_osv(_('Warning!'), _('Please provide proper quantity.'))
res = []
for move in self.browse(cr, uid, ids, context=context):
move_qty = move.product_qty
if move_qty <= 0:
- raise osv.except_osv(_('Error!'), _('Can not consume a move with negative or zero quantity !'))
+ raise osv.except_osv(_('Error!'), _('Cannot consume a move with negative or zero quantity.'))
quantity_rest = move.product_qty
quantity_rest -= quantity
uos_qty_rest = quantity_rest / move_qty * move.product_uos_qty
@@ -2537,7 +2537,7 @@ class stock_move(osv.osv):
'location_id': location_id or move.location_id.id,
}
self.write(cr, uid, [move.id], update_val)
-
+
product_obj = self.pool.get('product.product')
for new_move in self.browse(cr, uid, res, context=context):
message = _("Product has been consumed with '%s' quantity.") % (new_move.product_qty)
@@ -2571,7 +2571,7 @@ class stock_move(osv.osv):
if move.state in ('done', 'cancel'):
continue
partial_data = partial_datas.get('move%s'%(move.id), False)
- assert partial_data, _('Missing partial picking data for move #%s') % (move.id)
+ assert partial_data, _('Missing partial picking data for move #%s.') % (move.id)
product_qty = partial_data.get('product_qty',0.0)
move_product_qty[move.id] = product_qty
product_uom = partial_data.get('product_uom',False)
@@ -2779,7 +2779,7 @@ class stock_inventory(osv.osv):
account_move_data_l = account_move_obj.read(cr, uid, account_move_ids, ['state'], context=context)
for account_move in account_move_data_l:
if account_move['state'] == 'posted':
- raise osv.except_osv(_('UserError'),
+ raise osv.except_osv(_('User Error!'),
_('In order to cancel this inventory, you must first unpost related journal entries.'))
account_move_obj.unlink(cr, uid, [account_move['id']], context=context)
self.write(cr, uid, [inv.id], {'state': 'cancel'}, context=context)
@@ -2889,8 +2889,8 @@ class stock_picking_in(osv.osv):
('confirmed', 'Waiting Availability'),
('assigned', 'Ready to Receive'),
('done', 'Received'),
- ('cancel', 'Cancelled'),],
- 'State', readonly=True, select=True,
+ ('cancel', 'Cancelled'),],
+ 'State', readonly=True, select=True,
help="""* Draft: not confirmed yet and will not be scheduled until confirmed\n
* Waiting Another Operation: waiting for another move to proceed before it becomes automatically available (e.g. in Make-To-Order flows)\n
* Waiting Availability: still waiting for the availability of products\n
@@ -2928,8 +2928,8 @@ class stock_picking_out(osv.osv):
('confirmed', 'Waiting Availability'),
('assigned', 'Ready to Deliver'),
('done', 'Delivered'),
- ('cancel', 'Cancelled'),],
- 'State', readonly=True, select=True,
+ ('cancel', 'Cancelled'),],
+ 'State', readonly=True, select=True,
help="""* Draft: not confirmed yet and will not be scheduled until confirmed\n
* Waiting Another Operation: waiting for another move to proceed before it becomes automatically available (e.g. in Make-To-Order flows)\n
* Waiting Availability: still waiting for the availability of products\n
diff --git a/addons/stock/wizard/stock_change_standard_price.py b/addons/stock/wizard/stock_change_standard_price.py
index d4ca8d1138f..0f3553c2cd5 100644
--- a/addons/stock/wizard/stock_change_standard_price.py
+++ b/addons/stock/wizard/stock_change_standard_price.py
@@ -104,7 +104,7 @@ class change_standard_price(osv.osv_memory):
if context is None:
context = {}
rec_id = context and context.get('active_id', False)
- assert rec_id, _('Active ID is not set in Context')
+ assert rec_id, _('Active ID is not set in Context.')
prod_obj = self.pool.get('product.product')
res = self.browse(cr, uid, ids, context=context)
datas = {
diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py
index cd6aa59dc66..10a1d625e16 100644
--- a/addons/stock/wizard/stock_fill_inventory.py
+++ b/addons/stock/wizard/stock_fill_inventory.py
@@ -113,7 +113,7 @@ class stock_fill_inventory(osv.osv_memory):
res[location] = datas
if not flag:
- raise osv.except_osv(_('Warning !'), _('No product in this location.'))
+ raise osv.except_osv(_('Warning!'), _('No product in this location.'))
for stock_move in res.values():
for stock_move_details in stock_move.values():
diff --git a/addons/stock/wizard/stock_inventory_line_split.py b/addons/stock/wizard/stock_inventory_line_split.py
index b2d503ff73d..4d99d9d79e5 100644
--- a/addons/stock/wizard/stock_inventory_line_split.py
+++ b/addons/stock/wizard/stock_inventory_line_split.py
@@ -53,7 +53,7 @@ class stock_inventory_line_split(osv.osv_memory):
if context is None:
context = {}
assert context.get('active_model') == 'stock.inventory.line',\
- 'Incorrect use of the inventory line split wizard'
+ 'Incorrect use of the inventory line split wizard.'
prodlot_obj = self.pool.get('stock.production.lot')
ir_sequence_obj = self.pool.get('ir.sequence')
line_obj = self.pool.get('stock.inventory.line')
diff --git a/addons/stock/wizard/stock_inventory_merge.py b/addons/stock/wizard/stock_inventory_merge.py
index 8109d75c515..b61ccbbed84 100644
--- a/addons/stock/wizard/stock_inventory_merge.py
+++ b/addons/stock/wizard/stock_inventory_merge.py
@@ -40,7 +40,7 @@ class stock_inventory_merge(osv.osv_memory):
context={}
res = super(stock_inventory_merge, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if context.get('active_model','') == 'stock.inventory' and len(context['active_ids']) < 2:
- raise osv.except_osv(_('Warning'),
+ raise osv.except_osv(_('Warning!'),
_('Please select multiple physical inventories to merge in the list view.'))
return res
@@ -60,7 +60,7 @@ class stock_inventory_merge(osv.osv_memory):
context = {}
for inventory in invent_obj.browse(cr, uid, context['active_ids'], context=context):
if inventory.state == "done":
- raise osv.except_osv(_('Warning'),
+ raise osv.except_osv(_('Warning!'),
_('Merging is only allowed on draft inventories.'))
for line in inventory.inventory_line_id:
diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py
index ca294f8ec79..059c68e5054 100644
--- a/addons/stock/wizard/stock_invoice_onshipping.py
+++ b/addons/stock/wizard/stock_invoice_onshipping.py
@@ -93,9 +93,9 @@ class stock_invoice_onshipping(osv.osv_memory):
if pick.invoice_state != '2binvoiced':
count += 1
if len(active_ids) == 1 and count:
- raise osv.except_osv(_('Warning !'), _('This picking list does not require invoicing.'))
+ raise osv.except_osv(_('Warning!'), _('This picking list does not require invoicing.'))
if len(active_ids) == count:
- raise osv.except_osv(_('Warning !'), _('None of these picking lists require invoicing.'))
+ raise osv.except_osv(_('Warning!'), _('None of these picking lists require invoicing.'))
return res
def open_invoice(self, cr, uid, ids, context=None):
@@ -109,7 +109,7 @@ class stock_invoice_onshipping(osv.osv_memory):
action_model = False
action = {}
if not invoice_ids:
- raise osv.except_osv(_('Error'), _('No Invoices were created'))
+ raise osv.except_osv(_('Error!'), _('Please create Invoices.'))
if inv_type == "out_invoice":
action_model,action_id = data_pool.get_object_reference(cr, uid, 'account', "action_invoice_tree1")
elif inv_type == "in_invoice":
diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py
index e94bd6f2d32..1f3dcc3372d 100644
--- a/addons/stock/wizard/stock_move.py
+++ b/addons/stock/wizard/stock_move.py
@@ -210,7 +210,7 @@ class split_in_production_lot(osv.osv_memory):
quantity = line.quantity
total_move_qty += quantity
if total_move_qty > move_qty:
- raise osv.except_osv(_('Processing Error'), _('Serial number quantity %d of %s is larger than available quantity (%d) !') \
+ raise osv.except_osv(_('Processing Error!'), _('Serial number quantity %d of %s is larger than available quantity (%d)!') \
% (total_move_qty, move.product_id.name, move_qty))
if quantity <= 0 or move_qty == 0:
continue
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index c255c7d5834..aeda84efb75 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -60,7 +60,7 @@ class stock_partial_move(osv.osv_memory):
def do_partial(self, cr, uid, ids, context=None):
# no call to super!
- assert len(ids) == 1, 'Partial move processing may only be done one form at a time'
+ assert len(ids) == 1, 'Partial move processing may only be done one form at a time.'
partial = self.browse(cr, uid, ids[0], context=context)
partial_data = {
'delivery_date' : partial.date
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index a57e720684f..b3720b8a51b 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -158,7 +158,7 @@ class stock_partial_picking(osv.osv_memory):
return partial_move
def do_partial(self, cr, uid, ids, context=None):
- assert len(ids) == 1, 'Partial picking processing may only be done one at a time'
+ assert len(ids) == 1, 'Partial picking processing may only be done one at a time.'
stock_picking = self.pool.get('stock.picking')
stock_move = self.pool.get('stock.move')
uom_obj = self.pool.get('product.uom')
@@ -173,14 +173,14 @@ class stock_partial_picking(osv.osv_memory):
#Quantiny must be Positive
if wizard_line.quantity < 0:
- raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !'))
+ raise osv.except_osv(_('Warning!'), _('Please provide proper Quantity.'))
#Compute the quantity for respective wizard_line in the line uom (this jsut do the rounding if necessary)
qty_in_line_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, line_uom.id)
if line_uom.factor and line_uom.factor <> 0:
if qty_in_line_uom <> wizard_line.quantity:
- raise osv.except_osv(_('Warning'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
+ raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
if move_id:
#Check rounding Quantity.ex.
#picking: 1kg, uom kg rounding = 0.01 (rounding to 10g),
@@ -191,7 +191,7 @@ class stock_partial_picking(osv.osv_memory):
qty_in_initial_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, initial_uom.id)
without_rounding_qty = (wizard_line.quantity / line_uom.factor) * initial_uom.factor
if qty_in_initial_uom <> without_rounding_qty:
- raise osv.except_osv(_('Warning'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
+ raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
else:
seq_obj_name = 'stock.picking.' + picking_type
move_id = stock_move.create(cr,uid,{'name' : self.pool.get('ir.sequence').get(cr, uid, seq_obj_name),
diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py
index 4c85ddcae85..fb8e327b71f 100644
--- a/addons/stock/wizard/stock_return_picking.py
+++ b/addons/stock/wizard/stock_return_picking.py
@@ -96,14 +96,14 @@ class stock_return_picking(osv.osv_memory):
pick_obj = self.pool.get('stock.picking')
pick = pick_obj.browse(cr, uid, record_id, context=context)
if pick.state not in ['done','confirmed','assigned']:
- raise osv.except_osv(_('Warning !'), _("You may only return pickings that are Confirmed, Available or Done!"))
+ raise osv.except_osv(_('Warning!'), _("You may only return pickings that are Confirmed, Available or Done!"))
valid_lines = 0
return_history = self.get_return_history(cr, uid, record_id, context)
for m in pick.move_lines:
if m.product_qty * m.product_uom.factor > return_history[m.id]:
valid_lines += 1
if not valid_lines:
- raise osv.except_osv(_('Warning !'), _("There are no products to return (only lines in Done state and not fully returned yet can be returned)!"))
+ raise osv.except_osv(_('Warning!'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!"))
return res
def get_return_history(self, cr, uid, pick_id, context=None):
@@ -195,7 +195,7 @@ class stock_return_picking(osv.osv_memory):
})
move_obj.write(cr, uid, [move.id], {'move_history_ids2':[(4,new_move)]}, context=context)
if not returned_lines:
- raise osv.except_osv(_('Warning !'), _("Please specify at least one non-zero quantity!"))
+ raise osv.except_osv(_('Warning!'), _("Please specify at least one non-zero quantity."))
if set_invoice_state_to_none:
pick_obj.write(cr, uid, [pick.id], {'invoice_state':'none'}, context=context)
diff --git a/addons/stock/wizard/stock_splitinto.py b/addons/stock/wizard/stock_splitinto.py
index d9b34a604cf..1b70a36f8e4 100644
--- a/addons/stock/wizard/stock_splitinto.py
+++ b/addons/stock/wizard/stock_splitinto.py
@@ -51,7 +51,7 @@ class stock_split_into(osv.osv_memory):
# (move.product_id.name, move.product_id.id,))
if quantity > move.product_qty:
raise osv.except_osv(_('Error!'), _('Total quantity after split exceeds the quantity to split ' \
- 'for this product: "%s" (id: %d)') % \
+ 'for this product: "%s" (id: %d).') % \
(move.product_id.name, move.product_id.id,))
if quantity > 0:
move_obj.setlast_tracking(cr, uid, [move.id], context=context)
diff --git a/addons/stock_location/procurement_pull.py b/addons/stock_location/procurement_pull.py
index ca397f7fa2d..5482669f543 100644
--- a/addons/stock_location/procurement_pull.py
+++ b/addons/stock_location/procurement_pull.py
@@ -55,7 +55,7 @@ class procurement_order(osv.osv):
for line in proc.product_id.flow_pull_ids:
if line.location_id == proc.location_id:
break
- assert line, 'Line can not be False if we are on this state of the workflow'
+ assert line, 'Line cannot be False if we are on this state of the workflow'
origin = (proc.origin or proc.name or '').split(':')[0] +':'+line.name
picking_id = picking_obj.create(cr, uid, {
'origin': origin,
diff --git a/addons/stock_planning/stock_planning.py b/addons/stock_planning/stock_planning.py
index e6f3b8d4218..7fcaf23045e 100644
--- a/addons/stock_planning/stock_planning.py
+++ b/addons/stock_planning/stock_planning.py
@@ -29,7 +29,7 @@ from tools.translate import _
import logging
import decimal_precision as dp
-_logger = logging.getLogger(__name__)
+_logger = logging.getLogger(__name__)
def rounding(fl, round_value):
@@ -52,11 +52,11 @@ class stock_period(osv.osv):
_defaults = {
'state': 'draft'
}
-
+
def button_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'open'})
return True
-
+
def button_close(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'close'})
return True
@@ -143,7 +143,7 @@ class stock_sale_forecast(osv.osv):
if t['state'] in ('draft'):
unlink_ids.append(t['id'])
else:
- raise osv.except_osv(_('Invalid action !'), _('Cannot delete a validated sales forecast!'))
+ raise osv.except_osv(_('Invalid Action!'), _('Cannot delete a validated sales forecast.'))
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
return True
@@ -172,7 +172,7 @@ class stock_sale_forecast(osv.osv):
res = {'value': ret}
return res
- def onchange_uom(self, cr, uid, ids, product_uom=False, product_qty=0.0,
+ def onchange_uom(self, cr, uid, ids, product_uom=False, product_qty=0.0,
active_uom=False, product_id=False):
ret = {}
if product_uom and product_id:
@@ -430,7 +430,7 @@ class stock_planning(osv.osv):
result['warehouse_id'] = False
return {'value': result}
- def onchange_uom(self, cr, uid, ids, product_uom=False, product_id=False, active_uom=False,
+ def onchange_uom(self, cr, uid, ids, product_uom=False, product_id=False, active_uom=False,
planned_outgoing=0.0, to_procure=0.0):
ret = {}
if not product_uom:
@@ -623,7 +623,7 @@ class stock_planning(osv.osv):
def procure_incomming_left(self, cr, uid, ids, context, *args):
for obj in self.browse(cr, uid, ids, context=context):
if obj.incoming_left <= 0:
- raise osv.except_osv(_('Error !'), _('Incoming Left must be greater than 0 !'))
+ raise osv.except_osv(_('Error!'), _('Incoming Left must be greater than 0.'))
uom_qty, uom, uos_qty, uos = self._qty_to_standard(cr, uid, obj, context)
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
proc_id = self.pool.get('procurement.order').create(cr, uid, {
@@ -667,11 +667,11 @@ class stock_planning(osv.osv):
def internal_supply(self, cr, uid, ids, context, *args):
for obj in self.browse(cr, uid, ids, context=context):
if obj.incoming_left <= 0:
- raise osv.except_osv(_('Error !'), _('Incoming Left must be greater than 0 !'))
+ raise osv.except_osv(_('Error!'), _('Incoming Left must be greater than 0.'))
if not obj.supply_warehouse_id:
- raise osv.except_osv(_('Error !'), _('You must specify a Source Warehouse !'))
+ raise osv.except_osv(_('Error!'), _('You must specify a Source Warehouse.'))
if obj.supply_warehouse_id.id == obj.warehouse_id.id:
- raise osv.except_osv(_('Error !'), _('You must specify a Source Warehouse different than calculated (destination) Warehouse !'))
+ raise osv.except_osv(_('Error!'), _('You must specify a Source Warehouse different than calculated (destination) Warehouse.'))
uom_qty, uom, uos_qty, uos = self._qty_to_standard(cr, uid, obj, context)
user = self.pool.get('res.users').browse(cr, uid, uid, context)
picking_id = self.pool.get('stock.picking').create(cr, uid, {
diff --git a/addons/stock_planning/wizard/stock_planning_createlines.py b/addons/stock_planning/wizard/stock_planning_createlines.py
index 3d43241341d..394606ebb4d 100644
--- a/addons/stock_planning/wizard/stock_planning_createlines.py
+++ b/addons/stock_planning/wizard/stock_planning_createlines.py
@@ -68,7 +68,7 @@ class stock_planning_createlines(osv.osv_memory):
prod_categ_ids = prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)])
products_id1 = product_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)])
if len(products_id1)==0:
- raise osv.except_osv(_('Error !'), _('No forecasts for selected period or no products in selected category !'))
+ raise osv.except_osv(_('Error!'), _('No forecasts for selected period or no products available in selected category !'))
for p in product_obj.browse(cr, uid, products_id1,context=context):
if len(planning_obj.search(cr, uid, [('product_id','=',p.id),
diff --git a/addons/stock_planning/wizard/stock_planning_forecast.py b/addons/stock_planning/wizard/stock_planning_forecast.py
index c72ac0599ea..3dad3624aa4 100644
--- a/addons/stock_planning/wizard/stock_planning_forecast.py
+++ b/addons/stock_planning/wizard/stock_planning_forecast.py
@@ -55,7 +55,7 @@ class stock_sale_forecast_createlines(osv.osv_memory):
prod_categ_ids = prod_categ_obj.search(cr, uid, [('parent_id','child_of', categ_ids)])
products_ids = product_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)])
if len(products_ids) == 0:
- raise osv.except_osv(_('Error !'), _('No products in selected category !'))
+ raise osv.except_osv(_('Error!'), _('No products available in selected category !'))
copy = f.copy_forecast
for p in product_obj.browse(cr, uid, products_ids,{}):
if len(forecast_obj.search(cr, uid, [('product_id','=',p.id) , \
diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py
index 271a87f7bb9..45916e04aee 100644
--- a/addons/subscription/subscription.py
+++ b/addons/subscription/subscription.py
@@ -133,7 +133,7 @@ class subscription_subscription(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for record in self.browse(cr, uid, ids, context or {}):
if record.state=="running":
- raise osv.except_osv(_('Error !'),_('You cannot delete an active subscription !'))
+ raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription !'))
return super(subscription_subscription, self).unlink(cr, uid, ids, context)
def set_done(self, cr, uid, ids, context=None):
diff --git a/addons/survey/i18n/survey.pot b/addons/survey/i18n/survey.pot
index 28ea57f11f6..7b8abb90aa1 100644
--- a/addons/survey/i18n/survey.pot
+++ b/addons/survey/i18n/survey.pot
@@ -501,7 +501,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/survey.py:439
#, python-format
-msgid "You must enter one or more menu choices in column heading"
+msgid "You must enter one or more menu choices in column heading."
msgstr ""
#. module: survey
@@ -584,7 +584,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_answer.py:126
#, python-format
-msgid "You can not answer this survey more than %s times"
+msgid "You cannot answer this survey more than %s times."
msgstr ""
#. module: survey
@@ -595,7 +595,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_answer.py:119
#, python-format
-msgid "You can not answer because the survey is not open"
+msgid "You cannot answer because the survey is not open."
msgstr ""
#. module: survey
@@ -632,7 +632,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/survey.py:479
#, python-format
-msgid "You must enter one or more menu choices in column heading (white spaces not allowed)"
+msgid "You must enter one or more menu choices in column heading (white spaces not allowed)."
msgstr ""
#. module: survey
@@ -643,7 +643,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/survey.py:477
#, python-format
-msgid "You must enter one or more menu choices in column heading"
+msgid "You must enter one or more menu choices in column heading."
msgstr ""
#. module: survey
@@ -683,14 +683,14 @@ msgstr ""
#: code:addons/survey/survey.py:370
#: code:addons/survey/survey.py:457
#, python-format
-msgid "You must enter one or more column heading."
+msgid "You must enter one or more column headings."
msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_answer.py:745
#: code:addons/survey/wizard/survey_answer.py:940
#, python-format
-msgid "Please enter an integer value"
+msgid "Please enter an integer value."
msgstr ""
#. module: survey
@@ -815,7 +815,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_selection.py:83
#, python-format
-msgid "You can not give more response. Please contact the author of this survey for further assistance."
+msgid "You cannot give more responses. Please contact the author of this survey for further assistance."
msgstr ""
#. module: survey
@@ -910,7 +910,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/survey.py:472
#, python-format
-msgid "Maximum Required Answer is greater than Minimum Required Answer"
+msgid "Maximum Required Answer is greater than Minimum Required Answer."
msgstr ""
#. module: survey
@@ -1131,7 +1131,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_selection.py:80
#, python-format
-msgid "You can not give response for this survey more than %s times"
+msgid "You cannot give response for this survey more than %s times."
msgstr ""
#. module: survey
@@ -1370,7 +1370,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_answer.py:779
#, python-format
-msgid "You cannot select the same answer more than one time"
+msgid "You cannot select the same answer more than one time."
msgstr ""
#. module: survey
@@ -1449,7 +1449,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/survey.py:453
#, python-format
-msgid "You must enter one or more answer."
+msgid "You must enter one or more answers."
msgstr ""
#. module: survey
@@ -1487,7 +1487,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/wizard/survey_answer.py:971
#, python-format
-msgid "You cannot select same answer more than one time'"
+msgid "You cannot select same answer more than one time.'"
msgstr ""
#. module: survey
@@ -1528,7 +1528,7 @@ msgstr ""
#. module: survey
#: code:addons/survey/survey.py:382
#, python-format
-msgid "You must enter one or more Answer."
+msgid "You must enter one or more Answers."
msgstr ""
#. module: survey
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index 0ebaa2aa586..0a96d1fde1c 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -379,7 +379,7 @@ class survey_question(osv.osv):
if que_type in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans',\
'matrix_of_drop_down_menus', 'rating_scale']:
if not col_len:
- raise osv.except_osv(_('Warning !'),_("You must enter one or more column heading."))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more column headings."))
ans_len = len(question['answer_choice_ids'])
if vals.has_key('answer_choice_ids'):
@@ -391,7 +391,7 @@ class survey_question(osv.osv):
if que_type not in ['descriptive_text', 'single_textbox', 'comment','table']:
if not ans_len:
- raise osv.except_osv(_('Warning !'),_("You must enter one or more Answer."))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more Answers."))
req_type = ""
if vals.has_key('required_type'):
@@ -405,12 +405,12 @@ class survey_question(osv.osv):
if req_type in ['at least', 'at most', 'exactly']:
if vals.has_key('req_ans'):
if not vals['req_ans'] or vals['req_ans'] > ans_len:
- raise osv.except_osv(_('Warning !'),_("#Required Answer you entered \
+ raise osv.except_osv(_('Warning!'),_("#Required Answer you entered \
is greater than the number of answer. \
Please use a number that is smaller than %d.") % (ans_len + 1))
else:
if not question['req_ans'] or question['req_ans'] > ans_len:
- raise osv.except_osv(_('Warning !'),_("#Required Answer you entered is \
+ raise osv.except_osv(_('Warning!'),_("#Required Answer you entered is \
greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
@@ -420,40 +420,40 @@ class survey_question(osv.osv):
if vals.has_key('minimum_req_ans'):
minimum_ans = vals['minimum_req_ans']
if not vals['minimum_req_ans'] or vals['minimum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning !'),_("Minimum Required Answer\
+ raise osv.except_osv(_('Warning!'),_("Minimum Required Answer\
you entered is greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
else:
minimum_ans = question['minimum_req_ans']
if not question['minimum_req_ans'] or question['minimum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning !'),_("Minimum Required Answer you\
+ raise osv.except_osv(_('Warning!'),_("Minimum Required Answer you\
entered is greater than the number of answer. \
Please use a number that is smaller than %d.") % (ans_len + 1))
if vals.has_key('maximum_req_ans'):
maximum_ans = vals['maximum_req_ans']
if not vals['maximum_req_ans'] or vals['maximum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning !'),_("Maximum Required Answer you \
+ raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you \
entered for your maximum is greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
else:
maximum_ans = question['maximum_req_ans']
if not question['maximum_req_ans'] or question['maximum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning !'),_("Maximum Required Answer you\
+ raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you\
entered for your maximum is greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
if maximum_ans <= minimum_ans:
- raise osv.except_osv(_('Warning !'),_("Maximum Required Answer is greater \
+ raise osv.except_osv(_('Warning!'),_("Maximum Required Answer is greater \
than Minimum Required Answer"))
if question['type'] == 'matrix_of_drop_down_menus' and vals.has_key('column_heading_ids'):
for col in vals['column_heading_ids']:
if not col[2] or not col[2].has_key('menu_choice') or not col[2]['menu_choice']:
- raise osv.except_osv(_('Warning !'),_("You must enter one or more menu choices\
- in column heading"))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices\
+ in column heading."))
elif not col[2] or not col[2].has_key('menu_choice') or\
col[2]['menu_choice'].strip() == '':
- raise osv.except_osv(_('Warning !'),_("You must enter one or more menu \
- choices in column heading (white spaces not allowed)"))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more menu \
+ choices in column heading (white spaces not allowed)."))
return super(survey_question, self).write(cr, uid, ids, vals, context=context)
@@ -462,33 +462,33 @@ class survey_question(osv.osv):
maximum_ans = 0
if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']):
if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']:
- raise osv.except_osv(_('Warning !'),_("You must enter one or more answer."))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more answers."))
if vals.has_key('column_heading_ids') and not len(vals['column_heading_ids']):
if vals.has_key('type') and vals['type'] in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale']:
- raise osv.except_osv(_('Warning !'),_("You must enter one or more column heading."))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more column heading."))
if vals['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time']:
if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] in ['at least', 'at most', 'exactly']:
if vals.has_key('answer_choice_ids') and vals['req_ans'] > len(vals['answer_choice_ids']) or not vals['req_ans']:
- raise osv.except_osv(_('Warning !'),_("#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
+ raise osv.except_osv(_('Warning!'),_("#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] == 'a range':
minimum_ans = vals['minimum_req_ans']
maximum_ans = vals['maximum_req_ans']
if vals.has_key('answer_choice_ids') or vals['minimum_req_ans'] > len(vals['answer_choice_ids']) or not vals['minimum_req_ans']:
- raise osv.except_osv(_('Warning !'),_("Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
+ raise osv.except_osv(_('Warning!'),_("Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
if vals.has_key('answer_choice_ids') or vals['maximum_req_ans'] > len(vals['answer_choice_ids']) or not vals['maximum_req_ans']:
- raise osv.except_osv(_('Warning !'),_("Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
+ raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
if maximum_ans <= minimum_ans:
- raise osv.except_osv(_('Warning !'),_("Maximum Required Answer is greater than Minimum Required Answer"))
+ raise osv.except_osv(_('Warning!'),_("Maximum Required Answer is greater than Minimum Required Answer."))
if vals['type'] == 'matrix_of_drop_down_menus':
for col in vals['column_heading_ids']:
if not col[2] or not col[2].has_key('menu_choice') or not col[2]['menu_choice']:
- raise osv.except_osv(_('Warning !'),_("You must enter one or more menu choices in column heading"))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices in column heading."))
elif not col[2] or not col[2].has_key('menu_choice') or col[2]['menu_choice'].strip() == '':
- raise osv.except_osv(_('Warning !'),_("You must enter one or more menu choices in column heading (white spaces not allowed)"))
+ raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices in column heading (white spaces not allowed)."))
res = super(survey_question, self).create(cr, uid, vals, context)
return res
@@ -639,7 +639,7 @@ class survey_response(osv.osv):
return res
def copy(self, cr, uid, id, default=None, context=None):
- raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
+ raise osv.except_osv(_('Warning!'),_('You cannot duplicate the resource!'))
survey_response()
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index 15e2b56a1be..b3f27ed2970 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -116,14 +116,14 @@ class survey_question_wiz(osv.osv_memory):
if ((context.has_key('active') and not context.get('active', False)) \
or not context.has_key('active')) and not sur_name_rec.page_no + 1:
if sur_rec.state != "open" :
- raise osv.except_osv(_('Warning !'),_("You can not answer because the survey is not open"))
+ raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
cr.execute('select count(id) from survey_history where user_id=%s\
and survey_id=%s', (uid,survey_id))
res = cr.fetchone()[0]
user_limit = survey_obj.browse(cr, uid, survey_id)
user_limit = user_limit.response_user
if user_limit and res >= user_limit:
- raise osv.except_osv(_('Warning !'),_("You can not answer this survey more than %s times") % (user_limit))
+ raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
@@ -684,7 +684,7 @@ class survey_question_wiz(osv.osv_memory):
if error:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
resp_obj.write(cr, uid, resp_id, {'comment':val1})
sur_name_read['store_ans'][resp_id].update({key1:val1})
@@ -723,7 +723,7 @@ class survey_question_wiz(osv.osv_memory):
if error:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
if key1.split('_')[1] == "single" :
resp_obj.write(cr, uid, resp_id, {'single_text':val1})
@@ -743,7 +743,7 @@ class survey_question_wiz(osv.osv_memory):
except:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + _("Please enter an integer value"))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + _("Please enter an integer value."))
elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) == 3:
if type(val1) == type('') or type(val1) == type(u''):
@@ -772,12 +772,12 @@ class survey_question_wiz(osv.osv_memory):
if comment_field and comment_value:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
if que_rec['type'] == "rating_scale" and que_rec['rating_allow_one_column_require'] and len(selected_value) > len(list(set(selected_value))):
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "'\n" + _("You cannot select the same answer more than one time"))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "'\n" + _("You cannot select the same answer more than one time."))
if not select_count:
resp_obj.write(cr, uid, resp_id, {'state':'skip'})
@@ -785,7 +785,7 @@ class survey_question_wiz(osv.osv_memory):
if que_rec['numeric_required_sum'] and numeric_sum > que_rec['numeric_required_sum']:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
if que_rec['type'] in ['multiple_textboxes_diff_type', 'multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']:
if matrix_list:
@@ -796,7 +796,7 @@ class survey_question_wiz(osv.osv_memory):
(que_rec['required_type'] == 'a range' and (len(list(set(matrix_list))) < que_rec['minimum_req_ans'] or len(list(set(matrix_list))) > que_rec['maximum_req_ans'])):
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
elif (que_rec['required_type'] == 'all' and select_count < len(que_rec['answer_choice_ids'])) or \
(que_rec['required_type'] == 'at least' and select_count < que_rec['req_ans']) or \
@@ -805,12 +805,12 @@ class survey_question_wiz(osv.osv_memory):
(que_rec['required_type'] == 'a range' and (select_count < que_rec['minimum_req_ans'] or select_count > que_rec['maximum_req_ans'])):
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and que_rec['is_require_answer'] and select_count <= 0:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
else:
resp_id_list = []
@@ -884,7 +884,7 @@ class survey_question_wiz(osv.osv_memory):
if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
error = True
if error:
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
resp_obj.write(cr, uid, update, {'comment':val,'state': 'done'})
sur_name_read['store_ans'][update].update({key:val})
@@ -920,7 +920,7 @@ class survey_question_wiz(osv.osv_memory):
if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
error = True
if error:
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
if key.split('_')[1] == "single" :
resp_obj.write(cr, uid, update, {'single_text':val,'state': 'done'})
else:
@@ -938,7 +938,7 @@ class survey_question_wiz(osv.osv_memory):
sur_name_read['store_ans'][update].update({key:val})
select_count += 1
except:
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "'\n" + _("Please enter an integer value"))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "'\n" + _("Please enter an integer value."))
elif val and len(key.split('_')) == 3:
resp_obj.write(cr, uid, update, {'state': 'done'})
@@ -966,13 +966,13 @@ class survey_question_wiz(osv.osv_memory):
sur_name_read['store_ans'][update].update({key:val})
if comment_field and comment_value:
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
if que_rec['type'] == "rating_scale" and que_rec['rating_allow_one_column_require'] and len(selected_value) > len(list(set(selected_value))):
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "\n" + _("You cannot select same answer more than one time'"))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "\n" + _("You cannot select same answer more than one time.'"))
if que_rec['numeric_required_sum'] and numeric_sum > que_rec['numeric_required_sum']:
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
if not select_count:
resp_obj.write(cr, uid, update, {'state': 'skip'})
@@ -984,17 +984,17 @@ class survey_question_wiz(osv.osv_memory):
(que_rec['required_type'] == 'at most' and len(list(set(matrix_list))) > que_rec['req_ans']) or \
(que_rec['required_type'] == 'exactly' and len(list(set(matrix_list))) != que_rec['req_ans']) or \
(que_rec['required_type'] == 'a range' and (len(list(set(matrix_list))) < que_rec['minimum_req_ans'] or len(list(set(matrix_list))) > que_rec['maximum_req_ans'])):
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
elif (que_rec['required_type'] == 'all' and select_count < len(que_rec['answer_choice_ids'])) or \
(que_rec['required_type'] == 'at least' and select_count < que_rec['req_ans']) or \
(que_rec['required_type'] == 'at most' and select_count > que_rec['req_ans']) or \
(que_rec['required_type'] == 'exactly' and select_count != que_rec['req_ans']) or \
(que_rec['required_type'] == 'a range' and (select_count < que_rec['minimum_req_ans'] or select_count > que_rec['maximum_req_ans'])):
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and que_rec['is_require_answer'] and select_count <= 0:
- raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
+ raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
return survey_question_wiz_id
diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py
index 279571f4f95..f3835a751b4 100644
--- a/addons/survey/wizard/survey_selection.py
+++ b/addons/survey/wizard/survey_selection.py
@@ -77,10 +77,10 @@ class survey_name_wiz(osv.osv_memory):
res = cr.fetchone()[0]
sur_rec = survey_obj.browse(cr,uid,survey_id,context=context)
if sur_rec.response_user and res >= sur_rec.response_user:
- raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (sur_rec.response_user))
+ raise osv.except_osv(_('Warning!'),_("You cannot give response for this survey more than %s times.") % (sur_rec.response_user))
if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey:
- raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
+ raise osv.except_osv(_('Warning!'),_("You cannot give more responses. Please contact the author of this survey for further assistance."))
search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
return {
diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py
index 3df1f2af713..da439959ec5 100644
--- a/addons/survey/wizard/survey_send_invitation.py
+++ b/addons/survey/wizard/survey_send_invitation.py
@@ -71,7 +71,7 @@ class survey_send_invitation(osv.osv_memory):
if sur.state != 'open':
msg += sur.title + "\n"
if msg:
- raise osv.except_osv(_('Warning !'), _('%sSurvey is not in open state') % msg)
+ raise osv.except_osv(_('Warning!'), _('%sSurvey is not in open state') % msg)
data['mail'] = '''Hello %(name)s, \n\n We are inviting you for following survey. \
\n ''' + name + '''\n Your login ID: %(login)s, Your password: %(passwd)s
\n link :- http://'''+ str(socket.gethostname()) + ''':8080 \n\n Thanks,'''
diff --git a/addons/wiki/i18n/wiki.pot b/addons/wiki/i18n/wiki.pot
index 8349e7691be..e5ef29bd93e 100644
--- a/addons/wiki/i18n/wiki.pot
+++ b/addons/wiki/i18n/wiki.pot
@@ -115,7 +115,7 @@ msgstr ""
#. module: wiki
#: code:addons/wiki/wizard/wiki_make_index.py:52
#, python-format
-msgid "There is no section in this Page"
+msgid "There is no section in this Page."
msgstr ""
#. module: wiki
@@ -152,7 +152,7 @@ msgstr ""
#. module: wiki
#: code:addons/wiki/wiki.py:237
#, python-format
-msgid "There are no changes in revisions"
+msgid "There are no changes in revisions."
msgstr ""
#. module: wiki
@@ -374,7 +374,7 @@ msgstr ""
#. module: wiki
#: code:addons/wiki/wizard/wiki_show_diff.py:54
#, python-format
-msgid "You need to select minimum 1 or maximum 2 history revision!"
+msgid "You need to select minimum one or maximum two history revisions!"
msgstr ""
#. module: wiki
diff --git a/addons/wiki/web/widgets/rss/feedparser.py b/addons/wiki/web/widgets/rss/feedparser.py
index 885050d49f8..35cbb975d3f 100755
--- a/addons/wiki/web/widgets/rss/feedparser.py
+++ b/addons/wiki/web/widgets/rss/feedparser.py
@@ -233,7 +233,7 @@ class FeedParserDict(UserDict):
assert not key.startswith('_')
return self.__getitem__(key)
except:
- raise AttributeError, "object has no attribute '%s'" % key
+ raise AttributeError, "Object has no attribute '%s'" % key
def __setattr__(self, key, value):
if key.startswith('_') or key == 'data':
diff --git a/addons/wiki/wiki.py b/addons/wiki/wiki.py
index fa1dca8e95a..b945635bb92 100644
--- a/addons/wiki/wiki.py
+++ b/addons/wiki/wiki.py
@@ -234,7 +234,7 @@ class wiki_history(osv.osv):
if text2:
line2=tools.ustr(text2.splitlines(1))
if (not line1 and not line2) or (line1 == line2):
- raise osv.except_osv(_('Warning !'), _('There are no changes in revisions'))
+ raise osv.except_osv(_('Warning!'), _('There are no changes in revisions.'))
diff = difflib.HtmlDiff()
return diff.make_file(line1, line2, "Revision-%s" % (v1), "Revision-%s" % (v2), context=False)
diff --git a/addons/wiki/wizard/wiki_make_index.py b/addons/wiki/wizard/wiki_make_index.py
index 27978f9b8ec..83dd4a3b566 100644
--- a/addons/wiki/wizard/wiki_make_index.py
+++ b/addons/wiki/wizard/wiki_make_index.py
@@ -49,7 +49,7 @@ class wiki_make_index(osv.osv_memory):
order by section ", (tuple(data),))
lst0 = cr.fetchall()
if not lst0[0][1]:
- raise osv.except_osv(_('Warning !'), _('There is no section in this Page'))
+ raise osv.except_osv(_('Warning!'), _('There is no section in this Page.'))
lst = []
s_ids = {}
diff --git a/addons/wiki/wizard/wiki_show_diff.py b/addons/wiki/wizard/wiki_show_diff.py
index 278c91064df..acc7b67d026 100644
--- a/addons/wiki/wizard/wiki_show_diff.py
+++ b/addons/wiki/wizard/wiki_show_diff.py
@@ -51,7 +51,7 @@ class showdiff(osv.osv_memory):
nids.sort()
diff = base64.encodestring(history.getDiff(cr, uid, ids[0], nids[-1]))
else:
- raise osv.except_osv(_('Warning'), _('You need to select minimum 1 or maximum 2 history revision!'))
+ raise osv.except_osv(_('Warning!'), _('You need to select minimum one or maximum two history revisions!'))
return diff