From 3fadbdcfc0e68f6268b8e2dc58cbce8597376be1 Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 11 Jul 2012 14:18:21 +0530 Subject: [PATCH 01/71] [IMP]Account : Changes in Warning Message bzr revid: hsa@tinyerp.com-20120711084821-4reozitt3vgo9u31 --- addons/account/account.py | 18 +++++++++--------- addons/account/account_cash_statement.py | 2 +- addons/account/account_invoice.py | 12 ++++++------ addons/account/account_move_line.py | 4 ++-- .../account_report_aged_partner_balance.py | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index caf1d68c45d..deae89513a8 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -624,7 +624,7 @@ class account_account(osv.osv): value = 'account.account,' + str(ids[0]) partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context) if partner_prop_acc: - raise osv.except_osv(_('Warning !'), _('You can not remove/desactivate an account which is set on a customer or supplier.')) + raise osv.except_osv(_('Warning !'), _('You cannot remove/deactivate an account which is set on a customer or supplier.')) return True def _check_allow_type_change(self, cr, uid, ids, new_type, context=None): @@ -907,7 +907,7 @@ class account_fiscalyear(osv.osv): return True _constraints = [ - (_check_duration, 'Error! The start date of the fiscal year must be before his end date.', ['date_start','date_stop']) + (_check_duration, 'Error! The start date of the fiscal year must be less than the end date.', ['date_start','date_stop']) ] def create_period3(self, cr, uid, ids, context=None): @@ -1025,7 +1025,7 @@ class account_period(osv.osv): _constraints = [ (_check_duration, 'Error ! The duration of the Period(s) is/are invalid. ', ['date_stop']), - (_check_year_limit, 'Invalid period ! Some periods overlap or the date period is not in the scope of the fiscal year. ', ['date_stop']) + (_check_year_limit, 'Invalid period ! Some periods overlap or the date period which is not in the scope of the fiscal year. ', ['date_stop']) ] def next(self, cr, uid, period, step, context=None): @@ -1072,7 +1072,7 @@ class account_period(osv.osv): if 'company_id' in vals: move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)]) if move_lines: - raise osv.except_osv(_('Warning !'), _('You can not modify company of this period as some journal items exists.')) + raise osv.except_osv(_('Warning !'), _('You cannot modify company of this period as some journal items exist.')) return super(account_period, self).write(cr, uid, ids, vals, context=context) def build_ctx_periods(self, cr, uid, period_from_id, period_to_id): @@ -1085,9 +1085,9 @@ class account_period(osv.osv): period_date_stop = period_to.date_stop company2_id = period_to.company_id.id if company1_id != company2_id: - raise osv.except_osv(_('Error'), _('You should have chosen periods that belongs to the same company')) + raise osv.except_osv(_('Error'), _('You should choose the periods that belong to the same company.')) if period_date_start > period_date_stop: - raise osv.except_osv(_('Error'), _('Start period should be smaller then End period')) + raise osv.except_osv(_('Error'), _('Start period should be smaller than End period.')) #for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search). if period_from.special: return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) @@ -1569,11 +1569,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 @@ -2494,7 +2494,7 @@ class account_account_template(osv.osv): _check_recursion = check_cycle _constraints = [ (_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']), - (_check_type, 'Configuration Error!\nYou can not define children to an account with internal type different of "View"! ', ['type']), + (_check_type, 'Configuration Error!\nYou can not define children to an account that has internal type other than "View"!', ['type']), ] diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index f19c1e1c639..f00f27b528e 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -298,7 +298,7 @@ class account_cash_statement(osv.osv): if journal_type == 'bank': return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context) if not self._equal_balance(cr, uid, cash_id, context): - raise osv.except_osv(_('Error !'), _('The closing balance should be the same than the computed balance!')) + raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on this cash register !')) return True def statement_close(self, cr, uid, ids, journal_type='bank', context=None): diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index c6011979f8d..5db049cf56d 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -364,7 +364,7 @@ class account_invoice(osv.osv): except Exception, e: if '"journal_id" viol' in e.args[0]: raise orm.except_orm(_('Configuration Error!'), - _('There is no Accounting Journal of type Sale/Purchase defined!')) + _('No Sale/Purchase Journal(s) defined !')) else: raise orm.except_orm(_('Unknown Error'), str(e)) @@ -554,7 +554,7 @@ class account_invoice(osv.osv): pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False if not rec_res_id and not pay_res_id: raise osv.except_osv(_('Configuration Error !'), - _('Can not find a chart of account, you should create one from the configuration of the accounting menu.')) + _('Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu.')) if type in ('out_invoice', 'out_refund'): acc_id = rec_res_id else: @@ -569,7 +569,7 @@ class account_invoice(osv.osv): result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)]) if not result_id: raise osv.except_osv(_('Configuration Error !'), - _('Can not find a chart of account, you should create one from the configuration of the accounting menu.')) + _('Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu.')) inv_line_obj.write(cr, uid, [line.id], {'account_id': result_id[-1]}) else: if invoice_line: @@ -577,7 +577,7 @@ class account_invoice(osv.osv): obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configuration Error !'), - _('Invoice line account company does not match with invoice company.')) + _('Company of invoice line account and the company of invoice does not match.')) else: continue if company_id and type: @@ -598,7 +598,7 @@ class account_invoice(osv.osv): if r[1] == 'journal_id' and r[2] in journal_ids: val['journal_id'] = r[2] if not val.get('journal_id', False): - raise osv.except_osv(_('Configuration Error !'), (_('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Financial Accounting\Accounts\Journals.') % (journal_type))) + raise osv.except_osv(_('Configuration Error !'), (_('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Journals\Journals.') % (journal_type))) dom = {'journal_id': [('id', 'in', journal_ids)]} else: journal_ids = obj_journal.search(cr, uid, []) @@ -1475,7 +1475,7 @@ class account_invoice_line(osv.osv): if prod.uom_id.category_id.id != prod_uom.category_id.id: warning = { 'title': _('Warning!'), - 'message': _('You selected an Unit of Measure which is not compatible with the product.') + 'message': _('You selected a Unit of Measure which 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 95b53b51339..9efd90ee9d0 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -576,7 +576,7 @@ class account_move_line(osv.osv): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'view': - raise osv.except_osv(_('Error :'), _('You can not create journal items on a "view" account %s %s') % (l.account_id.code, l.account_id.name)) + raise osv.except_osv(_('Error :'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) return True def _check_no_closed(self, cr, uid, ids, context=None): @@ -610,7 +610,7 @@ class account_move_line(osv.osv): _constraints = [ (_check_no_view, 'You can not create journal items on an account of type view.', ['account_id']), (_check_no_closed, 'You can not create journal items on closed account.', ['account_id']), - (_check_company_id, 'Company must be the same for its related account and period.', ['company_id']), + (_check_company_id, 'Account and Period must belong to the same company.', ['company_id']), (_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']), (_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']), ] diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py index 9b89b30c93b..c54ce3cb18e 100644 --- a/addons/account/wizard/account_report_aged_partner_balance.py +++ b/addons/account/wizard/account_report_aged_partner_balance.py @@ -53,7 +53,7 @@ class account_aged_trial_balance(osv.osv_memory): period_length = data['form']['period_length'] if period_length<=0: - raise osv.except_osv(_('UserError'), _('You must enter a period length that cannot be 0 or below !')) + raise osv.except_osv(_('UserError'), _('You must enter a period length greater than 0 !')) if not data['form']['date_from']: raise osv.except_osv(_('UserError'), _('Enter a Start date !')) From 1b6ab8669672e56d5c10870805d4416a686d86fa Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 11 Jul 2012 18:58:44 +0530 Subject: [PATCH 02/71] [IMP]Account : Changes in Warning Message account_invoice, account_move_journal bzr revid: hsa@tinyerp.com-20120711132844-zz5rzyf7wxhc12l9 --- addons/account/account_invoice.py | 2 +- addons/account/wizard/account_move_journal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 5db049cf56d..2ae424d6e84 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -459,7 +459,7 @@ class account_invoice(osv.osv): pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False if not rec_res_id and not pay_res_id: raise osv.except_osv(_('Configuration Error !'), - _('Can not find a chart of accounts for this company, you should create one.')) + _('Cannot find a chart of accounts for this company, you should create one.')) account_obj = self.pool.get('account.account') rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id]) pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id]) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index c484da72304..eb5b2f6d820 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 From ea721d65af9887fb868f23791f91395932e5e0df Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 11:20:38 +0530 Subject: [PATCH 03/71] [IMP]crm-warning-msg bzr revid: pna@tinyerp.com-20120712055038-06rgow7j1sgae6v6 --- addons/crm/crm_action_rule.py | 2 +- addons/crm/crm_lead.py | 2 +- addons/crm/i18n/crm.pot | 10 +++++----- addons/crm/wizard/crm_add_note.py | 2 +- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- addons/crm_partner_assign/i18n/crm_partner_assign.pot | 2 +- addons/crm_partner_assign/partner_geo_assign.py | 2 +- addons/crm_profiling/crm_profiling.py | 2 +- addons/crm_profiling/i18n/crm_profiling.pot | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index db77719a85b..daa6534ecea 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!'), _("No Email Found 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 adf15e93a89..006daf043fe 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -784,7 +784,7 @@ class crm_lead(base_stage, osv.osv): 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 cannot delete lead '%s'; because it's not in 'Draft' state " \ "You should better cancel it, instead of deleting it.") % lead.name) return super(crm_lead, self).unlink(cr, uid, ids, context) diff --git a/addons/crm/i18n/crm.pot b/addons/crm/i18n/crm.pot index f3d70b709af..4c34fc6d953 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's 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 "No Email Found for your Company address." msgstr "" #. module: crm diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py index 02f592f0136..74af7318a20 100644 --- a/addons/crm/wizard/crm_add_note.py +++ b/addons/crm/wizard/crm_add_note.py @@ -25,7 +25,7 @@ class crm_add_note(osv.osv_memory): context = {} if not context.get('active_model'): - raise osv.except_osv(_('Error'), _('Can not add note!')) + raise osv.except_osv(_('Error'), _('Cannot add note.')) model = context.get('active_model') case_pool = self.pool.get(model) diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index f6fd4332745..42f84575328 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 Opportunity.")) return False def _convert_opportunity(self, cr, uid, ids, vals, 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..94db5461956 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 you have a working internet connection (%s).') % e) if '' in xml: return None 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 From 65828916b7a889397ce922c4804b53c9a9c2444d Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 11:28:47 +0530 Subject: [PATCH 04/71] [IMP]Sale : Warinig Messages are Changed bzr revid: hsa@tinyerp.com-20120712055847-gk58g4lebt9ran3z --- addons/sale/sale.py | 16 ++++++++-------- addons/sale/wizard/sale_make_invoice.py | 2 +- addons/sale_crm/wizard/crm_make_sale.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 0a3ebbe72ac..d9585c0f298 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -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 before ! To cancel a sale order, you must first cancel related picking for delivery orders.')) return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) @@ -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.')) + _('Could not cancel sales order!'), + _('First cancelled all picking attached to this sale 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.')) + _('Could not cancel this sales order!'), + _('First cancelled all invoices attached to this sale 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) @@ -1210,7 +1210,7 @@ class sale_order_line(osv.osv): 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 !')) + _('There is no Fiscal Position defined or income category account defined for Product Categories default Properties.')) return { 'name': line.name, 'origin': line.order_id.name, @@ -1254,7 +1254,7 @@ class sale_order_line(osv.osv): for move_line in line.move_ids: if move_line.state != 'cancel': raise osv.except_osv( - _('Could not cancel sales order line!'), + _('Cannot cancel sale order line!'), _('You must first cancel stock moves attached to this sales order line.')) return self.write(cr, uid, ids, {'state': 'cancel'}) @@ -1347,7 +1347,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') diff --git a/addons/sale/wizard/sale_make_invoice.py b/addons/sale/wizard/sale_make_invoice.py index 5265afb9bff..809983dc273 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_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py index 823d8d6ab07..21041da404d 100644 --- a/addons/sale_crm/wizard/crm_make_sale.py +++ b/addons/sale_crm/wizard/crm_make_sale.py @@ -85,7 +85,7 @@ 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(_('Data Insufficient!'), _('No address defined for customer!')) vals = { 'origin': _('Opportunity: %s') % str(case.id), From 646b0a10678737a3488ada30809e74ed50184206 Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 11:30:49 +0530 Subject: [PATCH 05/71] [IMP]Purchase : Warinig Messages are Changed bzr revid: hsa@tinyerp.com-20120712060049-u38d37i1oxz7bo3g --- addons/purchase/purchase.py | 18 +++++++++--------- .../wizard/purchase_requisition_partner.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index e74ca83a92b..25588325dff 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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, it must be cancelled first.')) # TODO: temporary fix in 5.0, to remove in 5.2 when subflows support # automatically sending subflow.delete upon deletion @@ -428,7 +428,7 @@ class purchase_order(osv.osv): 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)) + _('No purchase journal is defined 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 !'), _('No expense account is defined 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 @@ -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 cancelled 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.'), + _('First cancelled 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'}) @@ -887,9 +887,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 !'), _('Before choosing a product,\n select a price list for a supplier in the purchase form.')) 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!'), _('Before choosing a product.\n select a partner in purchase order.')) # - determine name and notes based on product in partner lang. lang = res_partner.browse(cr, uid, partner_id).lang 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): From ffca1e887de4e818cdac107a2a45a62455154230 Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 11:55:39 +0530 Subject: [PATCH 06/71] [IMP]Stock : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120712062539-w4lbgg01rwbsyddv --- addons/stock/product.py | 12 ++++++------ addons/stock/stock.py | 18 +++++++++--------- .../stock/wizard/stock_invoice_onshipping.py | 2 +- addons/stock/wizard/stock_partial_picking.py | 2 +- addons/stock/wizard/stock_return_picking.py | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/stock/product.py b/addons/stock/product.py index 62fdbb24ca2..d3566a7d1eb 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -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!'), _('Company is not specified 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)') % \ + _('No journal defined '\ + 'on the product category: "%s" (id: %d)') % \ (product.categ_id.name, product.categ_id.id,)) move_id = move_obj.create(cr, uid, { @@ -139,7 +139,7 @@ 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 ' \ + _('No stock input account defined ' \ 'for this product: "%s" (id: %d)') % \ (product.name, product.id,)) @@ -165,7 +165,7 @@ 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 ' \ + _('No stock output account defined ' \ 'for this product: "%s" (id: %d)') % \ (product.name, product.id,)) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a279b8bea6c..c06d1945dc6 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 @@ -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 @@ -2166,22 +2166,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 defined on 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 defined on 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!'), _('No stock input account defined 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!'), _('No stock output account defined 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!'), _('No journal defined 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!'), _('No inventory Valuation account defined 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 @@ -2497,7 +2497,7 @@ class stock_move(osv.osv): 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 diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py index 46c55311045..ca21cf7cee4 100644 --- a/addons/stock/wizard/stock_invoice_onshipping.py +++ b/addons/stock/wizard/stock_invoice_onshipping.py @@ -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'), _('No Invoices were created.')) 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_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index dd91f20e8cf..05dde6a1b04 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -164,7 +164,7 @@ 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) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 4c85ddcae85..8e37291a110 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -103,7 +103,7 @@ class stock_return_picking(osv.osv_memory): 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) From d953d45de467283be81164712e8b903d197ec0a0 Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 12:13:59 +0530 Subject: [PATCH 07/71] [IMP]MRP : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120712064359-rfoj2ol3stj4j4yc --- addons/mrp/mrp.py | 4 ++-- addons/mrp/wizard/change_production_qty.py | 4 ++-- addons/mrp_operations/mrp_operations.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index c4a4d8df895..e814cc33df5 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -620,7 +620,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] @@ -643,7 +643,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]) diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py index e85ceda7dd5..36f31dceae8 100644 --- a/addons/mrp/wizard/change_production_qty.py +++ b/addons/mrp/wizard/change_production_qty.py @@ -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 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 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_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index cab7a109991..34220196f91 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': From bff308183415177803b624703d5138fb0e54876a Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 12:36:31 +0530 Subject: [PATCH 08/71] [IMP]account-warning-msg bzr revid: pna@tinyerp.com-20120712070631-tat4ke05u0unftfw --- addons/account/i18n/account.pot | 2 +- .../account_analytic_plans.py | 8 ++++---- .../i18n/account_analytic_plans.pot | 10 +++++----- .../wizard/account_crossovered_analytic.py | 2 +- .../wizard/analytic_plan_create_model.py | 4 ++-- addons/account_asset/account_asset.py | 2 +- addons/account_asset/i18n/account_asset.pot | 2 +- .../account_bank_statement.py | 2 +- .../i18n/account_bank_statement_extensions.pot | 2 +- addons/account_payment/account_move_line.py | 2 +- addons/account_payment/i18n/account_payment.pot | 2 +- addons/account_voucher/account_voucher.py | 10 +++++----- addons/account_voucher/i18n/account_voucher.pot | 14 +++++++------- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index b092b3a2f8c..76b4a8b83dc 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -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 diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index c52485ae623..c0f7e062b21 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 having same name and code.')) 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(_('Value 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..440d6907117 100644 --- a/addons/account_analytic_plans/i18n/account_analytic_plans.pot +++ b/addons/account_analytic_plans/i18n/account_analytic_plans.pot @@ -183,13 +183,13 @@ msgstr "" #. module: account_analytic_plans #: code:addons/account_analytic_plans/account_analytic_plans.py:221 #, python-format -msgid "A model having this name and code already exists !" +msgid "A model having same name and code." 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 "No analytic plan defined." 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 @@ -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 @@ -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 diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py index 86fa1c888f5..e8e7ef90668 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..2f3aa088ee3 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'), _('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) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 0799a59a423..66d48e3827f 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 29b4c4fdb84..f7bd8854b56 100644 --- a/addons/account_bank_statement_extensions/account_bank_statement.py +++ b/addons/account_bank_statement_extensions/account_bank_statement.py @@ -127,7 +127,7 @@ class account_bank_statement_line(osv.osv): 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')) + 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..ece0af13a1d 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 diff --git a/addons/account_payment/account_move_line.py b/addons/account_payment/account_move_line.py index 24f9486be95..5e7a9930b52 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 !'), _('No partner defined on entry line.')) return line2bank _columns = { diff --git a/addons/account_payment/i18n/account_payment.pot b/addons/account_payment/i18n/account_payment.pot index 0588747c3f7..c6554465f04 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 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..c3af52f7dd0 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'): @@ -920,7 +920,7 @@ class account_voucher(osv.osv): 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 !')) + _('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 configure the 'Income Currency Rate' on the company,after that 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 configure the 'Expense Currency Rate' on the company,after that 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 diff --git a/addons/account_voucher/i18n/account_voucher.pot b/addons/account_voucher/i18n/account_voucher.pot index 17159ada24f..d3fc5a54831 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 @@ -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 From bc2cd7d2e0df767ea1b0183b107d9b29233ac78e Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 14:15:51 +0530 Subject: [PATCH 09/71] [IMP]base-warning-msg bzr revid: pna@tinyerp.com-20120712084551-vkw1pz1o25ttu4ma --- addons/base_action_rule/base_action_rule.py | 2 +- addons/base_action_rule/i18n/base_action_rule.pot | 2 +- addons/base_calendar/base_calendar.py | 10 +++++----- addons/base_calendar/i18n/base_calendar.pot | 10 +++++----- .../wizard/base_calendar_invite_attendee.py | 4 ++-- addons/base_crypt/crypt.py | 2 +- .../bin/script/lib/tiny_socket.py | 6 +++--- addons/base_status/base_stage.py | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 1a3d96cbc33..9b3d55162ab 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -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..1b8ed238a6a 100644 --- a/addons/base_action_rule/i18n/base_action_rule.pot +++ b/addons/base_action_rule/i18n/base_action_rule.pot @@ -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 bbededc8eaf..5a1b90c3dc3 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -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 specified the date for 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) @@ -1000,9 +1000,9 @@ class calendar_event(osv.osv): 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: @@ -1191,7 +1191,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), 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 proper Day of month.")) if datas.get('select1')=='day': return ';BYDAY=' + datas.get('byday') + datas.get('week_list') @@ -1408,7 +1408,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), 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 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) diff --git a/addons/base_calendar/i18n/base_calendar.pot b/addons/base_calendar/i18n/base_calendar.pot index 628f7af2baa..257970aaf1d 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 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 676f9b3fdd2..9326a505124 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -93,7 +93,7 @@ send an Email to Invited Person') 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 = { @@ -140,7 +140,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..d675d98b338 100644 --- a/addons/base_crypt/crypt.py +++ b/addons/base_crypt/crypt.py @@ -181,7 +181,7 @@ class users(osv.osv): cr = pooler.get_db(db).cursor() return self._login(cr, db, login, password) except Exception: - _logger.exception('Could not authenticate') + _logger.exception('Cannot authenticate!') return Exception('Access Denied') finally: if cr is not None: 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..df61ae50af7 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) diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py index 0c3bac20da9..e539df2ecea 100644 --- a/addons/base_status/base_stage.py +++ b/addons/base_status/base_stage.py @@ -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.\n That's why you cannot escalate.")) 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) From ab0015216997b5a19be896c7a5362731ff2f286e Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 15:24:41 +0530 Subject: [PATCH 10/71] [IMP]project-warning-message bzr revid: pna@tinyerp.com-20120712095441-4xwox1hhog7je8oz --- addons/project_issue_sheet/i18n/project_issue_sheet.pot | 2 +- addons/project_issue_sheet/project_issue_sheet.py | 2 +- addons/project_timesheet/i18n/project_timesheet.pot | 2 +- addons/project_timesheet/project_timesheet.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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..533e58d3f19 100644 --- a/addons/project_timesheet/i18n/project_timesheet.pot +++ b/addons/project_timesheet/i18n/project_timesheet.pot @@ -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 diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 565710f5664..39383684624 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -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')) + 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: From a710d7b11c5b01b53e10555f00b32b75b7c8cade Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 15:47:47 +0530 Subject: [PATCH 11/71] [IMP]Document : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120712101747-h5uhion81908cczy --- addons/document/content_index.py | 8 ++-- addons/document/document.py | 2 +- addons/document/document_storage.py | 70 ++++++++++++++-------------- addons/document/nodes.py | 72 ++++++++++++++--------------- 4 files changed, 76 insertions(+), 76 deletions(-) diff --git a/addons/document/content_index.py b/addons/document/content_index.py index f24c033a7ec..978e0b41fe1 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 not handled here!") def _doIndexFile(self,fpath): - raise NhException("Content not handled here") + raise NhException("Content not handled here!") def __repr__(self): return "" %(self.__module__, self.__class__.__name__) @@ -134,7 +134,7 @@ class contentIndex(object): if f: _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 diff --git a/addons/document/document.py b/addons/document/document.py index fa65f8d9966..5126fde2808 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -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 is just there by convention,please donot use it yet.") cr.execute("UPDATE ir_attachment " \ "SET parent_id = %s, db_datas = decode(encode(db_datas,'escape'), 'base64') " \ diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py index 339b320e9a7..4b650f0d72f 100644 --- a/addons/document/document_storage.py +++ b/addons/document/document_storage.py @@ -189,7 +189,7 @@ class nodefd_db(StringIO, nodes.node_descriptor): StringIO.__init__(self, None) else: _logger.error("Incorrect mode %s specified", mode) - raise IOError(errno.EINVAL, "Invalid file mode") + raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode def size(self): @@ -269,7 +269,7 @@ class nodefd_db64(StringIO, nodes.node_descriptor): StringIO.__init__(self, None) else: _logger.error("Incorrect mode %s specified", mode) - raise IOError(errno.EINVAL, "Invalid file mode") + raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode def size(self): @@ -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() @@ -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,7 +420,7 @@ 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 @@ -435,10 +435,10 @@ 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': @@ -448,7 +448,7 @@ class document_storage(osv.osv): 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') + 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', @@ -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': @@ -524,10 +524,10 @@ class document_storage(osv.osv): 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,10 +541,10 @@ 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') + raise IOError(errno.EREMOTE, 'Medium offline!') if boo.readonly: - raise IOError(errno.EPERM, "Readonly medium") + raise IOError(errno.EPERM, "Readonly medium!") _logger.debug( "Store data for ir.attachment #%d" % ira.id) store_fname = None @@ -565,7 +565,7 @@ class document_storage(osv.osv): # 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) @@ -593,14 +593,14 @@ class document_storage(osv.osv): 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: @@ -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 manually.", fname, exc_info=True) else: - _logger.warning("Unknown unlink key %s" % ktype) + _logger.warning("Unlink unknown key %s." % ktype) return True @@ -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,7 +711,7 @@ 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. @@ -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,9 +752,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(*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]) @@ -762,12 +762,12 @@ class document_storage(osv.osv): 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],] @@ -775,7 +775,7 @@ class document_storage(osv.osv): 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/nodes.py b/addons/document/nodes.py index 273be7effa4..8b19fab9148 100644 --- a/addons/document/nodes.py +++ b/addons/document/nodes.py @@ -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. @@ -327,7 +327,7 @@ class node_class(object): 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,7 +340,7 @@ class node_class(object): r = m(cr) return r except AttributeError: - _logger.debug('Property %s not supported' % prop, exc_info=True) + _logger.debug('Property %s not supported.' % prop, exc_info=True) return None def get_dav_resourcetype(self, cr): @@ -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)) @@ -423,9 +423,9 @@ 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) @@ -465,7 +465,7 @@ class node_database(node_class): 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 @@ -569,7 +569,7 @@ class node_dir(node_database): 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 @@ -597,7 +597,7 @@ class node_dir(node_database): 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,7 +633,7 @@ 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): @@ -646,7 +646,7 @@ class node_dir(node_database): 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 @@ -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: @@ -725,12 +725,12 @@ class node_dir(node_database): 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') + 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 @@ -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: @@ -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 @@ -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() @@ -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() @@ -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 @@ -1215,7 +1215,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. @@ -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,10 +1304,10 @@ 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: @@ -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) @@ -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) @@ -1419,7 +1419,7 @@ class node_content(node_class): 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) @@ -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) @@ -1474,7 +1474,7 @@ class nodefd_content(StringIO, node_descriptor): StringIO.__init__(self, None) else: _logger.error("Incorrect mode %s specified", mode) - raise IOError(errno.EINVAL, "Invalid file mode") + raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode def size(self): @@ -1528,7 +1528,7 @@ class nodefd_static(StringIO, node_descriptor): StringIO.__init__(self, None) else: _logger.error("Incorrect mode %s specified", mode) - raise IOError(errno.EINVAL, "Invalid file mode") + raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode def size(self): From 72f0b566b9e2e2c3b5f45c3e6c1c134be145cd2e Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 12 Jul 2012 16:24:35 +0530 Subject: [PATCH 12/71] [IMP]Import(all modules) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120712105435-tehynuca75p1kd5a --- addons/import_base/import_framework.py | 2 +- .../wizard/import_google_data.py | 2 +- addons/import_sugarcrm/import_sugarcrm.py | 4 +- addons/import_sugarcrm/sugarsoap_services.py | 86 +++++++++---------- 4 files changed, 47 insertions(+), 47 deletions(-) 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/wizard/import_google_data.py b/addons/import_google/wizard/import_google_data.py index 49127b85db8..72044eeb534 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 defined for user.\nPlease define in user view.")) 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')] diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py index 42ba4382b27..3acffb8c956 100644 --- a/addons/import_sugarcrm/import_sugarcrm.py +++ b/addons/import_sugarcrm/import_sugarcrm.py @@ -1101,7 +1101,7 @@ class import_sugarcrm(osv.osv): 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') ) @@ -1127,7 +1127,7 @@ class import_sugarcrm(osv.osv): 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/sugarsoap_services.py b/addons/import_sugarcrm/sugarsoap_services.py index b42eb4041c1..cb266242204 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) From 62e4a52f2d524c22d3fb17ac781984594a5b4741 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 17:54:59 +0530 Subject: [PATCH 13/71] [IMP]edi-event-email_template-fetchmail-warning-msg bzr revid: pna@tinyerp.com-20120712122459-hvvxq5nqrtfxv3ei --- addons/edi/edi_service.py | 4 ++-- addons/edi/models/edi.py | 2 +- addons/event/event.py | 2 +- addons/event_moodle/event_moodle.py | 4 ++-- addons/event_sale/test/confirm.yml | 2 +- addons/fetchmail/fetchmail.py | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) 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/models/edi.py b/addons/edi/models/edi.py index dadfeb81209..24f09e3fe80 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 diff --git a/addons/event/event.py b/addons/event/event.py index 6a8cf9f8a0b..e8c6eb31e3e 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -102,7 +102,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): 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 55923c3043a..06b4819ffde 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: From 66667652b6afe27d10210eb81454f0ac8f1124fa Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 18:15:53 +0530 Subject: [PATCH 14/71] [IMP]analytic-anonymization-warning-msg bzr revid: pna@tinyerp.com-20120712124553-zg42ssi0hat181e3 --- addons/anonymization/anonymization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index b6e4d802ce2..25e770394c8 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: @@ -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: From 0eb19849badd549f6ea36622a82e69f9b2a634be Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Thu, 12 Jul 2012 18:43:37 +0530 Subject: [PATCH 15/71] [IMP]google-caldav-warning-msg bzr revid: pna@tinyerp.com-20120712131337-uu2t52v22x3xo8ki --- addons/caldav/calendar.py | 6 +++--- addons/caldav/i18n/caldav.pot | 2 +- addons/caldav/wizard/caldav_browse.py | 2 +- addons/caldav/wizard/calendar_event_import.py | 2 +- addons/google_docs/google_docs.py | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index fb98e00a86f..8678d617463 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -786,7 +786,7 @@ class basic_calendar_line(osv.osv): 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() @@ -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("We cannot parse absolute triggers.") if not seconds: duration = abs(days) related = days > 0 and 'after' or 'before' diff --git a/addons/caldav/i18n/caldav.pot b/addons/caldav/i18n/caldav.pot index cdfd0be1490..444a7e04bba 100644 --- a/addons/caldav/i18n/caldav.pot +++ b/addons/caldav/i18n/caldav.pot @@ -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..b185132417f 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/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, From 770dc652aff43e9fc3f021f66e8bd7cf7af3496e Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 10:59:57 +0530 Subject: [PATCH 16/71] [IMP]Document (ftp,webdev) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713052957-iie8hdqbde1g3qz9 --- .../document_ftp/ftpserver/abstracted_fs.py | 12 +++--- addons/document_ftp/ftpserver/ftpserver.py | 8 ++-- addons/document_ftp/test_easyftp.py | 2 +- addons/document_webdav/dav_fs.py | 40 +++++++++---------- addons/document_webdav/document_webdav.py | 2 +- addons/document_webdav/test_davclient.py | 10 ++--- addons/document_webdav/webdav.py | 2 +- addons/document_webdav/webdav_server.py | 6 +-- 8 files changed, 41 insertions(+), 41 deletions(-) diff --git a/addons/document_ftp/ftpserver/abstracted_fs.py b/addons/document_ftp/ftpserver/abstracted_fs.py index 429016a2376..9105278217d 100644 --- a/addons/document_ftp/ftpserver/abstracted_fs.py +++ b/addons/document_ftp/ftpserver/abstracted_fs.py @@ -176,7 +176,7 @@ class abstracted_fs(object): 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 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] @@ -287,7 +287,7 @@ 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) @@ -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): @@ -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 bd727427541..397d9eb8a97 100755 --- a/addons/document_ftp/ftpserver/ftpserver.py +++ b/addons/document_ftp/ftpserver/ftpserver.py @@ -308,7 +308,7 @@ class DummyAuthorizer: 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.", @@ -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): @@ -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.""" @@ -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)) 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..13edfd8f77f 100644 --- a/addons/document_webdav/dav_fs.py +++ b/addons/document_webdav/dav_fs.py @@ -98,7 +98,7 @@ 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 '' @@ -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 """ @@ -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() @@ -500,10 +500,10 @@ 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 @@ -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() @@ -698,14 +698,14 @@ class openerp_dav_handler(dav_interface): 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()) @@ -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() @@ -966,7 +966,7 @@ class openerp_dav_handler(dav_interface): 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,7 +975,7 @@ 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 @@ -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,7 +992,7 @@ 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) diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py index da463c9eb1b..4388c92b004 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 diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py index a4dda231bd8..a0b498f61d0 100755 --- a/addons/document_webdav/test_davclient.py +++ b/addons/document_webdav/test_davclient.py @@ -278,7 +278,7 @@ class addAuthTransport: 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 @@ -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) @@ -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 @@ -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) @@ -689,7 +689,7 @@ class DAVClient(object): """ 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() 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..427a6f57d53 100644 --- a/addons/document_webdav/webdav_server.py +++ b/addons/document_webdav/webdav_server.py @@ -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) @@ -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 From e2055500f7a243880a727a21f1937ae9f99c5ded Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 11:51:13 +0530 Subject: [PATCH 17/71] [IMP]l10n : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713062113-20quan7unuji14qz --- addons/l10n_be/wizard/l10n_be_vat_intra.py | 2 +- addons/l10n_ch/report/report_webkit_html.py | 2 +- addons/l10n_ch/wizard/bvr_import.py | 4 ++-- addons/l10n_ch/wizard/create_dta.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py index 123d235f19b..b82d3e143a0 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra.py +++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py @@ -113,7 +113,7 @@ class partner_vat_intra(osv.osv_memory): 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(_('Wrong Period Code'), _('Period code is not valid.')) if not wiz_data.period_ids: raise osv.except_osv(_('Data Insufficient!'),_('Please select at least one Period.')) diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py index d930258f4a7..2e8201cca19 100644 --- a/addons/l10n_ch/report/report_webkit_html.py +++ b/addons/l10n_ch/report/report_webkit_html.py @@ -207,7 +207,7 @@ class BVRWebKitParser(webkit_report.WebKitParser): 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 : #I know it could be cleaner ... diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py index e5c5b7e5053..d2c658513e5 100644 --- a/addons/l10n_ch/wizard/bvr_import.py +++ b/addons/l10n_ch/wizard/bvr_import.py @@ -222,10 +222,10 @@ def _import(self, cursor, user, data, context=None): account_id = int(value.split(',')[1]) else : raise osv.except_osv(_('Error'), - _('The properties account payable account receivable are not set')) + _('The properties account payable 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')) + _('The properties account payable 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..ccf7412e6f3 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='' @@ -373,7 +373,7 @@ def _create_dta(obj, cr, uid, data, context=None): # _('Please confirm it')) if not payment.mode: raise osv.except_osv(_('Error'), - _('No payment mode')) + _('No payment mode.')) bank = payment.mode.bank_id if not bank: raise osv.except_osv(_('Error'), _('No bank account for the company.')) @@ -558,7 +558,7 @@ def _create_dta(obj, cr, uid, data, context=None): 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: @@ -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() From 05c4e542160f053867219acbcb7bed70f6365b21 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 12:14:36 +0530 Subject: [PATCH 18/71] [IMP]marketing_campaign : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713064436-xc6s90ybz0ik8h8t --- addons/marketing_campaign/marketing_campaign.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 417bd694624..4c1c2113246 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 activitie's in it.")) has_start = False has_signal_without_from = False @@ -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 in 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 transiton.') return relativedelta(**{str(transition.interval_type): transition.interval_nbr}) From 27226c12b2a9b888836eb0eca7d9a8fb025aaba5 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Fri, 13 Jul 2012 12:34:25 +0530 Subject: [PATCH 19/71] [IMP]hr-warning-message bzr revid: pna@tinyerp.com-20120713070425-b3envibswfdt6umq --- addons/hr/hr.py | 2 +- addons/hr/hr_department.py | 2 +- addons/hr/i18n/hr.pot | 4 ++-- addons/hr_attendance/hr_attendance.py | 2 +- addons/hr_attendance/i18n/hr_attendance.pot | 4 ++-- .../wizard/hr_attendance_sign_in_out.py | 4 ++-- addons/hr_contract/hr_contract.py | 2 +- addons/hr_contract/i18n/hr_contract.pot | 2 +- addons/hr_evaluation/hr_evaluation.py | 2 +- addons/hr_evaluation/i18n/hr_evaluation.pot | 2 +- addons/hr_expense/hr_expense.py | 4 ++-- addons/hr_expense/i18n/hr_expense.pot | 4 ++-- addons/hr_holidays/i18n/hr_holidays.pot | 2 +- .../wizard/hr_holidays_summary_department.py | 2 +- addons/hr_payroll/hr_payroll.py | 10 +++++----- addons/hr_payroll/i18n/hr_payroll.pot | 12 ++++++------ .../wizard/hr_payroll_payslips_by_employees.py | 2 +- addons/hr_timesheet/hr_timesheet.py | 4 ++-- addons/hr_timesheet/i18n/hr_timesheet.pot | 6 +++--- .../wizard/hr_timesheet_print_employee.py | 2 +- .../i18n/hr_timesheet_invoice.pot | 2 +- .../wizard/hr_timesheet_analytic_profit.py | 2 +- .../wizard/hr_timesheet_invoice_create.py | 2 +- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 4 ++-- .../hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot | 4 ++-- 25 files changed, 44 insertions(+), 44 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 44b533fdc52..f335ceeeda3 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -272,7 +272,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() diff --git a/addons/hr/hr_department.py b/addons/hr/hr_department.py index e0ad03721d6..e73046fb2b6 100644 --- a/addons/hr/hr_department.py +++ b/addons/hr/hr_department.py @@ -76,7 +76,7 @@ class hr_department(osv.osv): return True _constraints = [ - (_check_recursion, 'Error! You can not create recursive departments.', ['parent_id']) + (_check_recursion, 'Error! You cannot create recursive departments.', ['parent_id']) ] hr_department() diff --git a/addons/hr/i18n/hr.pot b/addons/hr/i18n/hr.pot index f2b1b363204..080708599fa 100644 --- a/addons/hr/i18n/hr.pot +++ b/addons/hr/i18n/hr.pot @@ -47,7 +47,7 @@ msgstr "" #. module: hr #: constraint:hr.department:0 -msgid "Error! You can not create recursive departments." +msgid "Error! You cannot create recursive departments." msgstr "" #. module: hr @@ -446,7 +446,7 @@ msgstr "" #. module: hr #: constraint:hr.employee:0 -msgid "Error ! You cannot create recursive Hierarchy of Employees." +msgid "Error ! You cannot create recursive hierarchy of Employee(s)." msgstr "" #. module: hr diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index 08323ce7847..93cdc707b4d 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -137,7 +137,7 @@ class hr_employee(osv.osv): warning_sign = "Sign Out" for emp in self.read(cr, uid, ids, ['id'], context=context): if not self._action_check(cr, uid, emp['id'], dt, context): - raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,)) + raise osv.except_osv(_('Warning'), _('You try to %s with a date before to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,)) res = {'action': type, 'employee_id': emp['id']} if dt: diff --git a/addons/hr_attendance/i18n/hr_attendance.pot b/addons/hr_attendance/i18n/hr_attendance.pot index 8f5204bba99..62fa0968280 100644 --- a/addons/hr_attendance/i18n/hr_attendance.pot +++ b/addons/hr_attendance/i18n/hr_attendance.pot @@ -58,7 +58,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:161 #, python-format -msgid "The sign-out date must be in the past" +msgid "The sign-out date must be in the past." msgstr "" #. module: hr_attendance @@ -151,7 +151,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:174 #, python-format -msgid "The Sign-in date must be in the past" +msgid "The sign-in date must be in the past." msgstr "" #. module: hr_attendance 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..3a24ab6af4a 100644 --- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py +++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py @@ -158,7 +158,7 @@ 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(_('UserError'), _('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: @@ -171,7 +171,7 @@ 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-in date must be in the past')) + raise osv.except_osv(_('UserError'), _('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') diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index 1267f13ac04..07742ed5fe4 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 lower then 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..016fef341ae 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 lower then contract end-date." msgstr "" #. module: hr_contract diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index e85f0274d84..3e77cc9a3dd 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 in waiting answer or draft state.")) return True def button_done(self,cr, uid, ids, context=None): diff --git a/addons/hr_evaluation/i18n/hr_evaluation.pot b/addons/hr_evaluation/i18n/hr_evaluation.pot index 83d186f48c3..c6c8e63dd72 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 in waiting answer or draft." "state" msgstr "" diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index b1192701dfb..844b1ac0de0 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..572515f03c7 100644 --- a/addons/hr_expense/i18n/hr_expense.pot +++ b/addons/hr_expense/i18n/hr_expense.pot @@ -266,7 +266,7 @@ msgstr "" #: code:addons/hr_expense/hr_expense.py:173 #, python-format msgid "" -"Please configure Default Expense account for Product purchase, " +"Please configure Default Expense account for Product purchase., " "`property_account_expense_categ`" msgstr "" @@ -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/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot index 3763f5ac568..8e0d2a3c50f 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 1 Department. And try again." 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..f499a018c06 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 1 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 676eedf4ebc..fb7c128df8d 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..94c204db542 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 @@ -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_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 66911f25ff5..16ef535faa9 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 !'), _('Analytic journal is not 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 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..a0020e74cdb 100644 --- a/addons/hr_timesheet/i18n/hr_timesheet.pot +++ b/addons/hr_timesheet/i18n/hr_timesheet.pot @@ -323,7 +323,7 @@ msgstr "" #: 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!" +"Define an employee for the selected user and assign an analytic journal !" msgstr "" #. module: hr_timesheet @@ -577,7 +577,7 @@ msgstr "" #: 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." +"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 "No employee defined 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..b89f998f7cb 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"), _("No employee defined for this user !")) return emp_id and emp_id[0] or False _defaults = { diff --git a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot index 768c4be3dac..18b61e03bc4 100644 --- a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot +++ b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot @@ -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 "No income account defined for product '%s'." 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..76e0efd3bce 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(_('Data Insufficient!'), _('No records found for 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 bcae996a8ee..f0fe3281bb0 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -123,7 +123,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"), _("No income account defined for product '%s'.") % product.name) curr_line = { 'price_unit': price, 'quantity': qty, diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index f9d662b9b5d..5fe44478fc6 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -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 an other date than today.')) return True def sign(self, cr, uid, ids, typ, context=None): @@ -612,7 +612,7 @@ 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: diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot index ae27ef19b88..0295fddd004 100644 --- a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot +++ b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot @@ -149,7 +149,7 @@ msgstr "" #. module: hr_timesheet_sheet #: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:615 #, 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 @@ -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 an other date than today." msgstr "" #. module: hr_timesheet_sheet From bdcea123b7aea7669cb874d348d8a244399e3126 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Fri, 13 Jul 2012 14:15:10 +0530 Subject: [PATCH 20/71] [IMP]hr-warning-message bzr revid: pna@tinyerp.com-20120713084510-vh2wjwr7w23qoyuv --- addons/hr_holidays/hr_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 2a2648f1beb..2ed5a04d937 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -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, because it\'s 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): From ba05a4f3999928d0024597edf0a807cf97fd3982 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 15:45:45 +0530 Subject: [PATCH 21/71] [IMP]Import(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713101545-h31hhm06itrz7ctx --- addons/import_base/i18n/import_base.pot | 2 +- addons/import_sugarcrm/i18n/import_sugarcrm.pot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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_sugarcrm/i18n/import_sugarcrm.pot b/addons/import_sugarcrm/i18n/import_sugarcrm.pot index 75caa61ccc3..388bcc1ae04 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 From e2e412443aeb4ea622de7fd68a033f65c28fdb72 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 15:51:58 +0530 Subject: [PATCH 22/71] [IMP]l10n(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713102158-tml6vwfxpdnpd6jr --- addons/l10n_be/i18n/l10n_be.pot | 2 +- addons/l10n_ch/i18n/l10n_ch.pot | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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_ch/i18n/l10n_ch.pot b/addons/l10n_ch/i18n/l10n_ch.pot index b606d0c46ea..f5230cbf692 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 @@ -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 From 3c31ecf6c527a53a2b05977f0b8b51ea3d6676e0 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 15:57:08 +0530 Subject: [PATCH 23/71] [IMP]Marketing Campaign(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713102708-0uipci9xa1o242vd --- addons/marketing_campaign/i18n/marketing_campaign.pot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/marketing_campaign/i18n/marketing_campaign.pot b/addons/marketing_campaign/i18n/marketing_campaign.pot index a1c06f6037d..d27eb729091 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 @@ -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 activitie's in it." msgstr "" #. module: marketing_campaign From dca09e201c67b2ce9f2e3ae1922eaefa6134fa68 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 16:05:04 +0530 Subject: [PATCH 24/71] [IMP]MRP(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713103504-0s311nzfjjk4dm8b --- addons/mrp/i18n/mrp.pot | 6 +++--- addons/mrp_operations/i18n/mrp_operations.pot | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/mrp/i18n/mrp.pot b/addons/mrp/i18n/mrp.pot index 1223b21f55d..0708ae70feb 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 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 @@ -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 diff --git a/addons/mrp_operations/i18n/mrp_operations.pot b/addons/mrp_operations/i18n/mrp_operations.pot index fbcddca8dbc..574f6ba30ee 100644 --- a/addons/mrp_operations/i18n/mrp_operations.pot +++ b/addons/mrp_operations/i18n/mrp_operations.pot @@ -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 From 933c9b24413d3c3395afb28c7ccea1271d7c2e2b Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 16:14:58 +0530 Subject: [PATCH 25/71] [IMP]Purchase(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713104458-sl9r036o3spygs9n --- addons/purchase/i18n/purchase.pot | 10 +++++----- .../purchase_requisition/i18n/purchase_requisition.pot | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index 44355e26cea..c6fc09c6839 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, it must be cancelled first.'))" msgstr "" #. module: purchase @@ -641,7 +641,7 @@ 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 "No purchase journal is defined for this company: \"%s\" (id:%d)" msgstr "" #. module: purchase @@ -1175,7 +1175,7 @@ msgstr "" #. module: purchase #: code:addons/purchase/purchase.py:411 code:addons/purchase/purchase.py:418 #, python-format -msgid "Unable to cancel this purchase order!" +msgid "Unable to cancel this purchase order." msgstr "" #. module: purchase @@ -1745,7 +1745,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 "No expense account is defined for this company: \"%s\" (id:%d)" msgstr "" #. module: purchase @@ -1762,7 +1762,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" +"Before choosing a product,\n select a price list for a supplier in the purchase form.'))\n" "Please set one before choosing a product." msgstr "" 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 From da2ce167d91db8c04d5ba803fae2c060a0c594f1 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 16:30:26 +0530 Subject: [PATCH 26/71] [IMP]Sale(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713110026-o8x60knyi1dxpy6i --- addons/sale/i18n/sale.pot | 14 +++++++------- addons/sale_crm/i18n/sale_crm.pot | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot index 64cd1ee5a8c..daecfe2de4e 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 before ! To " +"cancel a sale order, you must first cancel related picking for delivery " "orders." msgstr "" @@ -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 sale order line!" 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 "First cancelled all picking attached to this sale order." msgstr "" #. module: sale @@ -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 cancelled all invoices attached to this sale order." msgstr "" #. module: sale 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 From b1d9f20ba3bb8a0de4faa3a52d4d2437f66b4176 Mon Sep 17 00:00:00 2001 From: Hardik Date: Fri, 13 Jul 2012 16:41:54 +0530 Subject: [PATCH 27/71] [IMP]Stock(.pot) : Warning Messages are changed bzr revid: hsa@tinyerp.com-20120713111154-0hzur5xo1dnwz01r --- addons/stock/i18n/stock.pot | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 3832e3197c7..4ce55d4f9eb 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -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 defined on this product and " "Valuation account on category of this product are same." msgstr "" @@ -533,7 +533,7 @@ msgstr "" #: code:addons/stock/stock.py:2125 #, python-format msgid "" -"There is no stock output account defined for this product or its category: " +"No stock output account defined for this product or its category: " "\"%s\" (id: %d)" msgstr "" @@ -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,7 +675,7 @@ msgstr "" #: code:addons/stock/stock.py:2131 #, python-format msgid "" -"There is no inventory Valuation account defined on the product category: \"%s" +"No inventory Valuation account defined on the product category: \"%s" "\" (id: %d)" msgstr "" @@ -1370,7 +1370,7 @@ msgstr "" #. module: stock #: code:addons/stock/product.py:92 #, python-format -msgid "Company is not specified in Location" +msgid "Company is not specified 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 "No Invoices were created." 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 @@ -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 defined on this product and " "Valuation account on category of this product are same." msgstr "" @@ -1906,7 +1906,7 @@ msgstr "" #: code:addons/stock/stock.py:2122 #, python-format msgid "" -"There is no stock input account defined for this product or its category: " +"No stock input account defined for this product or its category: " "\"%s\" (id: %d)" msgstr "" @@ -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 @@ -2554,7 +2554,7 @@ 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 @@ -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 "No journal defined on the product category: \"%s\" (id: %d)" msgstr "" #. module: stock From 881148d4b16bd709b80a412e082576c852e9b4bb Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Fri, 13 Jul 2012 17:46:13 +0530 Subject: [PATCH 28/71] [IMP]hr-warning-message bzr revid: pna@tinyerp.com-20120713121613-poze6x6838cr9xpe --- addons/hr/hr.py | 4 ++-- addons/hr/i18n/hr.pot | 4 ++-- addons/hr_attendance/i18n/hr_attendance.pot | 4 ++-- .../hr_attendance/wizard/hr_attendance_sign_in_out.py | 4 ++-- addons/hr_holidays/hr_holidays.py | 2 +- addons/hr_holidays/i18n/hr_holidays.pot | 2 +- .../wizard/hr_holidays_summary_department.py | 2 +- addons/hr_timesheet/hr_timesheet.py | 2 +- addons/hr_timesheet/i18n/hr_timesheet.pot | 10 +++++----- .../hr_timesheet/wizard/hr_timesheet_print_employee.py | 2 +- addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py | 4 ++-- .../hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot | 4 ++-- .../wizard/hr_timesheet_analytic_profit.py | 2 +- .../wizard/hr_timesheet_invoice_create.py | 2 +- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 6 +++--- addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot | 8 ++++---- .../hr_timesheet_sheet/wizard/hr_timesheet_current.py | 2 +- 17 files changed, 32 insertions(+), 32 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index f335ceeeda3..f80540d8d7c 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -66,7 +66,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() @@ -272,7 +272,7 @@ class hr_employee(osv.osv): return True _constraints = [ - (_check_recursion, 'Error ! You cannot create recursive hierarchy of Employee(s).', ['parent_id']), + (_check_recursion, 'Error! You cannot create recursive hierarchy of Employee(s).', ['parent_id']), ] hr_employee() diff --git a/addons/hr/i18n/hr.pot b/addons/hr/i18n/hr.pot index 080708599fa..9936c83ad6e 100644 --- a/addons/hr/i18n/hr.pot +++ b/addons/hr/i18n/hr.pot @@ -305,7 +305,7 @@ msgstr "" #. module: hr #: constraint:hr.employee.category:0 -msgid "Error ! You cannot create recursive Categories." +msgid "Error! You cannot create recursive Categories." msgstr "" #. module: hr @@ -446,7 +446,7 @@ msgstr "" #. module: hr #: constraint:hr.employee:0 -msgid "Error ! You cannot create recursive hierarchy of Employee(s)." +msgid "Error! You cannot create recursive hierarchy of Employee(s)." msgstr "" #. module: hr diff --git a/addons/hr_attendance/i18n/hr_attendance.pot b/addons/hr_attendance/i18n/hr_attendance.pot index 62fa0968280..990f2aba606 100644 --- a/addons/hr_attendance/i18n/hr_attendance.pot +++ b/addons/hr_attendance/i18n/hr_attendance.pot @@ -157,7 +157,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:167 #, python-format -msgid "A sign-in must be right after a sign-out !" +msgid "A sign-in must be right after a sign-out!" msgstr "" #. module: hr_attendance @@ -306,7 +306,7 @@ msgstr "" #. module: hr_attendance #: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:179 #, python-format -msgid "A sign-out must be right after a sign-in !" +msgid "A sign-out must be right after a sign-in!" msgstr "" #. module: hr_attendance 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 3a24ab6af4a..0583d478c19 100644 --- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py +++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py @@ -164,7 +164,7 @@ class hr_sign_in_out(osv.osv_memory): 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(_('UserError'), _('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): @@ -176,7 +176,7 @@ class hr_sign_in_out(osv.osv_memory): 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(_('UserError'), _('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_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 2ed5a04d937..d40df90171a 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -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, because it\'s not in draft state !')) + raise osv.except_osv(_('Warning!'),_('You cannot delete a leave, because it\'s 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): diff --git a/addons/hr_holidays/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot index 8e0d2a3c50f..56dd8fe758c 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 diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department.py b/addons/hr_holidays/wizard/hr_holidays_summary_department.py index f499a018c06..5f4a26b2a07 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_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 16ef535faa9..91057a2b38e 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -172,7 +172,7 @@ 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\' 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 cannot automatically fill the timesheet.')) return super(hr_analytic_timesheet, self).create(cr, uid, vals, context=context) diff --git a/addons/hr_timesheet/i18n/hr_timesheet.pot b/addons/hr_timesheet/i18n/hr_timesheet.pot index a0020e74cdb..ee1e9fbc8d6 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 "No employee defined for your user!" msgstr "" #. module: hr_timesheet @@ -158,7 +158,7 @@ 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 "No cost unit defined for this employee!" 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' defined for employee %s \n" +"Define an employee for the selected user and assign an 'Analytic Journal'!" 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 "No employee defined 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 b89f998f7cb..7ef99aa88e6 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"), _("No employee defined 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..d3b0d27e351 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(_('UserError'), _('No cost unit defined 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(_('UserError'), _('No employee defined for your user!')) return False def check_state(self, cr, uid, ids, context=None): diff --git a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot index 18b61e03bc4..21df6be61e4 100644 --- a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot +++ b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot @@ -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 76e0efd3bce..b4db228c938 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(_('Data Insufficient!'), _('No record(s) found for 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 f0fe3281bb0..0d3c26b1648 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -99,7 +99,7 @@ class account_analytic_line(osv.osv): for product_id, factor_id, qty, uom in cr.fetchall(): product = product_obj.browse(cr, uid, product_id, context2) if not product: - raise osv.except_osv(_('Error'), _('At least one line has no product !')) + raise osv.except_osv(_('Error'), _('At least one line has no product!')) factor_name = '' factor = invoice_factor_obj.browse(cr, uid, factor_id, context2) if not data.get('product', False): diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 5fe44478fc6..26254271ca7 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -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): @@ -612,7 +612,7 @@ 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: @@ -643,7 +643,7 @@ class hr_attendance(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 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 0295fddd004..7e2f698f203 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 "No employee defined 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 @@ -149,7 +149,7 @@ msgstr "" #. module: hr_timesheet_sheet #: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:615 #, 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 @@ -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 diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py index 5a8fa2c59b3..4d19e7657d4 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 !'), _('No employee defined 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: From 8da5bec19ee2362141cbe4fb8b89779f56d6f77a Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Tue, 17 Jul 2012 17:00:57 +0530 Subject: [PATCH 29/71] [IMP] Improved warning messages/exceptions for purchase modules bzr revid: pso@tinyerp.com-20120717113057-gv6lxsnzpjzkbtdn --- addons/purchase/i18n/purchase.pot | 12 +++++------- addons/purchase/purchase.py | 14 +++++++------- addons/purchase/wizard/purchase_line_invoice.py | 3 +-- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index c6fc09c6839..306c9501424 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 @@ -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 "No purchase journal is defined for this company: \"%s\" (id:%d)" +msgid "Define purchase journal for this company: \"%s\" (id:%d)" msgstr "" #. module: purchase @@ -1745,7 +1744,7 @@ msgstr "" #: code:addons/purchase/purchase.py:359 #: code:addons/purchase/wizard/purchase_line_invoice.py:112 #, python-format -msgid "No expense account is defined for this company: \"%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 "" -"Before choosing a product,\n select a price list for 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 9e771806c78..3259c4668c4 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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 @@ -428,7 +428,7 @@ class purchase_order(osv.osv): 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 !'), - _('No purchase journal is defined for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id)) + _('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 !'), _('No expense account is defined for this company: "%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 @@ -496,14 +496,14 @@ class purchase_order(osv.osv): if pick.state not in ('draft','cancel'): raise osv.except_osv( _('Unable to cancel this purchase order.'), - _('First cancelled all receptions related to 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.'), - _('First cancelled all receptions related to this purchase order.')) + _('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'}) @@ -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 !'), _('Before choosing a product,\n select a price list for a supplier in the purchase form.')) + 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!'), _('Before choosing a product.\n select a partner in purchase order.')) + 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 diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py index d43f617265f..a8b99c4b207 100644 --- a/addons/purchase/wizard/purchase_line_invoice.py +++ b/addons/purchase/wizard/purchase_line_invoice.py @@ -107,8 +107,7 @@ class purchase_line_invoice(osv.osv_memory): 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)') % \ + _('Define expense account for this product: "%s" (id:%d)') % \ (line.product_id.name, line.product_id.id,)) else: a = property_obj.get(cr, uid, From 6164612e4035e53b948c65b6ae2df4bbf9956958 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Wed, 18 Jul 2012 11:03:57 +0530 Subject: [PATCH 30/71] [IMP] Improved warning messages in pot file for stock module bzr revid: pso@tinyerp.com-20120718053357-4i4ytudlk6jo15rg --- addons/stock/i18n/stock.pot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 4ce55d4f9eb..833c9b8b923 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -344,7 +344,7 @@ msgstr "" #: code:addons/stock/stock.py:2119 #, python-format msgid "" -"Cannot 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 "" @@ -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)" +"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 @@ -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 @@ -1873,7 +1873,7 @@ msgstr "" #: code:addons/stock/stock.py:2116 #, python-format msgid "" -"Cannot 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 "" @@ -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)" +"Define stock input account for this product: \"%s\" (id: %d)" msgstr "" #. module: stock #: code:addons/stock/stock.py:2445 #, python-format -msgid "Cannot consume a move with negative or zero quantity !" +msgid "Cannot consume a move with negative or zero quantity." 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 "" From d51e0da926100149844d5f57ccd421c190329488 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Wed, 18 Jul 2012 12:25:50 +0530 Subject: [PATCH 31/71] [IMP]: Improved warning message for mrp bzr revid: pso@tinyerp.com-20120718065550-0phn8tsxqouyopd0 --- addons/mrp_operations/i18n/mrp_operations.pot | 2 +- addons/mrp_operations/mrp_operations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp_operations/i18n/mrp_operations.pot b/addons/mrp_operations/i18n/mrp_operations.pot index 574f6ba30ee..0cd82aaca0c 100644 --- a/addons/mrp_operations/i18n/mrp_operations.pot +++ b/addons/mrp_operations/i18n/mrp_operations.pot @@ -444,7 +444,7 @@ msgstr "" #. module: mrp_operations #: code:addons/mrp_operations/mrp_operations.py:466 #, python-format -msgid "Operation has already started !' 'You can 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 34220196f91..2700ed2654d 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 !' 'You can 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': From 2f89481e4435d31ad51a37b1d424519cea8dce6a Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Sun, 22 Jul 2012 13:12:14 +0530 Subject: [PATCH 32/71] [IMP] Improved warning messages for all import modules bzr revid: pso@tinyerp.com-20120722074214-ttvxq2k6d599u1u4 --- addons/import_google/i18n/import_google.pot | 8 +- .../wizard/import_google_data.py | 10 +-- .../import_sugarcrm/i18n/import_sugarcrm.pot | 4 +- addons/import_sugarcrm/import_sugarcrm.py | 6 +- addons/import_sugarcrm/sugar.py | 2 +- addons/import_sugarcrm/sugarsoap_services.py | 86 +++++++++---------- 6 files changed, 58 insertions(+), 58 deletions(-) diff --git a/addons/import_google/i18n/import_google.pot b/addons/import_google/i18n/import_google.pot index 6693d75616f..de5a0a257ec 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 in user view." 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 72044eeb534..32ef6f82534 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 in user view.")) 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 388bcc1ae04..f54cc75d1aa 100644 --- a/addons/import_sugarcrm/i18n/import_sugarcrm.pot +++ b/addons/import_sugarcrm/i18n/import_sugarcrm.pot @@ -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 3acffb8c956..2cb0dfb29bc 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" diff --git a/addons/import_sugarcrm/sugar.py b/addons/import_sugarcrm/sugar.py index df2aa386992..df10b13d376 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 cb266242204..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) From 6bc7158ed27d8e878a4a158f6c043dfba342fd5d Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Sun, 22 Jul 2012 13:24:36 +0530 Subject: [PATCH 33/71] [IMP] Improved warning messages for all l10n modules bzr revid: pso@tinyerp.com-20120722075436-unwk2evpbiuxbp74 --- addons/l10n_ch/i18n/l10n_ch.pot | 2 +- addons/l10n_ch/wizard/bvr_import.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_ch/i18n/l10n_ch.pot b/addons/l10n_ch/i18n/l10n_ch.pot index f5230cbf692..2614ea124a9 100644 --- a/addons/l10n_ch/i18n/l10n_ch.pot +++ b/addons/l10n_ch/i18n/l10n_ch.pot @@ -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 diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py index d2c658513e5..3233a277ce6 100644 --- a/addons/l10n_ch/wizard/bvr_import.py +++ b/addons/l10n_ch/wizard/bvr_import.py @@ -222,10 +222,10 @@ def _import(self, cursor, user, data, context=None): account_id = int(value.split(',')[1]) else : raise osv.except_osv(_('Error'), - _('The properties account payable account receivable are not set.')) + _('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.')) + _('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) From e85181b2ec5104833a652c460a136616117b98dd Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Sun, 22 Jul 2012 13:35:39 +0530 Subject: [PATCH 34/71] [IMP] Improved warning messages for marketing campaign module bzr revid: pso@tinyerp.com-20120722080539-i9uqjddn205ztvor --- addons/marketing_campaign/i18n/marketing_campaign.pot | 4 ++-- addons/marketing_campaign/marketing_campaign.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/marketing_campaign/i18n/marketing_campaign.pot b/addons/marketing_campaign/i18n/marketing_campaign.pot index d27eb729091..4fc2c18936f 100644 --- a/addons/marketing_campaign/i18n/marketing_campaign.pot +++ b/addons/marketing_campaign/i18n/marketing_campaign.pot @@ -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 activitie's 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 4c1c2113246..30fb1ecf358 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -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 activitie's 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'}) @@ -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) From 97d1e8b4cea1810859115bb11529950ab222a427 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Sun, 22 Jul 2012 14:20:05 +0530 Subject: [PATCH 35/71] [MERGE] Improved warning messages for survey module bzr revid: pso@tinyerp.com-20120722085005-6m7cmqsugx3amzr0 --- addons/survey/i18n/survey.pot | 22 +++++++++++----------- addons/survey/survey.py | 10 +++++----- addons/survey/wizard/survey_answer.py | 12 ++++++------ addons/survey/wizard/survey_selection.py | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/addons/survey/i18n/survey.pot b/addons/survey/i18n/survey.pot index 28ea57f11f6..a5cf222bae2 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 can not 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 @@ -690,7 +690,7 @@ msgstr "" #: 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 response. 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 @@ -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 diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 0ebaa2aa586..5bce82837d5 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -449,11 +449,11 @@ class survey_question(osv.osv): 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")) + 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)")) + choices in column heading (white spaces not allowed).")) return super(survey_question, self).write(cr, uid, ids, vals, context=context) @@ -481,14 +481,14 @@ class survey_question(osv.osv): 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)) 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 diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py index 15e2b56a1be..412339895f7 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")}) @@ -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''): @@ -777,7 +777,7 @@ class survey_question_wiz(osv.osv_memory): 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'}) @@ -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'}) @@ -969,7 +969,7 @@ class survey_question_wiz(osv.osv_memory): 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'])) diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py index 279571f4f95..53af41bc80b 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 response. 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 { From b660a037affdb36ad234e1af76151ad2a294629a Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Sun, 22 Jul 2012 14:56:32 +0530 Subject: [PATCH 36/71] [IMP] Improved warning messages for survey module bzr revid: pso@tinyerp.com-20120722092632-xrdkx353au7acoft --- addons/survey/i18n/survey.pot | 14 +++++++------- addons/survey/survey.py | 6 +++--- addons/survey/wizard/survey_answer.py | 2 +- addons/survey/wizard/survey_selection.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/survey/i18n/survey.pot b/addons/survey/i18n/survey.pot index a5cf222bae2..7b8abb90aa1 100644 --- a/addons/survey/i18n/survey.pot +++ b/addons/survey/i18n/survey.pot @@ -584,7 +584,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_answer.py:126 #, python-format -msgid "You cannot 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 @@ -683,7 +683,7 @@ 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 @@ -815,7 +815,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_selection.py:83 #, python-format -msgid "You cannot 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 @@ -1131,7 +1131,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_selection.py:80 #, python-format -msgid "You cannot give response for this survey more than %s times" +msgid "You cannot give response for this survey more than %s times." 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 @@ -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 5bce82837d5..763bf350b5c 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'): @@ -462,7 +462,7 @@ 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']: diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py index 412339895f7..e0614143540 100644 --- a/addons/survey/wizard/survey_answer.py +++ b/addons/survey/wizard/survey_answer.py @@ -123,7 +123,7 @@ class survey_question_wiz(osv.osv_memory): 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 cannot 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")}) diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py index 53af41bc80b..675f14a6d04 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 cannot 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 cannot 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 { From d5d97cb6e307202630b597a2deeaac736e3b7454 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Sun, 22 Jul 2012 18:49:34 +0530 Subject: [PATCH 37/71] [MERGE] Improved warning messages for report_webkit, share and wiki modules bzr revid: pso@tinyerp.com-20120722131934-j9rbotugz3ymvt4m --- addons/report_webkit/i18n/report_webkit.pot | 8 ++++---- addons/report_webkit/webkit_report.py | 16 ++++++++-------- addons/share/i18n/share.pot | 2 +- addons/share/wizard/share_wizard.py | 2 +- addons/wiki/i18n/wiki.pot | 6 +++--- addons/wiki/web/widgets/rss/feedparser.py | 2 +- addons/wiki/wiki.py | 2 +- addons/wiki/wizard/wiki_make_index.py | 2 +- addons/wiki/wizard/wiki_show_diff.py | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/addons/report_webkit/i18n/report_webkit.pot b/addons/report_webkit/i18n/report_webkit.pot index 7a381b8728e..4c5642695de 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..7504d4f766e 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/share/i18n/share.pot b/addons/share/i18n/share.pot index 8d4c4c57024..01406615f89 100644 --- a/addons/share/i18n/share.pot +++ b/addons/share/i18n/share.pot @@ -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 could not be created." msgstr "" #. module: share diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 23245e12a2d..7a75d5be2a6 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.""" diff --git a/addons/wiki/i18n/wiki.pot b/addons/wiki/i18n/wiki.pot index 8349e7691be..b2457978df5 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 revision!" 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..63b45ac94f7 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..332c1d68255 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..37a62b87b86 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 revision!')) return diff From 7e978dce7416e82f57eef382f9e1d14098581ac2 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Sun, 22 Jul 2012 19:10:24 +0530 Subject: [PATCH 38/71] [IMP] Improved warning messages for report_webkit, share and wiki modules bzr revid: pso@tinyerp.com-20120722134024-hu4fbdhw5ga8p1u7 --- addons/report_webkit/i18n/report_webkit.pot | 6 +++--- addons/report_webkit/webkit_report.py | 14 +++++++------- addons/share/i18n/share.pot | 8 ++++---- addons/share/wizard/share_wizard.py | 8 ++++---- addons/wiki/i18n/wiki.pot | 2 +- addons/wiki/wizard/wiki_show_diff.py | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/report_webkit/i18n/report_webkit.pot b/addons/report_webkit/i18n/report_webkit.pot index 4c5642695de..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 @@ -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 7504d4f766e..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,7 +215,7 @@ 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: @@ -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/share/i18n/share.pot b/addons/share/i18n/share.pot index 01406615f89..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 7a75d5be2a6..22e70011b06 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -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/wiki/i18n/wiki.pot b/addons/wiki/i18n/wiki.pot index b2457978df5..e5ef29bd93e 100644 --- a/addons/wiki/i18n/wiki.pot +++ b/addons/wiki/i18n/wiki.pot @@ -374,7 +374,7 @@ msgstr "" #. module: wiki #: code:addons/wiki/wizard/wiki_show_diff.py:54 #, python-format -msgid "You need to select minimum one or maximum two history revision!" +msgid "You need to select minimum one or maximum two history revisions!" msgstr "" #. module: wiki diff --git a/addons/wiki/wizard/wiki_show_diff.py b/addons/wiki/wizard/wiki_show_diff.py index 37a62b87b86..97f7d75024c 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 one or maximum two history revision!')) + raise osv.except_osv(_('Warning'), _('You need to select minimum one or maximum two history revisions!')) return diff From 238bbc539ad840b2c37336d5bdb1c631d12cabc4 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Wed, 25 Jul 2012 13:03:57 +0530 Subject: [PATCH 39/71] [IMP] Improved warning messages for account module bzr revid: pso@tinyerp.com-20120725073357-kcdgglpmbxrtbq6d --- addons/account/account.py | 62 +++---- addons/account/account_analytic_line.py | 8 +- addons/account/account_cash_statement.py | 4 +- addons/account/account_invoice.py | 20 +-- addons/account/account_move_line.py | 42 ++--- addons/account/i18n/account.pot | 158 +++++++++--------- addons/account/installer.py | 2 +- addons/account/report/common_report_header.py | 2 +- .../wizard/account_automatic_reconcile.py | 2 +- .../account/wizard/account_change_currency.py | 8 +- .../wizard/account_fiscalyear_close.py | 12 +- .../account/wizard/account_invoice_refund.py | 6 +- .../account/wizard/account_invoice_state.py | 4 +- .../wizard/account_move_bank_reconcile.py | 2 +- addons/account/wizard/account_move_journal.py | 2 +- .../wizard/account_open_closed_fiscalyear.py | 2 +- .../account_report_aged_partner_balance.py | 4 +- .../account/wizard/account_report_common.py | 4 +- addons/account/wizard/account_state_open.py | 2 +- .../wizard/account_validate_account_move.py | 2 +- 20 files changed, 174 insertions(+), 174 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index e56be49222c..35e8667f1d1 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -123,7 +123,7 @@ class account_payment_term_line(osv.osv): return True _constraints = [ - (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% ', ['value_amount']), + (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% .', ['value_amount']), ] account_payment_term_line() @@ -407,7 +407,7 @@ class account_account(osv.osv): period_obj = self.pool.get('account.period') pids = period_obj.search(cr, uid, [('special','=',True),('company_id','=',account.company_id.id)], context=context) if not pids: - raise osv.except_osv(_('Error!'),_("No opening/closing period defined, please create one to set the initial balance!")) + raise osv.except_osv(_('Error!'),_("No opening/closing period is defined, please create one to set the initial balance!")) move_obj = self.pool.get('account.move.line') move_id = move_obj.search(cr, uid, [ @@ -539,9 +539,9 @@ class account_account(osv.osv): return True _constraints = [ - (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']), - (_check_type, 'Configuration Error! \nYou can not define children to an account with internal type different of "View"! ', ['type']), - (_check_account_type, 'Configuration Error! \nYou can not select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable"! ', ['user_type','type']), + (_check_recursion, 'Error ! You cannot create recursive accounts.', ['parent_id']), + (_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']), + (_check_account_type, 'Configuration Error! \nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable"! ', ['user_type','type']), ] _sql_constraints = [ ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') @@ -617,9 +617,9 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): if method == 'write': - raise osv.except_osv(_('Error !'), _('You can not desactivate an account that contains some journal items.')) + raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains some journal items.')) elif method == 'unlink': - raise osv.except_osv(_('Error !'), _('You can not remove an account containing journal items.')) + raise osv.except_osv(_('Error !'), _('You cannot remove an account containing journal items.')) #Checking whether the account is set as a property to any Partner or not value = 'account.account,' + str(ids[0]) partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context) @@ -788,7 +788,7 @@ class account_journal(osv.osv): if 'company_id' in vals and journal.company_id.id != vals['company_id']: move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)]) if move_lines: - raise osv.except_osv(_('Warning !'), _('You can not modify the company of this journal as its related record exist in journal items')) + raise osv.except_osv(_('Warning !'), _('You cannot modify the company of this journal as its related record exist in journal items.')) return super(account_journal, self).write(cr, uid, ids, vals, context=context) def create_sequence(self, cr, uid, vals, context=None): @@ -964,7 +964,7 @@ class account_fiscalyear(osv.osv): ids = self.search(cr, uid, args, context=context) if not ids: if exception: - raise osv.except_osv(_('Error !'), _('No fiscal year defined for this date !\nPlease create one from the configuration of the accounting menu.')) + raise osv.except_osv(_('Error !'), _('No fiscal year is defined for this date !\nPlease create one from the configuration of the accounting menu.')) else: return [] return ids @@ -1053,7 +1053,7 @@ class account_period(osv.osv): args.append(('company_id', '=', company_id)) ids = self.search(cr, uid, args, context=context) if not ids: - raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%dt) + raise osv.except_osv(_('Error !'), _('No period is defined for this date: %s !\nPlease create one.')%dt) return ids def action_draft(self, cr, uid, ids, *args): @@ -1091,9 +1091,9 @@ class account_period(osv.osv): period_date_stop = period_to.date_stop company2_id = period_to.company_id.id if company1_id != company2_id: - raise osv.except_osv(_('Error'), _('You should choose the periods that belong to the same company.')) + raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.')) if period_date_start > period_date_stop: - raise osv.except_osv(_('Error'), _('Start period should be smaller than End period.')) + raise osv.except_osv(_('Error!'), _('Start period should be smaller than End period.')) #for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search). if period_from.special: return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) @@ -1132,7 +1132,7 @@ class account_journal_period(osv.osv): cr.execute('select * from account_move_line where journal_id=%s and period_id=%s limit 1', (obj.journal_id.id, obj.period_id.id)) res = cr.fetchall() if res: - raise osv.except_osv(_('Error !'), _('You can not modify/delete a journal with entries for this period !')) + raise osv.except_osv(_('Error !'), _('You cannot modify/delete a journal with entries for this period !')) return True def write(self, cr, uid, ids, vals, context=None): @@ -1301,7 +1301,7 @@ class account_move(osv.osv): _constraints = [ (_check_centralisation, - 'You can not create more than one move per period on centralized journal', + 'You cannot create more than one move per period on centralized journal.', ['journal_id']), ] @@ -1312,7 +1312,7 @@ class account_move(osv.osv): valid_moves = self.validate(cr, uid, ids, context) if not valid_moves: - raise osv.except_osv(_('Integrity Error !'), _('You can not validate a non-balanced entry !\nMake sure you have configured payment terms properly !\nThe latest payment term line should be of the type "Balance" !')) + raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry !\nMake sure you have configured payment terms properly !\nThe latest payment term line should be of the type "Balance" !')) obj_sequence = self.pool.get('ir.sequence') for move in self.browse(cr, uid, valid_moves, context=context): if move.name =='/': @@ -1326,7 +1326,7 @@ class account_move(osv.osv): c = {'fiscalyear_id': move.period_id.fiscalyear_id.id} new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c) else: - raise osv.except_osv(_('Error'), _('No sequence defined on the journal !')) + raise osv.except_osv(_('Error'), _('Please define sequence on the journal !')) if new_name: self.write(cr, uid, [move.id], {'name':new_name}) @@ -1356,7 +1356,7 @@ class account_move(osv.osv): def button_cancel(self, cr, uid, ids, context=None): for line in self.browse(cr, uid, ids, context=context): if not line.journal_id.update_posted: - raise osv.except_osv(_('Error !'), _('You can not modify a posted entry of this journal !\nYou should set the journal to allow cancelling entries if you want to do that.')) + raise osv.except_osv(_('Error !'), _('You cannot modify a posted entry of this journal !\nYou should set the journal to allow cancelling entries if you want to do that.')) if ids: cr.execute('UPDATE account_move '\ 'SET state=%s '\ @@ -1443,8 +1443,8 @@ class account_move(osv.osv): obj_move_line = self.pool.get('account.move.line') for move in self.browse(cr, uid, ids, context=context): if move['state'] != 'draft': - raise osv.except_osv(_('UserError'), - _('You can not delete a posted journal entry "%s"!') % \ + raise osv.except_osv(_('UserError!'), + _('You cannot delete a posted journal entry "%s"!') % \ move['name']) line_ids = map(lambda x: x.id, move.line_id) context['journal_id'] = move.journal_id.id @@ -1474,14 +1474,14 @@ class account_move(osv.osv): if not account_id: raise osv.except_osv(_('UserError'), _('No default debit account is defined \n' \ - 'on journal "%s"') % move.journal_id.name) + 'on journal "%s".') % move.journal_id.name) else: account_id = move.journal_id.default_credit_account_id.id mode2 = 'credit' if not account_id: raise osv.except_osv(_('UserError'), _('No default credit account is defined \n' \ - 'on journal "%s"') % move.journal_id.name) + 'on journal "%s".') % move.journal_id.name) # find the first line of this move with the current mode # or create it if it doesn't exist @@ -1575,11 +1575,11 @@ class account_move(osv.osv): if not company_id: company_id = line.account_id.company_id.id if not company_id == line.account_id.company_id.id: - raise osv.except_osv(_('Error'), _("Cannot create moves for different companies")) + raise osv.except_osv(_('Error!'), _("Cannot create moves for different companies.")) if line.account_id.currency_id and line.currency_id: if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id): - raise osv.except_osv(_('Error'), _("""Cannot create move with currency different from ..""") % (line.account_id.code, line.account_id.name)) + raise osv.except_osv(_('Error!'), _("""Cannot create move with currency different from ..""") % (line.account_id.code, line.account_id.name)) if abs(amount) < 10 ** -4: # If the move is balanced @@ -1831,7 +1831,7 @@ class account_tax_code(osv.osv): _check_recursion = check_cycle _constraints = [ - (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']) + (_check_recursion, 'Error ! You cannot create recursive accounts.', ['parent_id']) ] _order = 'code' @@ -2116,7 +2116,7 @@ class account_tax(osv.osv): } def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None): - _logger.warning("Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included") + _logger.warning("Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included.") return self._compute(cr, uid, taxes, price_unit, quantity, product, partner) def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None): @@ -2519,8 +2519,8 @@ class account_account_template(osv.osv): _check_recursion = check_cycle _constraints = [ - (_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']), - (_check_type, 'Configuration Error!\nYou can not define children to an account that has internal type other than "View"!', ['type']), + (_check_recursion, 'Error ! You cannot create recursive account templates.', ['parent_id']), + (_check_type, 'Configuration Error!\nYou cannot define children to an account that has internal type other than "View"!', ['type']), ] @@ -2621,7 +2621,7 @@ class account_add_tmpl_wizard(osv.osv_memory): ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]], ['code']) res = None if not ptids or not ptids[0]['code']: - raise osv.except_osv(_('Error !'), _('I can not locate a parent code for the template account!')) + raise osv.except_osv(_('Error !'), _('I cannot locate a parent code for the template account!')) res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])]) return res and res[0] or False @@ -2727,7 +2727,7 @@ class account_tax_code_template(osv.osv): _check_recursion = check_cycle _constraints = [ - (_check_recursion, 'Error ! You can not create recursive Tax Codes.', ['parent_id']) + (_check_recursion, 'Error ! You cannot create recursive Tax Codes.', ['parent_id']) ] _order = 'code,name' account_tax_code_template() @@ -3384,7 +3384,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): if not ids: break else: - raise osv.except_osv(_('Error'), _('Cannot generate an unused journal code.')) + raise osv.except_osv(_('Error!'), _('Cannot generate an unused journal code.')) vals = { 'name': line['acc_name'], @@ -3462,7 +3462,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): journal_data.append(vals) ref_acc_bank = obj_wizard.chart_template_id.bank_account_view_id if journal_data and not ref_acc_bank.code: - raise osv.except_osv(_('Configuration Error !'), _('The bank account defined on the selected chart of accounts hasn\'t a code.')) + raise osv.except_osv(_('Configuration Error !'), _('The bank account defined on the selected chart of accounts hasnot a code.')) current_num = 1 for line in journal_data: diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 06de5a3e43e..8dc7fb8abf4 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -88,8 +88,8 @@ class account_analytic_line(osv.osv): a = prod.categ_id.property_account_expense_categ.id if not a: raise osv.except_osv(_('Error !'), - _('There is no expense account defined ' \ - 'for this product: "%s" (id:%d)') % \ + _('No expense account is defined ' \ + 'for this product: "%s" (id:%d).') % \ (prod.name, prod.id,)) else: a = prod.product_tmpl_id.property_account_income.id @@ -97,8 +97,8 @@ class account_analytic_line(osv.osv): a = prod.categ_id.property_account_income_categ.id if not a: raise osv.except_osv(_('Error !'), - _('There is no income account defined ' \ - 'for this product: "%s" (id:%d)') % \ + _('No income account is defined ' \ + 'for this product: "%s" (id:%d).') % \ (prod.name, prod_id,)) flag = False diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 9660c888b3f..57832b48246 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -260,7 +260,7 @@ class account_cash_statement(osv.osv): if journal_type == 'bank': return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context) if not self._equal_balance(cr, uid, cash_id, context): - raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on this cash register !')) + raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on the cash register !')) return True def statement_close(self, cr, uid, ids, journal_type='bank', context=None): @@ -290,7 +290,7 @@ class account_cash_statement(osv.osv): for item_label, item_account in TALBES: if getattr(obj.journal_id, item_account): raise osv.except_osv(_('Error !'), - _('There is no %s Account on the Journal %s') % (item_label, obj.journal_id.name,)) + _('No %s Account on the Journal %s.') % (item_label, obj.journal_id.name,)) is_profit = obj.difference < 0.0 diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index c529ffbd1b9..0771579d9df 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -364,15 +364,15 @@ class account_invoice(osv.osv): except Exception, e: if '"journal_id" viol' in e.args[0]: raise orm.except_orm(_('Configuration Error!'), - _('No Sale/Purchase Journal(s) is defined !')) + _('No Sale/Purchase Journal(s) is defined!')) else: - raise orm.except_orm(_('Unknown Error'), str(e)) + raise orm.except_orm(_('Unknown Error!'), str(e)) def invoice_print(self, cr, uid, ids, context=None): ''' This function prints the invoice and mark it as sent, so that we can see more easily the next step of the workflow ''' - assert len(ids) == 1, 'This option should only be used for a single id at a time' + assert len(ids) == 1, 'This option should only be used for a single id at a time.' self.write(cr, uid, ids, {'sent': True}, context=context) datas = { 'ids': ids, @@ -425,7 +425,7 @@ class account_invoice(osv.osv): if t['state'] in ('draft', 'cancel') and t['internal_number']== False: unlink_ids.append(t['id']) else: - raise osv.except_osv(_('Invalid action !'), _('You can not delete an invoice which is open or paid. We suggest you to refund it instead.')) + raise osv.except_osv(_('Invalid action !'), _('You cannot delete an invoice which is open or paid. We suggest you to refund it instead.')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True @@ -866,7 +866,7 @@ class account_invoice(osv.osv): total_percent += line.value_amount total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0) if (total_fixed + total_percent) > 100: - raise osv.except_osv(_('Error !'), _("Can not create the invoice !\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. The latest line of your payment term must be of type 'balance' to avoid rounding issues.")) + raise osv.except_osv(_('Error !'), _("Cannot create the invoice !\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. The latest line of your payment term must be of type 'balance' to avoid rounding issues.")) # one move line per tax line iml += ait_obj.move_line_get(cr, uid, inv.id) @@ -948,7 +948,7 @@ class account_invoice(osv.osv): journal = journal_obj.browse(cr, uid, journal_id, context=ctx) if journal.centralisation: raise osv.except_osv(_('UserError'), - _('You cannot create an invoice on a centralised journal. Uncheck the centralised counterpart box in the related journal from the configuration menu.')) + _('You cannot create an invoice on a centralized journal. Uncheck the centralized counterpart box in the related journal from the configuration menu.')) line = self.finalize_invoice_move_lines(cr, uid, inv, line) @@ -1061,7 +1061,7 @@ class account_invoice(osv.osv): pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids']) for move_line in pay_ids: if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids: - raise osv.except_osv(_('Error !'), _('You can not cancel an invoice which is partially paid! You need to unreconcile related payment entries first!')) + raise osv.except_osv(_('Error !'), _('You cannot cancel an invoice which is partially paid! You need to unreconcile related payment entries first!')) # First, set the invoices as cancelled and detach the move ids self.write(cr, uid, ids, {'state':'cancel', 'move_id':False}) @@ -1187,7 +1187,7 @@ class account_invoice(osv.osv): if context is None: context = {} #TODO check if we can use different period for payment and the writeoff line - assert len(ids)==1, "Can only pay one invoice at a time" + assert len(ids)==1, "Can only pay one invoice at a time." invoice = self.browse(cr, uid, ids[0], context=context) src_account_id = invoice.account_id.id # Take the seq as name for move @@ -1273,7 +1273,7 @@ class account_invoice(osv.osv): else: code = invoice.currency_id.symbol # TODO: use currency's formatting function - msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)") % \ + msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining).") % \ (name, pay_amount, code, invoice.amount_total, code, total, code) self.message_append_note(cr, uid, [inv_id], body=msg, context=context) self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context) @@ -1475,7 +1475,7 @@ class account_invoice_line(osv.osv): if prod.uom_id.category_id.id != prod_uom.category_id.id: warning = { 'title': _('Warning!'), - 'message': _('Selected a Unit of Measure is not compatible with the Unit of Measure of the product.') + 'message': _('Selected Unit of Measure is not compatible with the Unit of Measure of the product.') } return {'value': res['value'], 'warning': warning} return res diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 555a682ca0b..645dd16c541 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 havenot supplied enough argument to compute the initial balance, please select a period and journal in the context.")) if context.get('journal_ids', False): @@ -577,14 +577,14 @@ class account_move_line(osv.osv): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'view': - raise osv.except_osv(_('Error :'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) + raise osv.except_osv(_('Error !'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) return True def _check_no_closed(self, cr, uid, ids, context=None): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'closed': - raise osv.except_osv(_('Error :'), _('You can not create journal items on a closed account %s %s') % (l.account_id.code, l.account_id.name)) + raise osv.except_osv(_('Error !'), _('You cannot create journal items on a closed account %s %s.') % (l.account_id.code, l.account_id.name)) return True def _check_company_id(self, cr, uid, ids, context=None): @@ -609,8 +609,8 @@ class account_move_line(osv.osv): return True _constraints = [ - (_check_no_view, 'You can not create journal items on an account of type view.', ['account_id']), - (_check_no_closed, 'You can not create journal items on closed account.', ['account_id']), + (_check_no_view, 'You cannot create journal items on an account of type view.', ['account_id']), + (_check_no_closed, 'You cannot create journal items on closed account.', ['account_id']), (_check_company_id, 'Account and Period must belong to the same company.', ['company_id']), (_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']), (_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']), @@ -743,7 +743,7 @@ class account_move_line(osv.osv): context = {} for line in self.browse(cr, uid, ids, context=context): if company_list and not line.company_id.id in company_list: - raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries')) + raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries.')) company_list.append(line.company_id.id) for line in self.browse(cr, uid, ids, context=context): @@ -752,7 +752,7 @@ class account_move_line(osv.osv): else: currency_id = line.company_id.currency_id if line.reconcile_id: - raise osv.except_osv(_('Warning'), _('Already Reconciled!')) + raise osv.except_osv(_('Warning !'), _('Already Reconciled!')) if line.reconcile_partial_id: for line2 in line.reconcile_partial_id.line_partial_ids: if not line2.reconcile_id: @@ -796,7 +796,7 @@ class account_move_line(osv.osv): company_list = [] for line in self.browse(cr, uid, ids, context=context): if company_list and not line.company_id.id in company_list: - raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries')) + raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries.')) company_list.append(line.company_id.id) for line in unrec_lines: if line.state <> 'valid': @@ -823,15 +823,15 @@ class account_move_line(osv.osv): r = cr.fetchall() #TODO: move this check to a constraint in the account_move_reconcile object if not unrec_lines: - raise osv.except_osv(_('Error'), _('Entry is already reconciled')) + raise osv.except_osv(_('Error !'), _('Entry is already reconciled!')) account = account_obj.browse(cr, uid, account_id, context=context) if r[0][1] != None: - raise osv.except_osv(_('Error'), _('Some entries are already reconciled !')) + raise osv.except_osv(_('Error !'), _('Some entries are already reconciled !')) if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \ (account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))): if not writeoff_acc_id: - raise osv.except_osv(_('Warning'), _('You have to provide an account for the write off/exchange difference entry !')) + raise osv.except_osv(_('Warning !'), _('You have to provide an account for the write off/exchange difference entry !')) if writeoff > 0: debit = writeoff credit = 0.0 @@ -1090,7 +1090,7 @@ class account_move_line(osv.osv): res = cr.fetchone() if res: if res[1] != 'draft': - raise osv.except_osv(_('UserError'), + raise osv.except_osv(_('UserError!'), _('The account move (%s) for centralisation ' \ 'has been confirmed!') % res[2]) return res @@ -1139,9 +1139,9 @@ class account_move_line(osv.osv): if isinstance(ids, (int, long)): ids = [ids] if vals.get('account_tax_id', False): - raise osv.except_osv(_('Unable to change tax !'), _('You can not change the tax, you should remove and recreate lines !')) + raise osv.except_osv(_('Unable to change tax !'), _('You cannot change the tax, you should remove and recreate lines !')) if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: - raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!')) + raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account!')) if update_check: if ('account_id' in vals) or ('journal_id' in vals) or ('period_id' in vals) or ('move_id' in vals) or ('debit' in vals) or ('credit' in vals) or ('date' in vals): self._update_check(cr, uid, ids, context) @@ -1186,7 +1186,7 @@ class account_move_line(osv.osv): result = cr.fetchall() for (state,) in result: if state == 'done': - raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.')) + raise osv.except_osv(_('Error !'), _('You cannot add/modify entries in a closed journal.')) if not result: journal = journal_obj.browse(cr, uid, journal_id, context=context) period = period_obj.browse(cr, uid, period_id, context=context) @@ -1202,9 +1202,9 @@ class account_move_line(osv.osv): for line in self.browse(cr, uid, ids, context=context): err_msg = _('Move name (id): %s (%s)') % (line.move_id.name, str(line.move_id.id)) if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted): - raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n%s') % err_msg) + raise osv.except_osv(_('Error !'), _('You cannot do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n%s.') % err_msg) if line.reconcile_id: - raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n%s') % err_msg) + raise osv.except_osv(_('Error !'), _('You cannot do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n%s.') % err_msg) t = (line.journal_id.id, line.period_id.id) if t not in done: self._update_journal_check(cr, uid, line.journal_id.id, line.period_id.id, context) @@ -1224,7 +1224,7 @@ class account_move_line(osv.osv): if company_id: vals['company_id'] = company_id[0] if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: - raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!')) + raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account!')) if 'journal_id' in vals: context['journal_id'] = vals['journal_id'] if 'period_id' in vals: @@ -1237,7 +1237,7 @@ class account_move_line(osv.osv): if 'period_id' not in context or not isinstance(context.get('period_id', ''), (int, long)): period_candidate_ids = self.pool.get('account.period').name_search(cr, uid, name=context.get('period_id','')) if len(period_candidate_ids) != 1: - raise osv.except_osv(_('Encoding error'), _('No period found or more than one period found for the given date.')) + raise osv.except_osv(_('Encoding error!'), _('No period is found or more than one period found for the given date.')) context['period_id'] = period_candidate_ids[0][0] if not context.get('journal_id', False) and context.get('search_default_journal_id', False): context['journal_id'] = context.get('search_default_journal_id') @@ -1263,7 +1263,7 @@ class account_move_line(osv.osv): move_id = move_obj.create(cr, uid, v, context) vals['move_id'] = move_id else: - raise osv.except_osv(_('No piece number !'), _('Can not create an automatic sequence for this piece!\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) + raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece!\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) ok = not (journal.type_control_ids or journal.account_control_ids) if ('account_id' in vals): account = account_obj.browse(cr, uid, vals['account_id'], context=context) @@ -1288,7 +1288,7 @@ class account_move_line(osv.osv): vals['amount_currency'] = cur_obj.compute(cr, uid, account.company_id.currency_id.id, account.currency_id.id, vals.get('debit', 0.0)-vals.get('credit', 0.0), context=ctx) if not ok: - raise osv.except_osv(_('Bad account !'), _('You can not use this general account in this journal, check the tab \'Entry Controls\' on the related journal !')) + raise osv.except_osv(_('Bad account !'), _('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal !')) if vals.get('analytic_account_id',False): if journal.analytic_journal_id: diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index a29dd5fdfa6..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 "Selected a Unit of Measure is not compatible with the Unit of Measure of the product." +msgid "Selected Unit of Measure is not compatible with the Unit of Measure of the product." msgstr "" #. module: account @@ -1721,7 +1721,7 @@ msgstr "" #. module: account #: constraint:res.company:0 -msgid "Error! You can not create recursive companies." +msgid "Error! You cannot create recursive companies." msgstr "" #. module: account @@ -1935,7 +1935,7 @@ msgstr "" #: code:addons/account/account.py:1461 #, python-format msgid "No default debit account is defined \n" -"on journal \"%s\"" +"on journal \"%s\"." msgstr "" #. module: account @@ -1952,14 +1952,14 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:1277 #, python-format -msgid "Can not create an automatic sequence for this piece!\n" +msgid "Cannot create an automatic sequence for this piece!\n" "Put a sequence in the journal definition for automatic numbering or create a sequence manually for this piece." msgstr "" #. module: account #: code:addons/account/account.py:787 #, python-format -msgid "You can not modify the company of this journal as its related record exist in journal items" +msgid "You cannot modify the company of this journal as its related record exist in journal items." msgstr "" #. module: account @@ -2013,7 +2013,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:370 #, python-format -msgid "There is no Accounting Journal of type Sale/Purchase defined!" +msgid "No Sale/Purchase Journal(s) is defined!" msgstr "" #. module: account @@ -2113,7 +2113,7 @@ msgstr "" #: code:addons/account/account.py:1468 #, python-format msgid "No default credit account is defined \n" -"on journal \"%s\"" +"on journal \"%s\"." msgstr "" #. module: account @@ -2163,7 +2163,7 @@ msgstr "" #. module: account #: constraint:account.account:0 #: constraint:account.tax.code:0 -msgid "Error ! You can not create recursive accounts." +msgid "Error ! You cannot create recursive accounts." msgstr "" #. module: account @@ -2530,7 +2530,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1321 #, python-format -msgid "No sequence defined on the journal !" +msgid "Please define sequence on the journal !" msgstr "" #. module: account @@ -2635,7 +2635,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:392 #, python-format -msgid "You can not delete an invoice which is open or paid. We suggest you to refund it instead." +msgid "You cannot delete an invoice which is open or paid. We suggest you to refund it instead." msgstr "" #. module: account @@ -2915,7 +2915,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_open_closed_fiscalyear.py:39 #, python-format -msgid "No End of year journal defined for the fiscal year" +msgid "Please define End of year journal for the fiscal year." msgstr "" #. module: account @@ -3181,7 +3181,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:839 #, python-format -msgid "Can not create the invoice !\n" +msgid "Cannot create the invoice !\n" "The related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. The latest line of your payment term must be of type 'balance' to avoid rounding issues." msgstr "" @@ -3216,7 +3216,7 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:584 #, python-format -msgid "You can not create journal items on a \"view\" account %s %s" +msgid "You cannot create journal items on a \"view\" account %s %s." msgstr "" #. module: account @@ -3449,7 +3449,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:921 #, python-format -msgid "You cannot create an invoice on a centralised journal. Uncheck the centralised counterpart box in the related journal from the configuration menu." +msgid "You cannot create an invoice on a centralized journal. Uncheck the centralized counterpart box in the related journal from the configuration menu." msgstr "" #. module: account @@ -3473,7 +3473,7 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:591 #, python-format -msgid "You can not create journal items on a closed account %s %s" +msgid "You cannot create journal items on a closed account %s %s." msgstr "" #. module: account @@ -3737,7 +3737,7 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:97 #, python-format -msgid "You haven't supplied enough argument to compute the initial balance, please select a period and journal in the context." +msgid "You havenot supplied enough argument to compute the initial balance, please select a period and journal in the context." msgstr "" #. module: account @@ -3775,8 +3775,8 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:1216 #, python-format -msgid "You can not do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n" -"%s" +msgid "You cannot do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n" +"%s." msgstr "" #. module: account @@ -3830,7 +3830,7 @@ msgstr "" #. module: account #: code:addons/account/account_analytic_line.py:93 #, python-format -msgid "There is no expense account defined for this product: \"%s\" (id:%d)" +msgid "No expense account is defined for this product: \"%s\" (id:%d)." msgstr "" #. module: account @@ -3905,7 +3905,7 @@ msgstr "" #. module: account #: constraint:account.analytic.line:0 -msgid "You can not create analytic line on view account." +msgid "You cannot create analytic line on view account." msgstr "" #. module: account @@ -3980,7 +3980,7 @@ msgstr "" #. module: account #: code:addons/account/report/common_report_header.py:92 #, python-format -msgid "Not implemented" +msgid "Not implemented!" msgstr "" #. module: account @@ -4032,7 +4032,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1077 #, python-format -msgid "You can not modify company of this period as some journal items exists." +msgid "You cannot modify company of this period as some journal items exist." msgstr "" #. module: account @@ -4065,7 +4065,7 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:1251 #, python-format -msgid "Encoding error" +msgid "Encoding error!" msgstr "" #. module: account @@ -4178,7 +4178,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1567 #, python-format -msgid "Couldn't create move with currency different from the secondary currency of the account \"%s - %s\". Clear the secondary currency field of the account definition if you want to accept all currencies." +msgid "Cannot create move with currency different from the secondary currency of the account \"%s - %s\". Clear the secondary currency field of the account definition if you want to accept all currencies." msgstr "" #. module: account @@ -4332,7 +4332,7 @@ msgstr "" #. module: account #: constraint:account.account.template:0 msgid "Configuration Error!\n" -"You can not define children to an account with internal type different of \"View\"! " +"You cannot define children to an account with internal type different of \"View\"! " msgstr "" #. module: account @@ -4404,7 +4404,7 @@ msgstr "" #: code:addons/account/wizard/account_report_common.py:144 #: code:addons/account/wizard/account_report_common.py:150 #, python-format -msgid "Error" +msgid "Error!" msgstr "" #. module: account @@ -4501,7 +4501,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1351 #, python-format -msgid "You can not modify a posted entry of this journal !\n" +msgid "You cannot modify a posted entry of this journal !\n" "You should set the journal to allow cancelling entries if you want to do that." msgstr "" @@ -4727,7 +4727,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_invoice_refund.py:146 #, python-format -msgid "No Period found on Invoice!" +msgid "No Period is found on Invoice!" msgstr "" #. module: account @@ -4910,7 +4910,7 @@ msgstr "" #. module: account #: constraint:account.move:0 -msgid "You can not create more than one move per period on centralized journal" +msgid "You cannot create more than one move per period on centralized journal." msgstr "" #. module: account @@ -5024,7 +5024,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_validate_account_move.py:39 #, python-format -msgid "Specified Journal does not have any account move entries in draft state for this period" +msgid "Specified Journal does not have any account move entries in draft state for this period." msgstr "" #. module: account @@ -5118,7 +5118,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:963 #, python-format -msgid "No fiscal year defined for this date !\n" +msgid "No fiscal year is defined for this date !\n" "Please create one from the configuration of the accounting menu." msgstr "" @@ -5371,7 +5371,7 @@ msgstr "" #: code:addons/account/account_move_line.py:1155 #: code:addons/account/account_move_line.py:1238 #, python-format -msgid "You can not use an inactive account!" +msgid "You cannot use an inactive account!" msgstr "" #. module: account @@ -5475,7 +5475,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_report_common.py:150 #, python-format -msgid "not implemented" +msgid "Not implemented!" msgstr "" #. module: account @@ -5514,7 +5514,7 @@ msgstr "" #. module: account #: constraint:account.account:0 msgid "Configuration Error! \n" -"You can not define children to an account with internal type different of \"View\"! " +"You cannot define children to an account with internal type different of \"View\"! " msgstr "" #. module: account @@ -5640,7 +5640,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:629 #, python-format -msgid "You can not remove/desactivate an account which is set on a customer or supplier." +msgid "You cannot remove/deactivate an account which is set on a customer or supplier." msgstr "" #. module: account @@ -5929,7 +5929,7 @@ msgstr "" #. module: account #: constraint:account.payment.term.line:0 -msgid "Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% " +msgid "Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% ." msgstr "" #. module: account @@ -5956,7 +5956,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:622 #, python-format -msgid "You can not desactivate an account that contains some journal items." +msgid "You cannot deactivate an account that contains some journal items." msgstr "" #. module: account @@ -5988,7 +5988,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_state_open.py:37 #, python-format -msgid "Invoice is already reconciled" +msgid "Invoice is already reconciled." msgstr "" #. module: account @@ -6012,7 +6012,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:624 #, python-format -msgid "You can not remove an account containing journal items." +msgid "You cannot remove an account containing journal items." msgstr "" #. module: account @@ -6035,7 +6035,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1563 #, python-format -msgid "Couldn't create move between different companies" +msgid "Cannot create move between different companies" msgstr "" #. module: account @@ -6183,7 +6183,7 @@ msgstr "" #: code:addons/account/account_move_line.py:584 #: code:addons/account/account_move_line.py:591 #, python-format -msgid "Error :" +msgid "Error !" msgstr "" #. module: account @@ -6230,8 +6230,8 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:1218 #, python-format -msgid "You can not do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n" -"%s" +msgid "You cannot do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n" +"%s." msgstr "" #. module: account @@ -6454,7 +6454,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1432 #, python-format -msgid "You can not delete a posted journal entry \"%s\"!" +msgid "You cannot delete a posted journal entry \"%s\"!" msgstr "" #. module: account @@ -6548,7 +6548,7 @@ msgstr "" #: code:addons/account/account_invoice.py:528 #: code:addons/account/account_invoice.py:543 #, python-format -msgid "Can not find a chart of account, you should create one from the configuration of the accounting menu." +msgid "Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu." msgstr "" #. module: account @@ -6720,7 +6720,7 @@ msgstr "" #: code:addons/account/wizard/account_validate_account_move.py:39 #: code:addons/account/wizard/account_validate_account_move.py:61 #, python-format -msgid "Warning" +msgid "Warning !" msgstr "" #. module: account @@ -6797,7 +6797,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_fiscalyear_close.py:73 #, python-format -msgid "The periods to generate opening entries were not found" +msgid "The periods to generate opening entries were not found." msgstr "" #. module: account @@ -6843,7 +6843,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_fiscalyear_close.py:84 #, python-format -msgid "The journal must have default credit and debit account" +msgid "The journal must have default credit and debit account." msgstr "" #. module: account @@ -7056,7 +7056,7 @@ msgstr "" #: code:addons/account/wizard/account_report_aged_partner_balance.py:56 #: code:addons/account/wizard/account_report_aged_partner_balance.py:58 #, python-format -msgid "UserError" +msgid "UserError!" msgstr "" #. module: account @@ -7246,13 +7246,13 @@ msgstr "" #. module: account #: code:addons/account/account.py:3446 #, python-format -msgid "The bank account defined on the selected chart of accounts hasn't a code." +msgid "The bank account defined on the selected chart of accounts hasnot a code." msgstr "" #. module: account #: code:addons/account/wizard/account_invoice_refund.py:108 #, python-format -msgid "Can not %s draft/proforma/cancel invoice." +msgid "Cannot %s draft/proforma/cancel invoice." msgstr "" #. module: account @@ -7333,7 +7333,7 @@ msgstr "" #. module: account #: constraint:account.tax.code.template:0 -msgid "Error ! You can not create recursive Tax Codes." +msgid "Error ! You cannot create recursive Tax Codes." msgstr "" #. module: account @@ -7418,7 +7418,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:428 #, python-format -msgid "Can not find a chart of accounts for this company, you should create one." +msgid "Cannot find a chart of accounts for this company, you should create one." msgstr "" #. module: account @@ -7520,7 +7520,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:1030 #, python-format -msgid "You can not cancel an invoice which is partially paid! You need to unreconcile related payment entries first!" +msgid "You cannot cancel an invoice which is partially paid! You need to unreconcile related payment entries first!" msgstr "" #. module: account @@ -7634,7 +7634,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1052 #, python-format -msgid "No period defined for this date: %s !\n" +msgid "No period is defined for this date: %s !\n" "Please create one." msgstr "" @@ -7956,7 +7956,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:1307 #, python-format -msgid "You can not validate a non-balanced entry !\n" +msgid "You cannot validate a non-balanced entry !\n" "Make sure you have configured payment terms properly !\n" "The latest payment term line should be of the type \"Balance\" !" msgstr "" @@ -8427,7 +8427,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_automatic_reconcile.py:152 #, python-format -msgid "You must select accounts to reconcile" +msgid "You must select accounts to reconcile." msgstr "" #. module: account @@ -8465,7 +8465,7 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:1153 #, python-format -msgid "You can not change the tax, you should remove and recreate lines !" +msgid "You cannot change the tax, you should remove and recreate lines !" msgstr "" #. module: account @@ -8519,7 +8519,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_fiscalyear_close.py:87 #, python-format -msgid "The journal must have centralised counterpart without the Skipping draft state option checked!" +msgid "The journal must have centralized counterpart without the Skipping draft state option checked!" msgstr "" #. module: account @@ -8561,7 +8561,7 @@ msgstr "" #. module: account #: code:addons/account/account.py:412 #, python-format -msgid "No opening/closing period defined, please create one to set the initial balance!" +msgid "No opening/closing period is defined, please create one to set the initial balance!" msgstr "" #. module: account @@ -8726,7 +8726,7 @@ msgstr "" #. module: account #: code:addons/account/account_invoice.py:372 #, python-format -msgid "Unknown Error" +msgid "Unknown Error!" msgstr "" #. module: account @@ -8790,7 +8790,7 @@ msgstr "" #. module: account #: constraint:account.account:0 msgid "Configuration Error! \n" -"You can not select an account type with a deferral method different of \"Unreconciled\" for accounts with internal type \"Payable/Receivable\"! " +"You cannot select an account type with a deferral method different of \"Unreconciled\" for accounts with internal type \"Payable/Receivable\"! " msgstr "" #. module: account @@ -8894,7 +8894,7 @@ msgstr "" #. module: account #: help:account.invoice.refund,filter_refund:0 -msgid "Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled" +msgid "Refund invoice base on this type. You cannot Modify and Cancel if the invoice is already reconciled" msgstr "" #. module: account @@ -9055,12 +9055,12 @@ msgstr "" #. module: account #: code:addons/account/account_analytic_line.py:102 #, python-format -msgid "There is no income account defined for this product: \"%s\" (id:%d)" +msgid "No income account is defined for this product: \"%s\" (id:%d)." msgstr "" #. module: account #: constraint:account.move.line:0 -msgid "You can not create journal items on closed account." +msgid "You cannot create journal items on closed account." msgstr "" #. module: account @@ -9305,7 +9305,7 @@ msgstr "" #. module: account #: constraint:account.account.template:0 -msgid "Error ! You can not create recursive account templates." +msgid "Error ! You cannot create recursive account templates." msgstr "" #. module: account @@ -9327,7 +9327,7 @@ msgstr "" #. module: account #: code:addons/account/account_move_line.py:832 #, python-format -msgid "Entry is already reconciled" +msgid "Entry is already reconciled!" msgstr "" #. module: account @@ -9352,7 +9352,7 @@ msgstr "" #. module: account #: help:account.account,type:0 -msgid "The 'Internal Type' is used for features available on different types of accounts: view can not have journal items, consolidation are accounts that can have children accounts for multi-company consolidations, payable/receivable are for partners accounts (for debit/credit computations), closed for depreciated accounts." +msgid "The 'Internal Type' is used for features available on different types of accounts: view cannot have journal items, consolidation are accounts that can have children accounts for multi-company consolidations, payable/receivable are for partners accounts (for debit/credit computations), closed for depreciated accounts." msgstr "" #. module: account @@ -9774,7 +9774,7 @@ msgstr "" #. module: account #: code:addons/account/wizard/account_report_aged_partner_balance.py:56 #, python-format -msgid "You must enter a period length that cannot be 0 or below !" +msgid "You must enter a period length greater than 0 !" msgstr "" #. module: account diff --git a/addons/account/installer.py b/addons/account/installer.py index 5a2b0b346c4..3b3c68de324 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..3711de09b2a 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -89,7 +89,7 @@ class common_report_header(object): return '' def _get_sortby(self, data): - raise (_('Error'), _('Not implemented')) + raise (_('Error!'), _('Not implemented!')) def _get_filter(self, data): if data.get('form', False) and data['form'].get('filter', False): diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index 5aeefefe8ce..8b09dbe3a20 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(_('UserError!'), _('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..4a49f4ded0b 100644 --- a/addons/account/wizard/account_change_currency.py +++ b/addons/account/wizard/account_change_currency.py @@ -35,7 +35,7 @@ class account_change_currency(osv.osv_memory): context = {} if context.get('active_id',False): if obj_inv.browse(cr, uid, context['active_id']).state != 'draft': - raise osv.except_osv(_('Error'), _('You can only change currency for Draft Invoice !')) + raise osv.except_osv(_('Error!'), _('You can only change currency for Draft Invoice !')) pass def change_currency(self, cr, uid, ids, context=None): @@ -56,18 +56,18 @@ class account_change_currency(osv.osv_memory): if invoice.company_id.currency_id.id == invoice.currency_id.id: new_price = line.price_unit * rate if new_price <= 0: - raise osv.except_osv(_('Error'), _('New currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('New currency is not configured properly !')) if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id == new_currency: old_rate = invoice.currency_id.rate if old_rate <= 0: - raise osv.except_osv(_('Error'), _('Current currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('Current currency is not configured properly !')) new_price = line.price_unit / old_rate if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id != new_currency: old_rate = invoice.currency_id.rate if old_rate <= 0: - raise osv.except_osv(_('Error'), _('Current currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('Current currency is not configured properly !')) new_price = (line.price_unit / old_rate ) * rate obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price}) obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context) diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index 93746e5d964..85b36b5e778 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -59,7 +59,7 @@ class account_fiscalyear_close(osv.osv_memory): #check that the reconcilation concern journal entries from only one company cr.execute('select distinct(company_id) from account_move_line where id in %s',(tuple(ids),)) if len(cr.fetchall()) > 1: - raise osv.except_osv(_('Warning !'), _('The entries to reconcile should belong to the same company')) + raise osv.except_osv(_('Warning !'), _('The entries to reconcile should belong to the same company.')) r_id = self.pool.get('account.move.reconcile').create(cr, uid, {'type': 'auto'}) cr.execute('update account_move_line set reconcile_id = %s where id in %s',(r_id, tuple(ids),)) return r_id @@ -85,7 +85,7 @@ class account_fiscalyear_close(osv.osv_memory): fy2_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall())) if not fy_period_set or not fy2_period_set: - raise osv.except_osv(_('UserError'), _('The periods to generate opening entries were not found')) + raise osv.except_osv(_('UserError!'), _('The periods to generate opening entries were not found.')) period = obj_acc_period.browse(cr, uid, data[0].period_id.id, context=context) new_fyear = obj_acc_fiscalyear.browse(cr, uid, data[0].fy2_id.id, context=context) @@ -96,11 +96,11 @@ class account_fiscalyear_close(osv.osv_memory): company_id = new_journal.company_id.id if not new_journal.default_credit_account_id or not new_journal.default_debit_account_id: - raise osv.except_osv(_('UserError'), - _('The journal must have default credit and debit account')) + raise osv.except_osv(_('UserError!'), + _('The journal must have default credit and debit account.')) if (not new_journal.centralisation) or new_journal.entry_posted: - raise osv.except_osv(_('UserError'), - _('The journal must have centralised counterpart without the Skipping draft state option checked!')) + raise osv.except_osv(_('UserError!'), + _('The journal must have centralized counterpart without the Skipping draft state option checked!')) #delete existing move and move lines if any move_ids = obj_acc_move.search(cr, uid, [ diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 98c32eda7ee..b593864aef4 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 !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice.') % (mode)) if form.period.id: period = form.period.id else: @@ -144,7 +144,7 @@ class account_invoice_refund(osv.osv_memory): if not period: raise osv.except_osv(_('Data Insufficient !'), \ - _('No Period found on Invoice!')) + _('No Period is found on Invoice!')) refund_id = inv_obj.refund(cr, uid, [inv.id], date, period, description, journal_id) refund = inv_obj.browse(cr, uid, refund_id[0], context=context) diff --git a/addons/account/wizard/account_invoice_state.py b/addons/account/wizard/account_invoice_state.py index 7adcb908a34..78ebe5de5fa 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 4a47775c80b..d7c692e0619 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -158,7 +158,7 @@ class account_move_journal(osv.osv_memory): state = period.state if state == 'done': - raise osv.except_osv(_('UserError'), _('This period is already closed !')) + raise osv.except_osv(_('UserError!'), _('This period is already closed !')) company = period.company_id.id res = { diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py index d48a561473e..a494b32ad5f 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 !'), _('Please define End of year journal for the fiscal year.')) ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)]) if ids_move: diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py index c54ce3cb18e..3fa83dfce35 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 greater than 0 !')) + raise osv.except_osv(_('UserError!'), _('You must enter a period length greater than 0 !')) if not data['form']['date_from']: - raise osv.except_osv(_('UserError'), _('Enter a Start date !')) + raise osv.except_osv(_('UserError!'), _('Enter a Start date !')) start = datetime.strptime(data['form']['date_from'], "%Y-%m-%d") diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index fa3c195cfb7..a706d626e95 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_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py index 818442a6b3b..5164c658259 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'} From 8d606c994dc7d86ddbf5d5d5177e9354b8b3d8bd Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 14:55:48 +0530 Subject: [PATCH 40/71] [IMP] Improved warning messages for mrp module bzr revid: pso@tinyerp.com-20120725092548-x6oebojzhcdf1vce --- addons/mrp/i18n/mrp.pot | 8 ++++---- addons/mrp/mrp.py | 6 +++--- addons/mrp/wizard/change_production_qty.py | 4 ++-- addons/mrp/wizard/mrp_product_produce.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/mrp/i18n/mrp.pot b/addons/mrp/i18n/mrp.pot index 0708ae70feb..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 "Cannot 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 "Cannot 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 @@ -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 53444b1464b..28345ae65fc 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -520,7 +520,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): @@ -620,7 +620,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'), _("Cannot 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] @@ -643,7 +643,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( - _('Cannot 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]) diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py index 36f31dceae8..569c7db7415 100644 --- a/addons/mrp/wizard/change_production_qty.py +++ b/addons/mrp/wizard/change_production_qty.py @@ -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'), _("Cannot 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'), _("Cannot 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) From a028157690124f640c6ae53431faddc853d4b73e Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 15:14:40 +0530 Subject: [PATCH 41/71] [IMP] Improved warning messages for purchase module bzr revid: pso@tinyerp.com-20120725094440-jkyoxe5agavhafyw --- addons/purchase/i18n/purchase.pot | 20 ++++++++++---------- addons/purchase/purchase.py | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index 306c9501424..67ab862d434 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -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,9 +441,9 @@ 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." +msgid "First cancel all receptions related to this purchase order." msgstr "" #. module: purchase @@ -670,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 @@ -735,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 @@ -1172,9 +1172,9 @@ 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." +msgid "Unable to cancel this purchase order!" msgstr "" #. module: purchase diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 9b686abd0a6..dc436e9246c 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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) @@ -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,7 +923,7 @@ class purchase_order_line(osv.osv): if supplierinfo_ids: supplierinfo = product_supplierinfo.browse(cr, uid, supplierinfo_ids[0], context=context) 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)} From 78c6d6e5c633c8b3280c18e83598366ed960f375 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Wed, 25 Jul 2012 15:42:29 +0530 Subject: [PATCH 42/71] [IMP] Improved warning messages for purchase module bzr revid: pso@tinyerp.com-20120725101229-p6pohqemj1tdenb3 --- addons/purchase/i18n/purchase.pot | 4 ++-- addons/purchase/purchase.py | 4 ++-- addons/purchase/wizard/purchase_line_invoice.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index 67ab862d434..b270870c33f 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -640,7 +640,7 @@ msgstr "" #. module: purchase #: code:addons/purchase/purchase.py:349 #, python-format -msgid "Define purchase journal for this company: \"%s\" (id:%d)" +msgid "Define purchase journal for this company: \"%s\" (id:%d)." msgstr "" #. module: purchase @@ -1744,7 +1744,7 @@ msgstr "" #: code:addons/purchase/purchase.py:359 #: code:addons/purchase/wizard/purchase_line_invoice.py:112 #, python-format -msgid "Define expense account for this company: \"%s\" (id:%d)" +msgid "Define expense account for this company: \"%s\" (id:%d)." msgstr "" #. module: purchase diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index dc436e9246c..70ee6778e65 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -428,7 +428,7 @@ class purchase_order(osv.osv): 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 !'), - _('Define purchase journal for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id)) + _('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 !'), _('Define expense account for this company: "%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 diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py index a8b99c4b207..be0dc97ce45 100644 --- a/addons/purchase/wizard/purchase_line_invoice.py +++ b/addons/purchase/wizard/purchase_line_invoice.py @@ -107,7 +107,7 @@ class purchase_line_invoice(osv.osv_memory): a = line.product_id.categ_id.property_account_expense_categ.id if not a: raise osv.except_osv(_('Error !'), - _('Define expense account for this product: "%s" (id:%d)') % \ + _('Define expense account for this product: "%s" (id:%d).') % \ (line.product_id.name, line.product_id.id,)) else: a = property_obj.get(cr, uid, From c7b3b8665d5bdf291c979e5653fc2bac4751fe36 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 15:44:28 +0530 Subject: [PATCH 43/71] [IMP] Improved warning messages for stock module bzr revid: pso@tinyerp.com-20120725101428-musq8jyoxpon55pm --- addons/stock/i18n/stock.pot | 52 +++++++++---------- addons/stock/stock.py | 20 +++---- .../wizard/stock_change_standard_price.py | 2 +- .../wizard/stock_inventory_line_split.py | 2 +- addons/stock/wizard/stock_inventory_merge.py | 4 +- .../stock/wizard/stock_invoice_onshipping.py | 6 +-- addons/stock/wizard/stock_move.py | 2 +- addons/stock/wizard/stock_partial_move.py | 2 +- addons/stock/wizard/stock_partial_picking.py | 8 +-- addons/stock/wizard/stock_return_picking.py | 2 +- addons/stock/wizard/stock_splitinto.py | 2 +- 11 files changed, 51 insertions(+), 51 deletions(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 833c9b8b923..0b00861e3fa 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 @@ -533,8 +533,8 @@ msgstr "" #: code:addons/stock/stock.py:2125 #, python-format msgid "" -"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 @@ -675,8 +675,8 @@ msgstr "" #: code:addons/stock/stock.py:2131 #, python-format msgid "" -"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 @@ -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 @@ -1755,7 +1755,7 @@ msgstr "" #. module: stock #: code:addons/stock/stock.py:513 #, python-format -msgid "You cannot 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 @@ -1906,8 +1906,8 @@ msgstr "" #: code:addons/stock/stock.py:2122 #, python-format msgid "" -"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 @@ -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 @@ -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 @@ -3623,7 +3623,7 @@ msgstr "" #. module: stock #: code:addons/stock/product.py:100 code:addons/stock/stock.py:2128 #, python-format -msgid "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 @@ -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/stock.py b/addons/stock/stock.py index 3527a13d10c..7bd4703f2f5 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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() @@ -1661,12 +1661,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): @@ -1747,8 +1747,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): @@ -2361,7 +2361,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(_('UserError!'), _('You can only delete draft moves.')) return super(stock_move, self).unlink( cr, uid, ids, context=ctx) @@ -2565,7 +2565,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) @@ -2773,7 +2773,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(_('UserError!'), _('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) 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_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 544089ec46a..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 05dde6a1b04..93492034157 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -149,7 +149,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') @@ -164,14 +164,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), @@ -182,7 +182,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 8e37291a110..7d3c0e043bb 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -96,7 +96,7 @@ 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: 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) From c8b2503d05bacb43776d2e691b38d9dd6eb75be7 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Wed, 25 Jul 2012 16:00:41 +0530 Subject: [PATCH 44/71] [IMP] Improved warning messages for stock module bzr revid: pso@tinyerp.com-20120725103041-2ndjekods10xmhg8 --- addons/stock/i18n/stock.pot | 6 +++--- addons/stock/product.py | 16 ++++++++-------- addons/stock/stock.py | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 0b00861e3fa..6e75333fc92 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -792,7 +792,7 @@ msgstr "" #. module: stock #: code:addons/stock/product.py:75 #, python-format -msgid "Specify valuation Account 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 "" -"Define stock output account for this product: \"%s\" (id: %d)" +"Please define stock output account for this product: \"%s\" (id: %d)." msgstr "" #. module: stock @@ -2548,7 +2548,7 @@ msgstr "" #: code:addons/stock/product.py:121 #, python-format msgid "" -"Define stock input account for this product: \"%s\" (id: %d)" +"Please define stock input account for this product: \"%s\" (id: %d)." msgstr "" #. module: stock diff --git a/addons/stock/product.py b/addons/stock/product.py index a89754e2d70..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!'), _('Specify valuation Account 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: @@ -110,7 +110,7 @@ class product_product(osv.osv): 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!'), _('Specify company 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!'), - _('Define journal '\ - '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!'), - _('Define stock input account ' \ - '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!'), - _('Define stock output account ' \ - '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/stock.py b/addons/stock/stock.py index 7bd4703f2f5..51309f6dee2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2172,16 +2172,16 @@ class stock_move(osv.osv): 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!'), _('Define stock input account 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!'), _('Define stock output account 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!'), _('Define journal 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!'), _('Define inventory valuation account 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 From d3f30baa8169bec1db40bb2e582931b623acb142 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 16:03:34 +0530 Subject: [PATCH 45/71] [IMP] Improved warning messages for document module bzr revid: pso@tinyerp.com-20120725103334-rx24b2aojluvxuap --- addons/document/content_index.py | 16 ++--- addons/document/document.py | 2 +- addons/document/document_directory.py | 4 +- addons/document/document_storage.py | 34 +++++----- addons/document/i18n/document.pot | 2 +- addons/document/nodes.py | 36 +++++----- addons/document/std_index.py | 2 +- .../document_ftp/ftpserver/abstracted_fs.py | 34 +++++----- addons/document_ftp/ftpserver/ftpserver.py | 66 +++++++++---------- 9 files changed, 98 insertions(+), 98 deletions(-) diff --git a/addons/document/content_index.py b/addons/document/content_index.py index 978e0b41fe1..61b418e097c 100644 --- a/addons/document/content_index.py +++ b/addons/document/content_index.py @@ -96,10 +96,10 @@ class indexer(object): 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__) @@ -132,7 +132,7 @@ 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 support a mimetype or extension.") @@ -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 5126fde2808..a8994992717 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -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..2e68916e7ab 100644 --- a/addons/document/document_directory.py +++ b/addons/document/document_directory.py @@ -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 = [] @@ -193,7 +193,7 @@ 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 diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py index 4b650f0d72f..aa9ad8ddfa1 100644 --- a/addons/document/document_storage.py +++ b/addons/document/document_storage.py @@ -188,7 +188,7 @@ class nodefd_db(StringIO, nodes.node_descriptor): elif mode == 'a': StringIO.__init__(self, None) else: - _logger.error("Incorrect mode %s specified", mode) + _logger.error("Incorrect mode %s is specified.", mode) raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode @@ -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() @@ -268,7 +268,7 @@ class nodefd_db64(StringIO, nodes.node_descriptor): elif mode == 'a': StringIO.__init__(self, None) else: - _logger.error("Incorrect mode %s specified", mode) + _logger.error("Incorrect mode %s is specified.", mode) raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode @@ -420,7 +420,7 @@ 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 @@ -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', @@ -521,7 +521,7 @@ 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 file(s).') @@ -546,7 +546,7 @@ class document_storage(osv.osv): if boo.readonly: raise IOError(errno.EPERM, "Readonly medium!") - _logger.debug( "Store data for ir.attachment #%d" % ira.id) + _logger.debug( "Store data for ir.attachment #%d." % ira.id) store_fname = None fname = None if boo.type == 'filestore': @@ -559,7 +559,7 @@ class document_storage(osv.osv): fp.write(data) 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. @@ -588,12 +588,12 @@ class document_storage(osv.osv): fp.write(data) 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("Cannot save data:", exc_info=True) + _logger.warning("Cannot save data.", exc_info=True) raise except_orm(_('Error!'), str(e)) elif boo.type == 'virtual': @@ -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("Cannot 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)) @@ -667,7 +667,7 @@ class document_storage(osv.osv): try: os.unlink(fname) except Exception: - _logger.warning("Cannot 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("Unlink unknown key %s." % ktype) @@ -684,10 +684,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!") if sbro.type in ('filestore', 'db', 'db64'): # nothing to do for a rename, allow to change the db field @@ -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 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 8b19fab9148..7843ffd8314 100644 --- a/addons/document/nodes.py +++ b/addons/document/nodes.py @@ -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 @@ -640,7 +640,7 @@ class node_dir(node_database): 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 permited.') return res def create_child_collection(self, cr, objname): @@ -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 permited.') #objname = uri2[-1] val = { @@ -724,7 +724,7 @@ 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) + _logger.debug('Cannot move dir %r from %r to %r.', self, self.parent, ndir_node) raise NotImplementedError('Cannot move dir to another dir.') ret = {} @@ -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)) @@ -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: @@ -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 @@ -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 permited.') val = { @@ -1213,7 +1213,7 @@ 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.") @@ -1314,10 +1314,10 @@ class node_file(node_class): 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 @@ -1327,8 +1327,8 @@ class node_file(node_class): 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, \ @@ -1416,7 +1416,7 @@ 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.") @@ -1473,7 +1473,7 @@ class nodefd_content(StringIO, node_descriptor): elif mode == 'a': StringIO.__init__(self, None) else: - _logger.error("Incorrect mode %s specified", mode) + _logger.error("Incorrect mode %s is specified.", mode) raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode @@ -1499,7 +1499,7 @@ 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() @@ -1527,7 +1527,7 @@ class nodefd_static(StringIO, node_descriptor): elif mode == 'a': StringIO.__init__(self, None) else: - _logger.error("Incorrect mode %s specified", mode) + _logger.error("Incorrect mode %s is specified.", mode) raise IOError(errno.EINVAL, "Invalid file mode!") self.mode = mode @@ -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 9105278217d..d5bcd04e6eb 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,33 +143,33 @@ 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: @@ -211,7 +211,7 @@ 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.') self.cwd = '/'+datacr[1].context.dbname + '/' @@ -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]: @@ -290,7 +290,7 @@ class abstracted_fs(object): 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 is Required!') n = get_node_context(cr, uid, {}) node = n.get_uri(cr, p_parts[1:]) return (cr, node, rem_path) @@ -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() diff --git a/addons/document_ftp/ftpserver/ftpserver.py b/addons/document_ftp/ftpserver/ftpserver.py index 397d9eb8a97..c512c4395cd 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): @@ -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() @@ -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 @@ -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: From e9f73afd66b9f5349387472197386a06cc794a18 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 16:04:49 +0530 Subject: [PATCH 46/71] [IMP] Improved warning messages for POS module bzr revid: pso@tinyerp.com-20120725103449-iyhg19xu0m8ev0sk --- addons/point_of_sale/i18n/point_of_sale.pot | 12 ++++++------ addons/point_of_sale/point_of_sale.py | 8 ++++---- addons/point_of_sale/wizard/pos_box_entries.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot index 0246ca65227..b0f707c5ba6 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 @@ -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 321d57b6973..7a58f4983cb 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -674,9 +674,9 @@ 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,) + 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) @@ -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 = { @@ -945,7 +945,7 @@ class pos_order(osv.osv): 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)') \ + 'account defined 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/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py index db54249d883..647d5625448 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.py +++ b/addons/point_of_sale/wizard/pos_box_entries.py @@ -120,7 +120,7 @@ class pos_box_entries(osv.osv_memory): 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: From b7a5a1d928edd12092f1260caff05d7c7efbee69 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 16:19:32 +0530 Subject: [PATCH 47/71] [IMP] Improved warning messages for POS module bzr revid: pso@tinyerp.com-20120725104932-1awd9eerplzglhui --- addons/point_of_sale/i18n/point_of_sale.pot | 2 +- addons/point_of_sale/point_of_sale.py | 18 +++++++++--------- addons/point_of_sale/wizard/pos_box_entries.py | 2 +- addons/point_of_sale/wizard/pos_box_out.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot index b0f707c5ba6..8c766f112f2 100644 --- a/addons/point_of_sale/i18n/point_of_sale.pot +++ b/addons/point_of_sale/i18n/point_of_sale.pot @@ -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 diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 7a58f4983cb..9a4962ba5ea 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): @@ -404,7 +404,7 @@ class pos_session(osv.osv): 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")) + _("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'), @@ -677,7 +677,7 @@ class pos_order(osv.osv): 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) + 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, @@ -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/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py index 647d5625448..d68e19dd736 100644 --- a/addons/point_of_sale/wizard/pos_box_entries.py +++ b/addons/point_of_sale/wizard/pos_box_entries.py @@ -115,7 +115,7 @@ 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 diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py index f09ea4e6d6d..6198f65f4b6 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 From 4c4055a4e08788db6496be29279e194aae25e6ba Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 16:37:02 +0530 Subject: [PATCH 48/71] [IMP] Improved warning messages for Sale module bzr revid: pso@tinyerp.com-20120725110702-xyoyjt0i3t2nsej8 --- addons/sale/i18n/sale.pot | 16 +++++++------- addons/sale/sale.py | 22 +++++++++---------- .../sale/wizard/sale_make_invoice_advance.py | 12 +++++----- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot index 5f9dcf5e584..d6e213c3936 100644 --- a/addons/sale/i18n/sale.pot +++ b/addons/sale/i18n/sale.pot @@ -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 "Cannot cancel sale 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 @@ -1492,7 +1492,7 @@ msgstr "" #. module: sale #: code:addons/sale/sale.py:604 #, python-format -msgid "First cancelled all picking attached to this sale order." +msgid "First cancel all picking 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 "First cancelled all invoices attached to this sale 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 2d9d3dcc056..8ea9eb151b9 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -419,7 +419,7 @@ class sale_order(osv.osv): 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)) + _('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 '', @@ -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!'), - _('First cancelled all picking attached to this sale order.')) + _('Cannot cancel sales order!'), + _('First cancel all picking 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!'), - _('First cancelled all invoices attached to this sale 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) @@ -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 @@ -1193,7 +1193,7 @@ class sale_order_line(osv.osv): 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)') % \ + _('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, @@ -1210,7 +1210,7 @@ class sale_order_line(osv.osv): 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 Fiscal Position defined or income category account defined for Product Categories default Properties.')) + _('Please define Fiscal Position or income category account for Product Categories default Properties.')) return { 'name': line.name, 'origin': line.order_id.name, @@ -1253,7 +1253,7 @@ class sale_order_line(osv.osv): for move_line in line.move_ids: if move_line.state != 'cancel': raise osv.except_osv( - _('Cannot cancel sale 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'}) @@ -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" diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index f3d9bd65a91..7fe45530017 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -96,19 +96,19 @@ class sale_advance_payment_inv(osv.osv_memory): account_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, account_id) if not account_id: - raise osv.except_osv(_('Configuration Error !'), - _('There is no income account defined as global property.')) + raise osv.except_osv(_('Configuration Error!'), + _('Please define income account 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!'), + _('Please define income account ' \ + 'for this product: "%s" (id:%d).') % \ (sale_adv_obj.product_id.name, sale_adv_obj.product_id.id,)) final_amount = 0 if sale_adv_obj.amount <= 0.00: - raise osv.except_osv(_('Data Insufficient !'), + raise osv.except_osv(_('Data Insufficient!'), _('Please check the Advance Amount, it should not be 0 or less!')) if sale_adv_obj.advance_payment_method == 'percentage': final_amount = sale.amount_total * sale_adv_obj.amount / 100 From c59e7ab9d0fe03031bd2bd0178a43ccd5fc81ca7 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:09:00 +0530 Subject: [PATCH 49/71] [IMP] Improved warning messages for account* modules bzr revid: pso@tinyerp.com-20120725113900-sx79bzkhh9812hib --- .../account_analytic_plans.py | 4 ++-- .../i18n/account_analytic_plans.pot | 14 +++++++------- .../wizard/account_crossovered_analytic.py | 2 +- .../wizard/analytic_plan_create_model.py | 4 ++-- .../account_bank_statement.py | 2 +- .../i18n/account_bank_statement_extensions.pot | 2 +- addons/account_payment/account_move_line.py | 2 +- addons/account_payment/account_payment.py | 4 ++-- addons/account_payment/i18n/account_payment.pot | 2 +- addons/account_voucher/account_voucher.py | 6 +++--- addons/account_voucher/i18n/account_voucher.pot | 6 +++--- addons/anonymization/anonymization.py | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index c0f7e062b21..f701b737d7b 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 same name and code.')) + raise osv.except_osv(_('Error!'), _('A model having same name and code.')) 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(_('Value 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) diff --git a/addons/account_analytic_plans/i18n/account_analytic_plans.pot b/addons/account_analytic_plans/i18n/account_analytic_plans.pot index 440d6907117..b36f4db2087 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 @@ -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 @@ -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 @@ -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 e8e7ef90668..0a53b8482cc 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 2f3aa088ee3..5a6eedb6bda 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!'), _('Please define analytic plan.')) 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) diff --git a/addons/account_bank_statement_extensions/account_bank_statement.py b/addons/account_bank_statement_extensions/account_bank_statement.py index c336c143d64..1addbd63019 100644 --- a/addons/account_bank_statement_extensions/account_bank_statement.py +++ b/addons/account_bank_statement_extensions/account_bank_statement.py @@ -127,7 +127,7 @@ 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 ! \ + 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) 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 ece0af13a1d..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 @@ -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_payment/account_move_line.py b/addons/account_payment/account_move_line.py index 5e7a9930b52..0c3e3ba30b5 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 !'), _('No partner is defined on 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 c6554465f04..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 c3af52f7dd0..36e2064060b 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -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'),_("First configure the 'Income Currency Rate' on the company,after that create accounting entry for currency rate difference.")) + raise osv.except_osv(_('Warning!'),_("First configure the 'Income Currency Rate' on the company,after that 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'),_("First configure the 'Expense Currency Rate' on the company,after that create accounting entry for currency rate difference.")) + raise osv.except_osv(_('Warning!'),_("First configure the 'Expense Currency Rate' on the company,after that 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 d3fc5a54831..f713571cb4b 100644 --- a/addons/account_voucher/i18n/account_voucher.pot +++ b/addons/account_voucher/i18n/account_voucher.pot @@ -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 diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 25e770394c8..47e168a12b8 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -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) From 3e34fcc23ef3fd9ab14f0fad46b73c8de053438b Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:25:11 +0530 Subject: [PATCH 50/71] [IMP] Improved warning messages for base* modules bzr revid: pso@tinyerp.com-20120725115511-zqdo0jgknla6n6f8 --- addons/base_action_rule/base_action_rule.py | 4 ++-- addons/base_action_rule/i18n/base_action_rule.pot | 4 ++-- addons/base_calendar/base_calendar.py | 2 +- addons/base_calendar/i18n/base_calendar.pot | 2 +- .../wizard/base_calendar_invite_attendee.py | 2 +- addons/base_crypt/crypt.py | 4 ++-- addons/base_crypt/i18n/base_crypt.pot | 2 +- .../openerp_sxw2rml/openerp_sxw2rml.py | 2 +- .../bin/script/AddAttachment.py | 14 +++++++------- .../openerp_report_designer/bin/script/Change.py | 2 +- .../bin/script/ExportToRML.py | 2 +- .../bin/script/Expression.py | 2 +- .../openerp_report_designer/bin/script/Fields.py | 2 +- .../bin/script/ModifyExistingReport.py | 10 +++++----- .../openerp_report_designer/bin/script/Repeatln.py | 2 +- .../bin/script/SendToServer.py | 6 +++--- .../bin/script/ServerParameter.py | 12 ++++++------ .../bin/script/Translation.py | 4 ++-- .../openerp_report_designer/bin/script/modify.py | 2 +- addons/base_status/base_stage.py | 2 +- 20 files changed, 41 insertions(+), 41 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 9b3d55162ab..e8a8d5afa3a 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -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 is 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 1b8ed238a6a..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 66e2925453d..b8f93bebb85 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1408,7 +1408,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), 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) diff --git a/addons/base_calendar/i18n/base_calendar.pot b/addons/base_calendar/i18n/base_calendar.pot index 257970aaf1d..f727d429e95 100644 --- a/addons/base_calendar/i18n/base_calendar.pot +++ b/addons/base_calendar/i18n/base_calendar.pot @@ -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 diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index d5ab6009fc3..46f0004dd4a 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -94,7 +94,7 @@ send an Email to Invited Person') 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 = { diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py index d675d98b338..a990e68c5b0 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!'), _("Please specify the password !")) obj = pooler.get_pool(cr.dbname).get('res.users') if not hasattr(obj, "_salt_cache"): @@ -182,7 +182,7 @@ class users(osv.osv): return self._login(cr, db, login, password) except Exception: _logger.exception('Cannot authenticate!') - return Exception('Access Denied') + return Exception('Access is denied!') finally: if cr is not None: cr.close() 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_report_designer/openerp_sxw2rml/openerp_sxw2rml.py b/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py index 4819007f1d0..7dd94f9856b 100644 --- a/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py +++ b/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py @@ -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..e6de5185358 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 @@ -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 is 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("Please 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("Please select 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( "Please select resource type.", "", "Selection ERROR!" ) return if self.win.getListBoxSelectedItem("lstResource") == "" or self.win.getListBoxSelectedItem("lstmodel") == "": - ErrorDialog("Please select Model and Resource","","Selection ERROR") + ErrorDialog("Please 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..d05b3e61024 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 @@ -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 92044f78fe1..cfa46e9d5a2 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..8102417c857 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 @@ -93,7 +93,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 +167,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("Report has not been 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) @@ -197,11 +197,11 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor): else : pass if temp: - ErrorDialog("Report","Report has been Delete:\n "+name,"Message") + 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)) else: - ErrorDialog("Report","Report has not Delete:\n"+name," Message") + ErrorDialog("Report","Report has not Delete:\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..2566b3b1551 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 @@ -93,7 +93,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,7 +172,7 @@ 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") + ErrorDialog(" Report Name is already 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)) self.win.endExecute() except Exception,e: @@ -205,7 +205,7 @@ 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") + 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') self.win.endExecute() 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..2965c6d4099 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 @@ -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 is found !" + self.lstDatabase.addItem("No Database is 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 Refuse...","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 is not found.',LOG_WARNING, ':base_report_designer not install in database %s.' % (sDatabase)) #self.win.endExecute() else: desktop=getDesktop() @@ -153,7 +153,7 @@ 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") + 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)) self.win.endExecute() 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 73146f1b68a..73a6d2238c4 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 @@ -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 the Language field.") 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/modify.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py index fc3d6672b79..b82d15a9014 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 @@ -101,7 +101,7 @@ class modify(unohelper.Base, XJobExecutor ): else: ErrorDialog( "Please place your cursor at begaining of field \n" - "which you want to modify","" + "which you want to modify.","" ) else: diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py index e539df2ecea..ffb355dcc29 100644 --- a/addons/base_status/base_stage.py +++ b/addons/base_status/base_stage.py @@ -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 are already at the top level of your sales-team category.\n That's why you cannot escalate.")) + raise osv.except_osv(_('Error !'), _("You are already at the top level of your sales-team category.\n That is why you cannot escalate.")) 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) From ded2fedc839a6c4dd8d1337d731928e6ffb7e765 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:27:43 +0530 Subject: [PATCH 51/71] [IMP] Improved warning messages for crm* modules bzr revid: pso@tinyerp.com-20120725115743-y0i71256pjeqgt7o --- addons/crm/crm_action_rule.py | 2 +- addons/crm/crm_lead.py | 2 +- addons/crm/crm_meeting.py | 2 +- addons/crm/crm_phonecall.py | 2 +- addons/crm/i18n/crm.pot | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index daa6534ecea..56b5393c535 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 006daf043fe..af1c811b4e5 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -784,7 +784,7 @@ class crm_lead(base_stage, osv.osv): 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'; because it's not in 'Draft' state " \ + _("You cannot delete lead '%s'; because it is not in 'Draft' state. " \ "You should better cancel it, instead of deleting it.") % lead.name) return super(crm_lead, self).unlink(cr, uid, ids, context) 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 4c34fc6d953..1c331ab151d 100644 --- a/addons/crm/i18n/crm.pot +++ b/addons/crm/i18n/crm.pot @@ -802,7 +802,7 @@ msgstr "" #: code:addons/crm/crm_lead.py:832 #, python-format msgid "" -"You cannot delete lead '%s'; because it's not in 'Draft' state You " +"You cannot delete lead '%s'; because it is not in 'Draft' state. You " "should better cancel it, instead of deleting it." msgstr "" @@ -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 From 839d166da562ad16e1ece97b7db09d207debd3c3 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:34:01 +0530 Subject: [PATCH 52/71] [IMP] Improved warning messages for edi and fetchmail modules bzr revid: pso@tinyerp.com-20120725120401-cyn84znppa8t9vqf --- addons/edi/i18n/edi.pot | 2 +- addons/edi/models/edi.py | 38 ++++++++++++++--------------- addons/fetchmail/fetchmail.py | 4 +-- addons/fetchmail/i18n/fetchmail.pot | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) 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 24f09e3fe80..3f225f78ed6 100644 --- a/addons/edi/models/edi.py +++ b/addons/edi/models/edi.py @@ -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] @@ -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,12 +593,12 @@ 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 is 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 is 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) @@ -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/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 06b4819ffde..a2b550a35d6 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -200,7 +200,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() @@ -224,7 +224,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 From e03af5e54c771344d0ceee7b00707a7198c8ebf0 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:35:41 +0530 Subject: [PATCH 53/71] [IMP] Improved warning messages for caldav module bzr revid: pso@tinyerp.com-20120725120541-31kvapmzwvafuk7e --- addons/caldav/caldav_node.py | 12 ++++++------ addons/caldav/calendar.py | 6 +++--- addons/caldav/i18n/caldav.pot | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) 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 8678d617463..c8ee9553cb8 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -729,9 +729,9 @@ 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)): @@ -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): diff --git a/addons/caldav/i18n/caldav.pot b/addons/caldav/i18n/caldav.pot index 444a7e04bba..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 From 25d650e96e6d1a2d77c0112b62b78c6c84ebfeaf Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:43:54 +0530 Subject: [PATCH 54/71] [IMP] Improved warning messages for hr* modules bzr revid: pso@tinyerp.com-20120725121354-hypwxo74c43jm5gp --- addons/hr/hr.py | 2 +- addons/hr_attendance/hr_attendance.py | 4 ++-- addons/hr_attendance/i18n/hr_attendance.pot | 10 +++++----- addons/hr_attendance/wizard/hr_attendance_error.py | 2 +- .../wizard/hr_attendance_sign_in_out.py | 8 ++++---- addons/hr_expense/hr_expense.py | 2 +- addons/hr_expense/i18n/hr_expense.pot | 4 ++-- addons/hr_holidays/hr_holidays.py | 6 +++--- addons/hr_holidays/i18n/hr_holidays.pot | 4 ++-- .../wizard/hr_holidays_summary_department.py | 2 +- addons/hr_payroll/hr_payroll.py | 10 +++++----- addons/hr_payroll/i18n/hr_payroll.pot | 2 +- addons/hr_timesheet/hr_timesheet.py | 4 ++-- addons/hr_timesheet/i18n/hr_timesheet.pot | 14 +++++++------- .../wizard/hr_timesheet_print_employee.py | 2 +- .../wizard/hr_timesheet_sign_in_out.py | 4 ++-- .../i18n/hr_timesheet_invoice.pot | 10 +++++----- .../wizard/hr_timesheet_invoice_create.py | 8 ++++---- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 8 ++++---- .../hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot | 8 ++++---- .../wizard/hr_timesheet_current.py | 2 +- 21 files changed, 58 insertions(+), 58 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 02742f273fe..ad866e4955a 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -315,7 +315,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 0583d478c19..c5af93ef49c 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(_('UserError !'), _('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(_('UserError !'), _('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(_('UserError !'), _('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(_('UserError !'), _('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_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 844b1ac0de0..242794b4147 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, diff --git a/addons/hr_expense/i18n/hr_expense.pot b/addons/hr_expense/i18n/hr_expense.pot index 572515f03c7..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 diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 0074a8c20e6..25970542809 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, because it\'s not in draft state!')) + 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 diff --git a/addons/hr_holidays/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot index 56dd8fe758c..661a9f9cc60 100644 --- a/addons/hr_holidays/i18n/hr_holidays.pot +++ b/addons/hr_holidays/i18n/hr_holidays.pot @@ -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 5f4a26b2a07..beb233f55e8 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 one 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 fb7c128df8d..d80e4df88dd 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 94c204db542..3f70f4b68cb 100644 --- a/addons/hr_payroll/i18n/hr_payroll.pot +++ b/addons/hr_payroll/i18n/hr_payroll.pot @@ -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 diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 91057a2b38e..68def938191 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 !'), _('No \'Analytic Journal\' 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 cannot 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 ee1e9fbc8d6..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,7 +322,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/hr_timesheet.py:175 #, python-format -msgid "No 'Analytic Journal' defined for employee %s \n" +msgid "No 'Analytic Journal' is defined for employee %s \n" "Define an employee for the selected user and assign an 'Analytic Journal'!" msgstr "" @@ -576,7 +576,7 @@ msgstr "" #. module: hr_timesheet #: code:addons/hr_timesheet/hr_timesheet.py:177 #, python-format -msgid "No analytic account defined on the project.\n" +msgid "No analytic account is defined on the project.\n" "Please set one or we cannot automatically fill the timesheet." msgstr "" @@ -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 7ef99aa88e6..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 d3b0d27e351..30708c43e97 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(_('UserError !'), _('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(_('UserError !'), _('Please define employee for your user!')) return False def check_state(self, cr, uid, ids, context=None): diff --git a/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot b/addons/hr_timesheet_invoice/i18n/hr_timesheet_invoice.pot index 21df6be61e4..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 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 8678480763c..7e0df07bdb9 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,)) @@ -99,7 +99,7 @@ class account_analytic_line(osv.osv): for product_id, factor_id, qty, uom in cr.fetchall(): product = product_obj.browse(cr, uid, product_id, context2) if not product: - raise osv.except_osv(_('Error'), _('At least one line has no product!')) + raise osv.except_osv(_('Error !'), _('At least one line has no product!')) factor_name = '' factor = invoice_factor_obj.browse(cr, uid, factor_id, context2) if not data.get('product', False): @@ -123,7 +123,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, diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 26254271ca7..6a0c24b553e 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -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() @@ -616,7 +616,7 @@ class hr_attendance(osv.osv): 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 ' \ + raise osv.except_osv(_('UserError !'), _('You cannot enter an attendance ' \ 'date outside the current timesheet dates!')) return res @@ -636,7 +636,7 @@ 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 ' \ + raise osv.except_osv(_('UserError !'), _('You cannot enter an attendance ' \ 'date outside the current timesheet dates!')) return res diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot index 7e2f698f203..8149ce4ec92 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 @@ -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 diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py index 4d19e7657d4..ec0c70d1349 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: From c7060ffa18b30adadf5d637215a13bc584de65be Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 17:46:05 +0530 Subject: [PATCH 55/71] [IMP] Improved warning messages for project* modules bzr revid: pso@tinyerp.com-20120725121605-rvid4ebeomtr0zzo --- addons/project_timesheet/i18n/project_timesheet.pot | 8 ++++---- addons/project_timesheet/project_timesheet.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/project_timesheet/i18n/project_timesheet.pot b/addons/project_timesheet/i18n/project_timesheet.pot index 533e58d3f19..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 "" @@ -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 39383684624..5a2ed939540 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 From 082513a80587c3732f13a89edda7c5ba4fcd8410 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Wed, 25 Jul 2012 18:19:45 +0530 Subject: [PATCH 56/71] [IMP] Improved warning messages for resource module bzr revid: pso@tinyerp.com-20120725124945-pgebt9fh69mpb82i --- addons/resource/faces/task.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 From bc68e4079cd14f100330c55c074cfb93f3538cd9 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Fri, 27 Jul 2012 12:25:57 +0530 Subject: [PATCH 57/71] [IMP] Improved warning messages bzr revid: pso@tinyerp.com-20120727065557-vvhog448zrrfuibd --- addons/account/wizard/account_invoice_refund.py | 2 +- addons/analytic/analytic.py | 4 ++-- addons/document/document_directory.py | 2 +- addons/stock_location/procurement_pull.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index b593864aef4..96eb0e6a944 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -108,7 +108,7 @@ class account_invoice_refund(osv.osv_memory): if inv.state in ['draft', 'proforma2', 'cancel']: raise osv.except_osv(_('Error !'), _('Cannot %s draft/proforma/cancel invoice.') % (mode)) if inv.reconciled and mode in ('cancel', 'modify'): - raise osv.except_osv(_('Error !'), _('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: diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index af8b1615864..6a2d8c07121 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -220,7 +220,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): @@ -321,7 +321,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/document/document_directory.py b/addons/document/document_directory.py index 2e68916e7ab..4afb5a0b121 100644 --- a/addons/document/document_directory.py +++ b/addons/document/document_directory.py @@ -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): 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, From c5427f3faa4b04df168cc0cce7ea0356a6ca7fc8 Mon Sep 17 00:00:00 2001 From: help <> Date: Tue, 31 Jul 2012 18:12:10 +0530 Subject: [PATCH 58/71] [IMP]improved exception warnings as per suggestion bzr revid: help-20120731124210-7vjw7puesjm3884p --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +- addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot | 2 +- addons/import_google/i18n/import_google.pot | 4 ++-- addons/import_google/wizard/import_google_data.py | 2 +- addons/mrp_operations/i18n/mrp_operations.pot | 2 +- addons/mrp_operations/mrp_operations.py | 2 +- addons/purchase/i18n/purchase.pot | 2 +- addons/purchase/purchase.py | 2 +- addons/sale/i18n/sale.pot | 4 ++-- addons/sale/sale.py | 6 +++--- addons/stock/i18n/stock.pot | 2 +- addons/stock/wizard/stock_partial_picking.py | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 6a0c24b553e..73a4368caaf 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -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): diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot index 8149ce4ec92..2bf91768bad 100644 --- a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot +++ b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot @@ -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/import_google/i18n/import_google.pot b/addons/import_google/i18n/import_google.pot index de5a0a257ec..175b8c1b75d 100644 --- a/addons/import_google/i18n/import_google.pot +++ b/addons/import_google/i18n/import_google.pot @@ -33,8 +33,8 @@ msgstr "" #. module: import_google #: code:addons/import_google/wizard/import_google_data.py:71 #, python-format -msgid "No Google username or password is 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 diff --git a/addons/import_google/wizard/import_google_data.py b/addons/import_google/wizard/import_google_data.py index 32ef6f82534..324f11293f5 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 is 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')] diff --git a/addons/mrp_operations/i18n/mrp_operations.pot b/addons/mrp_operations/i18n/mrp_operations.pot index 0cd82aaca0c..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 diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 2700ed2654d..8692dab5c87 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -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/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index b270870c33f..d0b77b2ea66 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -443,7 +443,7 @@ msgstr "" #. module: purchase #: code:addons/purchase/purchase.py:499 #, python-format -msgid "First cancel all receptions related to this purchase order." +msgid "You must first cancel all receptions related to this purchase order." msgstr "" #. module: purchase diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 17e2c4151bf..dbf3f89dc56 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -503,7 +503,7 @@ class purchase_order(osv.osv): if inv and inv.state not in ('cancel','draft'): raise osv.except_osv( _('Unable to cancel this purchase order.'), - _('First cancel all receptions related to 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'}) diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot index d6e213c3936..19f86364672 100644 --- a/addons/sale/i18n/sale.pot +++ b/addons/sale/i18n/sale.pot @@ -131,7 +131,7 @@ msgstr "" #: code:addons/sale/sale.py:295 #, python-format msgid "" -"In order to delete a confirmed sales order, you must cancel it before ! To " +"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 "" @@ -1492,7 +1492,7 @@ msgstr "" #. module: sale #: code:addons/sale/sale.py:604 #, python-format -msgid "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 diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 8ea9eb151b9..21f5d34ced7 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -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 sales order, you must cancel it before ! To cancel a sale order, you must first cancel related picking for delivery orders.')) + raise osv.except_osv(_('Invalid action !'), _('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.')) return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) @@ -703,7 +703,7 @@ class sale_order(osv.osv): if pick.state not in ('draft', 'cancel'): raise osv.except_osv( _('Cannot cancel sales order!'), - _('First cancel all picking attached to this 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)]) @@ -1210,7 +1210,7 @@ class sale_order_line(osv.osv): account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id) if not account_id: raise osv.except_osv(_('Error !'), - _('Please define Fiscal Position or income category account for Product Categories default Properties.')) + _('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, diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 6e75333fc92..9b46cdde703 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -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 diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 728e3d0047e..d8520002b52 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -167,7 +167,7 @@ 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) From 41d1135812915fd1ca4f97becceca730e284392b Mon Sep 17 00:00:00 2001 From: help <> Date: Tue, 31 Jul 2012 19:04:25 +0530 Subject: [PATCH 59/71] [IMP]improved exception warnings in remaining modules as per suggestion bzr revid: help-20120731133425-2zlm5sakpowuc6rk --- addons/account_analytic_plans/account_analytic_plans.py | 2 +- addons/account_analytic_plans/i18n/account_analytic_plans.pot | 2 +- addons/document/document.py | 2 +- addons/event/event.py | 2 +- addons/google_base_account/i18n/google_base_account.pot | 2 +- addons/google_base_account/wizard/google_login.py | 2 +- addons/hr_attendance/hr_attendance.py | 2 +- addons/hr_contract/hr_contract.py | 2 +- addons/hr_contract/i18n/hr_contract.pot | 2 +- addons/hr_evaluation/hr_evaluation.py | 2 +- addons/hr_evaluation/i18n/hr_evaluation.pot | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index f701b737d7b..505aaf232ed 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 same name and code.')) + raise osv.except_osv(_('Error!'), _('A model having 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: diff --git a/addons/account_analytic_plans/i18n/account_analytic_plans.pot b/addons/account_analytic_plans/i18n/account_analytic_plans.pot index b36f4db2087..75b4654850e 100644 --- a/addons/account_analytic_plans/i18n/account_analytic_plans.pot +++ b/addons/account_analytic_plans/i18n/account_analytic_plans.pot @@ -183,7 +183,7 @@ msgstr "" #. module: account_analytic_plans #: code:addons/account_analytic_plans/account_analytic_plans.py:221 #, python-format -msgid "A model having same name and code." +msgid "A model having this name and code already exists !" msgstr "" #. module: account_analytic_plans diff --git a/addons/document/document.py b/addons/document/document.py index a8994992717..27abb92c80c 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -61,7 +61,7 @@ class document_file(osv.osv): return False if ids is not None: - raise NotImplementedError("Ids is just there by convention,please donot use it yet.") + raise NotImplementedError("Ids is 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') " \ diff --git a/addons/event/event.py b/addons/event/event.py index e8c6eb31e3e..114432493a5 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -365,7 +365,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/google_base_account/i18n/google_base_account.pot b/addons/google_base_account/i18n/google_base_account.pot index 5a56073a7e7..41693f54adf 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..756657f001f 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/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index ab370f63397..16f3530c1e9 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -137,7 +137,7 @@ class hr_employee(osv.osv): warning_sign = "Sign Out" for emp in self.read(cr, uid, ids, ['id'], context=context): if not self._action_check(cr, uid, emp['id'], dt, context): - raise osv.except_osv(_('Warning !'), _('You try to %s with a date before to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,)) + raise osv.except_osv(_('Warning !'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,)) res = {'action': type, 'employee_id': emp['id']} if dt: diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index 07742ed5fe4..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 016fef341ae..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 d3e410bab1c..decdf56eb47 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): diff --git a/addons/hr_evaluation/i18n/hr_evaluation.pot b/addons/hr_evaluation/i18n/hr_evaluation.pot index c6c8e63dd72..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 "" From 206252d6067c66fa11693bc2001a68e23f560bd8 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Fri, 3 Aug 2012 19:26:36 +0200 Subject: [PATCH 60/71] [IMP] fix a first batch of typos and spelling mistakes (listed by UCO on the 2012-08-01) bzr revid: abo@openerp.com-20120803172636-s23g6yturpb5chd6 --- addons/account/account.py | 22 +++++++++---------- addons/delivery/delivery.py | 2 +- .../marketing_campaign/marketing_campaign.py | 2 +- .../wizard/pos_open_statement.py | 10 ++++----- addons/product/product.py | 10 ++++----- addons/project/project.py | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index b2a4589b9cb..e018546f897 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -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)')), @@ -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 @@ -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 hasnot 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/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/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 30fb1ecf358..e268f3db5dd 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -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/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/product/product.py b/addons/product/product.py index 09f2f6f877a..7911929f898 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -167,7 +167,7 @@ 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): @@ -231,7 +231,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): @@ -330,7 +330,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 = { @@ -461,8 +461,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 dda2b86c8bb..7bcfa5c1c92 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -155,7 +155,7 @@ class project(osv.osv): def unlink(self, cr, uid, ids, *args, **kwargs): 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. I suggest you to desactivate it.')) + raise osv.except_osv(_('Operation Not Permitted !'), _('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.')) return super(project, self).unlink(cr, uid, ids, *args, **kwargs) def _task_count(self, cr, uid, ids, field_name, arg, context=None): @@ -1227,7 +1227,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: From 3bbe3ddbd5d8bab3938351ba75aaf06c86c18a02 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Mon, 6 Aug 2012 16:12:04 +0530 Subject: [PATCH 61/71] Improvements bzr revid: pso@tinyerp.com-20120806104204-yd7mqqttglgaer8h --- addons/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index 7bcfa5c1c92..13810c2bf87 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -155,7 +155,7 @@ class project(osv.osv): def unlink(self, cr, uid, ids, *args, **kwargs): 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 can either delete all the project\'s tasks and then delete the project or simply deactivate the project.')) + raise osv.except_osv(_('Operation Not Permitted !'), _('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.')) return super(project, self).unlink(cr, uid, ids, *args, **kwargs) def _task_count(self, cr, uid, ids, field_name, arg, context=None): From 48e091580429476977c2b29b501b39589528d1e4 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 6 Aug 2012 17:44:10 +0200 Subject: [PATCH 62/71] [IMP] rephrase some error and warning messages in account remove exclamation marks at the end of messages remove first person usage ('I' and 'We') remove unjustified capital letters rephrase the clumsy form 'No is defined' bzr revid: abo@openerp.com-20120806154410-kbf9aai2uzq2b0c4 --- addons/account/account.py | 40 +++--- addons/account/account_analytic_line.py | 4 +- addons/account/account_cash_statement.py | 6 +- addons/account/account_invoice.py | 32 ++--- addons/account/account_move_line.py | 30 ++-- addons/account/report/common_report_header.py | 2 +- .../account/wizard/account_change_currency.py | 8 +- .../wizard/account_fiscalyear_close.py | 8 +- .../account/wizard/account_invoice_refund.py | 4 +- .../account/wizard/account_invoice_state.py | 4 +- addons/account/wizard/account_move_journal.py | 14 +- .../wizard/account_open_closed_fiscalyear.py | 2 +- .../account_report_aged_partner_balance.py | 4 +- .../account/wizard/account_report_common.py | 2 +- .../wizard/account_validate_account_move.py | 4 +- .../account_analytic_plans.py | 2 +- .../wizard/account_crossovered_analytic.py | 2 +- .../wizard/analytic_plan_create_model.py | 4 +- .../account_bank_statement.py | 10 +- addons/account_coda/account_coda.py | 130 +++++++++--------- addons/account_payment/account_move_line.py | 2 +- addons/account_voucher/account_voucher.py | 6 +- 22 files changed, 160 insertions(+), 160 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index e018546f897..14eccafbc7b 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -125,7 +125,7 @@ class account_payment_term_line(osv.osv): return True _constraints = [ - (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% .', ['value_amount']), + (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2%.', ['value_amount']), ] account_payment_term_line() @@ -409,7 +409,7 @@ class account_account(osv.osv): period_obj = self.pool.get('account.period') pids = period_obj.search(cr, uid, [('special','=',True),('company_id','=',account.company_id.id)], context=context) if not pids: - raise osv.except_osv(_('Error!'),_("No opening/closing period is defined, please create one to set the initial balance!")) + raise osv.except_osv(_('Error!'),_("There is no opening/closing period defined, please create one to set the initial balance.")) move_obj = self.pool.get('account.move.line') move_id = move_obj.search(cr, uid, [ @@ -619,9 +619,9 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): if method == 'write': - raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains some journal items.')) + raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains journal items.')) elif method == 'unlink': - raise osv.except_osv(_('Error !'), _('You cannot remove an account containing journal items.')) + raise osv.except_osv(_('Error !'), _('You cannot remove an account that contains journal items.')) #Checking whether the account is set as a property to any Partner or not value = 'account.account,' + str(ids[0]) partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context) @@ -790,7 +790,7 @@ class account_journal(osv.osv): if 'company_id' in vals and journal.company_id.id != vals['company_id']: move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)]) if move_lines: - raise osv.except_osv(_('Warning !'), _('You cannot modify the company of this journal as its related record exist in journal items.')) + raise osv.except_osv(_('Warning !'), _('This journal already contains items, therefore you cannot modify its company field.')) return super(account_journal, self).write(cr, uid, ids, vals, context=context) def create_sequence(self, cr, uid, vals, context=None): @@ -915,7 +915,7 @@ class account_fiscalyear(osv.osv): return True _constraints = [ - (_check_duration, 'Error! The start date of the fiscal year must be less than the end date.', ['date_start','date_stop']) + (_check_duration, 'Error! The start date of a fiscal year must precede its end date.', ['date_start','date_stop']) ] def create_period3(self, cr, uid, ids, context=None): @@ -966,7 +966,7 @@ class account_fiscalyear(osv.osv): ids = self.search(cr, uid, args, context=context) if not ids: if exception: - raise osv.except_osv(_('Error !'), _('No fiscal year is defined for this date !\nPlease create one from the configuration of the accounting menu.')) + raise osv.except_osv(_('Error !'), _('There is no fiscal year defined for this date.\nPlease create one from the configuration of the accounting menu.')) else: return [] return ids @@ -1033,7 +1033,7 @@ class account_period(osv.osv): _constraints = [ (_check_duration, 'Error ! The duration of the Period(s) is/are invalid. ', ['date_stop']), - (_check_year_limit, 'Invalid period ! Some periods overlap or the date period which is not in the scope of the fiscal year. ', ['date_stop']) + (_check_year_limit, 'Error ! The period is invalid. Either some periods are overlapping or the period\'s dates are not matching the scope of the fiscal year.', ['date_stop']) ] def next(self, cr, uid, period, step, context=None): @@ -1055,7 +1055,7 @@ class account_period(osv.osv): args.append(('company_id', '=', company_id)) ids = self.search(cr, uid, args, context=context) if not ids: - raise osv.except_osv(_('Error !'), _('No period is defined for this date: %s !\nPlease create one.')%dt) + raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt) return ids def action_draft(self, cr, uid, ids, *args): @@ -1080,7 +1080,7 @@ class account_period(osv.osv): if 'company_id' in vals: move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)]) if move_lines: - raise osv.except_osv(_('Warning !'), _('You cannot modify company of this period as some journal items exist.')) + raise osv.except_osv(_('Warning !'), _('This journal already contains items for this period, therefore you cannot modify its company field.')) return super(account_period, self).write(cr, uid, ids, vals, context=context) def build_ctx_periods(self, cr, uid, period_from_id, period_to_id): @@ -1095,7 +1095,7 @@ class account_period(osv.osv): if company1_id != company2_id: raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.')) if period_date_start > period_date_stop: - raise osv.except_osv(_('Error!'), _('Start period should be smaller than End period.')) + raise osv.except_osv(_('Error!'), _('Start period should precede then end period.')) #for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search). if period_from.special: return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) @@ -1134,7 +1134,7 @@ class account_journal_period(osv.osv): cr.execute('select * from account_move_line where journal_id=%s and period_id=%s limit 1', (obj.journal_id.id, obj.period_id.id)) res = cr.fetchall() if res: - raise osv.except_osv(_('Error !'), _('You cannot modify/delete a journal with entries for this period !')) + raise osv.except_osv(_('Error !'), _('You cannot modify/delete a journal with entries for this period.')) return True def write(self, cr, uid, ids, vals, context=None): @@ -1303,7 +1303,7 @@ class account_move(osv.osv): _constraints = [ (_check_centralisation, - 'You cannot create more than one move per period on centralized journal.', + 'You cannot create more than one move per period on a centralized journal.', ['journal_id']), ] @@ -1314,7 +1314,7 @@ class account_move(osv.osv): valid_moves = self.validate(cr, uid, ids, context) if not valid_moves: - raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry !\nMake sure you have configured payment terms properly !\nThe latest payment term line should be of the type "Balance" !')) + raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry.\nMake sure you have configured payment terms properly.\nThe latest payment term line should be of the "Balance" type.')) obj_sequence = self.pool.get('ir.sequence') for move in self.browse(cr, uid, valid_moves, context=context): if move.name =='/': @@ -1328,7 +1328,7 @@ class account_move(osv.osv): c = {'fiscalyear_id': move.period_id.fiscalyear_id.id} new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c) else: - raise osv.except_osv(_('Error'), _('Please define sequence on the journal !')) + raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal.')) if new_name: self.write(cr, uid, [move.id], {'name':new_name}) @@ -1358,7 +1358,7 @@ class account_move(osv.osv): def button_cancel(self, cr, uid, ids, context=None): for line in self.browse(cr, uid, ids, context=context): if not line.journal_id.update_posted: - raise osv.except_osv(_('Error !'), _('You cannot modify a posted entry of this journal !\nYou should set the journal to allow cancelling entries if you want to do that.')) + raise osv.except_osv(_('Error !'), _('You cannot modify a posted entry of this journal.\nFirst you should set the journal to allow cancelling entries.')) if ids: cr.execute('UPDATE account_move '\ 'SET state=%s '\ @@ -1446,7 +1446,7 @@ class account_move(osv.osv): for move in self.browse(cr, uid, ids, context=context): if move['state'] != 'draft': raise osv.except_osv(_('UserError!'), - _('You cannot delete a posted journal entry "%s"!') % \ + _('You cannot delete a posted journal entry "%s".') % \ move['name']) line_ids = map(lambda x: x.id, move.line_id) context['journal_id'] = move.journal_id.id @@ -1475,14 +1475,14 @@ class account_move(osv.osv): mode2 = 'debit' if not account_id: raise osv.except_osv(_('UserError'), - _('No default debit account is defined \n' \ + _('There is no default debit account defined \n' \ 'on journal "%s".') % move.journal_id.name) else: account_id = move.journal_id.default_credit_account_id.id mode2 = 'credit' if not account_id: raise osv.except_osv(_('UserError'), - _('No default credit account is defined \n' \ + _('There is no default credit account defined \n' \ 'on journal "%s".') % move.journal_id.name) # find the first line of this move with the current mode @@ -2623,7 +2623,7 @@ class account_add_tmpl_wizard(osv.osv_memory): ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]], ['code']) res = None if not ptids or not ptids[0]['code']: - raise osv.except_osv(_('Error !'), _('I cannot locate a parent code for the template account!')) + raise osv.except_osv(_('Error !'), _('There is no parent code for the template account.')) res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])]) return res and res[0] or False diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 8dc7fb8abf4..e56629644ea 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -88,7 +88,7 @@ class account_analytic_line(osv.osv): a = prod.categ_id.property_account_expense_categ.id if not a: raise osv.except_osv(_('Error !'), - _('No expense account is defined ' \ + _('There is no expense account defined ' \ 'for this product: "%s" (id:%d).') % \ (prod.name, prod.id,)) else: @@ -97,7 +97,7 @@ class account_analytic_line(osv.osv): a = prod.categ_id.property_account_income_categ.id if not a: raise osv.except_osv(_('Error !'), - _('No income account is defined ' \ + _('There is no income account defined ' \ 'for this product: "%s" (id:%d).') % \ (prod.name, prod_id,)) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index a5141cd6b3f..af0a772e239 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -260,7 +260,7 @@ class account_cash_statement(osv.osv): if journal_type == 'bank': return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context) if not self._equal_balance(cr, uid, cash_id, context): - raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on the cash register !')) + raise osv.except_osv(_('Error !'), _('The closing balance should be equal to compute balance on the cash register.')) return True def statement_close(self, cr, uid, ids, journal_type='bank', context=None): @@ -289,8 +289,8 @@ class account_cash_statement(osv.osv): for item_label, item_account in TALBES: if getattr(obj.journal_id, item_account): - raise osv.except_osv(_('Error !'), - _('No %s Account on the Journal %s.') % (item_label, obj.journal_id.name,)) + raise osv.except_osv(_('Error !'), + _('There is no %s Account on the journal %s.') % (item_label, obj.journal_id.name,)) is_profit = obj.difference < 0.0 diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 6a63f129396..79e5bc10c17 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -319,7 +319,7 @@ class account_invoice(osv.osv): res['fields'][field]['selection'] = journal_select doc = etree.XML(res['arch']) - + if context.get('type', False): for node in doc.xpath("//field[@name='partner_bank_id']"): if context['type'] == 'in_refund': @@ -327,7 +327,7 @@ class account_invoice(osv.osv): elif context['type'] == 'out_refund': node.set('domain', "[('partner_id', '=', partner_id)]") res['arch'] = etree.tostring(doc) - + if view_type == 'search': if context.get('type', 'in_invoice') in ('out_invoice', 'out_refund'): for node in doc.xpath("//group[@name='extended filter']"): @@ -364,7 +364,7 @@ class account_invoice(osv.osv): except Exception, e: if '"journal_id" viol' in e.args[0]: raise orm.except_orm(_('Configuration Error!'), - _('No Sale/Purchase Journal(s) is defined!')) + _('There is no Sale/Purchase Journal(s) defined.')) else: raise orm.except_orm(_('Unknown Error!'), str(e)) @@ -425,7 +425,7 @@ class account_invoice(osv.osv): if t['state'] in ('draft', 'cancel') and t['internal_number']== False: unlink_ids.append(t['id']) else: - raise osv.except_osv(_('Invalid action !'), _('You cannot delete an invoice which is open or paid. We suggest you to refund it instead.')) + raise osv.except_osv(_('Invalid action !'), _('You cannot delete an invoice which is open or paid. You should refund it instead.')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True @@ -577,7 +577,7 @@ class account_invoice(osv.osv): obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configuration Error !'), - _('Company of invoice line account and the company of invoice does not match.')) + _('Invoice line account\'s company and invoice\'s compnay does not match.')) else: continue if company_id and type: @@ -840,7 +840,7 @@ class account_invoice(osv.osv): raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.')) if inv.move_id: continue - + ctx = context.copy() ctx.update({'lang': inv.partner_id.lang}) if not inv.date_invoice: @@ -866,7 +866,7 @@ class account_invoice(osv.osv): total_percent += line.value_amount total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0) if (total_fixed + total_percent) > 100: - raise osv.except_osv(_('Error !'), _("Cannot create the invoice !\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. The latest line of your payment term must be of type 'balance' to avoid rounding issues.")) + raise osv.except_osv(_('Error !'), _("Cannot create the invoice.\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount. In order to avoid rounding issues, the latest line of your payment term must be of type 'balance'.")) # one move line per tax line iml += ait_obj.move_line_get(cr, uid, inv.id) @@ -979,7 +979,7 @@ class account_invoice(osv.osv): move_obj.post(cr, uid, [move_id], context=ctx) self._log_event(cr, uid, ids) return True - + def invoice_validate(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'open'}, context=context) return True @@ -1061,7 +1061,7 @@ class account_invoice(osv.osv): pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids']) for move_line in pay_ids: if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids: - raise osv.except_osv(_('Error !'), _('You cannot cancel an invoice which is partially paid! You need to unreconcile related payment entries first!')) + raise osv.except_osv(_('Error !'), _('You cannot cancel an invoice which is partially paid. You need to unreconcile related payment entries first.')) # First, set the invoices as cancelled and detach the move ids self.write(cr, uid, ids, {'state':'cancel', 'move_id':False}) @@ -1281,11 +1281,11 @@ class account_invoice(osv.osv): # Update the stored value (fields.function), so we write to trigger recompute self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) return True - + # ----------------------------------------- # OpenChatter notifications and need_action # ----------------------------------------- - + def _get_document_type(self, type): type_dict = { 'out_invoice': 'Customer invoice', @@ -1294,19 +1294,19 @@ class account_invoice(osv.osv): 'in_refund': 'Supplier Refund', } return type_dict.get(type, 'Invoice') - + def create_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id],body=_("%s created.") % (self._get_document_type(obj.type)), context=context) - + def confirm_paid_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id], body=_("%s paid.") % (self._get_document_type(obj.type)), context=context) - + def invoice_cancel_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id], body=_("%s cancelled.") % (self._get_document_type(obj.type)), context=context) - + account_invoice() class account_invoice_line(osv.osv): @@ -1475,7 +1475,7 @@ class account_invoice_line(osv.osv): if prod.uom_id.category_id.id != prod_uom.category_id.id: warning = { 'title': _('Warning!'), - 'message': _('Selected Unit of Measure is not compatible with the Unit of Measure of the product.') + 'message': _('The selected unit of measure is not compatible with the unit of measure of the product.') } return {'value': res['value'], 'warning': warning} return res diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 645dd16c541..6ce15529842 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -95,7 +95,7 @@ class account_move_line(osv.osv): if initial_bal and not context.get('periods', False) and not where_move_lines_by_date: #we didn't pass any filter in the context, and the initial balance can't be computed using only the fiscalyear otherwise entries will be summed twice #so we have to invalidate this query - raise osv.except_osv(_('Warning !'),_("You havenot supplied enough argument to compute the initial balance, please select a period and journal in the context.")) + raise osv.except_osv(_('Warning !'),_("You have not supplied enough arguments to compute the initial balance, please select a period and a journal in the context.")) if context.get('journal_ids', False): @@ -752,7 +752,7 @@ class account_move_line(osv.osv): else: currency_id = line.company_id.currency_id if line.reconcile_id: - raise osv.except_osv(_('Warning !'), _('Already Reconciled!')) + raise osv.except_osv(_('Warning !'), _('Already reconciled.')) if line.reconcile_partial_id: for line2 in line.reconcile_partial_id.line_partial_ids: if not line2.reconcile_id: @@ -823,15 +823,15 @@ class account_move_line(osv.osv): r = cr.fetchall() #TODO: move this check to a constraint in the account_move_reconcile object if not unrec_lines: - raise osv.except_osv(_('Error !'), _('Entry is already reconciled!')) + raise osv.except_osv(_('Error !'), _('Entry is already reconciled.')) account = account_obj.browse(cr, uid, account_id, context=context) if r[0][1] != None: - raise osv.except_osv(_('Error !'), _('Some entries are already reconciled !')) + raise osv.except_osv(_('Error !'), _('Some entries are already reconciled.')) if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \ (account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))): if not writeoff_acc_id: - raise osv.except_osv(_('Warning !'), _('You have to provide an account for the write off/exchange difference entry !')) + raise osv.except_osv(_('Warning !'), _('You have to provide an account for the write off/exchange difference entry.')) if writeoff > 0: debit = writeoff credit = 0.0 @@ -1092,7 +1092,7 @@ class account_move_line(osv.osv): if res[1] != 'draft': raise osv.except_osv(_('UserError!'), _('The account move (%s) for centralisation ' \ - 'has been confirmed!') % res[2]) + 'has been confirmed.') % res[2]) return res def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None): @@ -1139,9 +1139,9 @@ class account_move_line(osv.osv): if isinstance(ids, (int, long)): ids = [ids] if vals.get('account_tax_id', False): - raise osv.except_osv(_('Unable to change tax !'), _('You cannot change the tax, you should remove and recreate lines !')) + raise osv.except_osv(_('Unable to change tax!'), _('You cannot change the tax, you should remove and recreate lines.')) if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: - raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account!')) + raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account.')) if update_check: if ('account_id' in vals) or ('journal_id' in vals) or ('period_id' in vals) or ('move_id' in vals) or ('debit' in vals) or ('credit' in vals) or ('date' in vals): self._update_check(cr, uid, ids, context) @@ -1202,9 +1202,9 @@ class account_move_line(osv.osv): for line in self.browse(cr, uid, ids, context=context): err_msg = _('Move name (id): %s (%s)') % (line.move_id.name, str(line.move_id.id)) if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted): - raise osv.except_osv(_('Error !'), _('You cannot do this modification on a confirmed entry! You can just change some non legal fields or you must unconfirm the journal entry first! \n%s.') % err_msg) + raise osv.except_osv(_('Error !'), _('You cannot do this modification on a confirmed entry. You can just change some non legal fields or you must unconfirm the journal entry first.\n%s.') % err_msg) if line.reconcile_id: - raise osv.except_osv(_('Error !'), _('You cannot do this modification on a reconciled entry! You can just change some non legal fields or you must unreconcile first!\n%s.') % err_msg) + raise osv.except_osv(_('Error !'), _('You cannot do this modification on a reconciled entry. You can just change some non legal fields or you must unreconcile first.\n%s.') % err_msg) t = (line.journal_id.id, line.period_id.id) if t not in done: self._update_journal_check(cr, uid, line.journal_id.id, line.period_id.id, context) @@ -1224,7 +1224,7 @@ class account_move_line(osv.osv): if company_id: vals['company_id'] = company_id[0] if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: - raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account!')) + raise osv.except_osv(_('Bad account!'), _('You cannot use an inactive account.')) if 'journal_id' in vals: context['journal_id'] = vals['journal_id'] if 'period_id' in vals: @@ -1237,10 +1237,10 @@ class account_move_line(osv.osv): if 'period_id' not in context or not isinstance(context.get('period_id', ''), (int, long)): period_candidate_ids = self.pool.get('account.period').name_search(cr, uid, name=context.get('period_id','')) if len(period_candidate_ids) != 1: - raise osv.except_osv(_('Encoding error!'), _('No period is found or more than one period found for the given date.')) + raise osv.except_osv(_('Encoding error!'), _('No period found or more than one period found for the given date.')) context['period_id'] = period_candidate_ids[0][0] if not context.get('journal_id', False) and context.get('search_default_journal_id', False): - context['journal_id'] = context.get('search_default_journal_id') + context['journal_id'] = context.get('search_default_journal_id') self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context) move_id = vals.get('move_id', False) journal = journal_obj.browse(cr, uid, context['journal_id'], context=context) @@ -1263,7 +1263,7 @@ class account_move_line(osv.osv): move_id = move_obj.create(cr, uid, v, context) vals['move_id'] = move_id else: - raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece!\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) + raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) ok = not (journal.type_control_ids or journal.account_control_ids) if ('account_id' in vals): account = account_obj.browse(cr, uid, vals['account_id'], context=context) @@ -1288,7 +1288,7 @@ class account_move_line(osv.osv): vals['amount_currency'] = cur_obj.compute(cr, uid, account.company_id.currency_id.id, account.currency_id.id, vals.get('debit', 0.0)-vals.get('credit', 0.0), context=ctx) if not ok: - raise osv.except_osv(_('Bad account !'), _('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal !')) + raise osv.except_osv(_('Bad account !'), _('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal.')) if vals.get('analytic_account_id',False): if journal.analytic_journal_id: diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 3711de09b2a..c93c3e02ee3 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -89,7 +89,7 @@ class common_report_header(object): return '' def _get_sortby(self, data): - raise (_('Error!'), _('Not implemented!')) + raise (_('Error!'), _('Not implemented.')) def _get_filter(self, data): if data.get('form', False) and data['form'].get('filter', False): diff --git a/addons/account/wizard/account_change_currency.py b/addons/account/wizard/account_change_currency.py index 4a49f4ded0b..d51df1e4d70 100644 --- a/addons/account/wizard/account_change_currency.py +++ b/addons/account/wizard/account_change_currency.py @@ -35,7 +35,7 @@ class account_change_currency(osv.osv_memory): context = {} if context.get('active_id',False): if obj_inv.browse(cr, uid, context['active_id']).state != 'draft': - raise osv.except_osv(_('Error!'), _('You can only change currency for Draft Invoice !')) + raise osv.except_osv(_('Error!'), _('You can only change currency for Draft Invoice.')) pass def change_currency(self, cr, uid, ids, context=None): @@ -56,18 +56,18 @@ class account_change_currency(osv.osv_memory): if invoice.company_id.currency_id.id == invoice.currency_id.id: new_price = line.price_unit * rate if new_price <= 0: - raise osv.except_osv(_('Error!'), _('New currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('New currency is not configured properly.')) if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id == new_currency: old_rate = invoice.currency_id.rate if old_rate <= 0: - raise osv.except_osv(_('Error!'), _('Current currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('Current currency is not configured properly.')) new_price = line.price_unit / old_rate if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id != new_currency: old_rate = invoice.currency_id.rate if old_rate <= 0: - raise osv.except_osv(_('Error!'), _('Current currency is not configured properly !')) + raise osv.except_osv(_('Error!'), _('Current currency is not configured properly.')) new_price = (line.price_unit / old_rate ) * rate obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price}) obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context) diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index 85b36b5e778..a79f9b22770 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -51,9 +51,9 @@ class account_fiscalyear_close(osv.osv_memory): """ def _reconcile_fy_closing(cr, uid, ids, context=None): """ - This private function manually do the reconciliation on the account_move_line given as `ids´, and directly + This private function manually do the reconciliation on the account_move_line given as `ids´, and directly through psql. It's necessary to do it this way because the usual `reconcile()´ function on account.move.line - object is really resource greedy (not supposed to work on reconciliation between thousands of records) and + object is really resource greedy (not supposed to work on reconciliation between thousands of records) and it does a lot of different computation that are useless in this particular case. """ #check that the reconcilation concern journal entries from only one company @@ -85,7 +85,7 @@ class account_fiscalyear_close(osv.osv_memory): fy2_period_set = ','.join(map(lambda id: str(id[0]), cr.fetchall())) if not fy_period_set or not fy2_period_set: - raise osv.except_osv(_('UserError!'), _('The periods to generate opening entries were not found.')) + raise osv.except_osv(_('UserError!'), _('The periods to generate opening entries cannot be found.')) period = obj_acc_period.browse(cr, uid, data[0].period_id.id, context=context) new_fyear = obj_acc_fiscalyear.browse(cr, uid, data[0].fy2_id.id, context=context) @@ -100,7 +100,7 @@ class account_fiscalyear_close(osv.osv_memory): _('The journal must have default credit and debit account.')) if (not new_journal.centralisation) or new_journal.entry_posted: raise osv.except_osv(_('UserError!'), - _('The journal must have centralized counterpart without the Skipping draft state option checked!')) + _('The journal must have centralized counterpart without the Skipping draft state option checked.')) #delete existing move and move lines if any move_ids = obj_acc_move.search(cr, uid, [ diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 96eb0e6a944..be3c9ccaca6 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -108,7 +108,7 @@ class account_invoice_refund(osv.osv_memory): if inv.state in ['draft', 'proforma2', 'cancel']: raise osv.except_osv(_('Error !'), _('Cannot %s draft/proforma/cancel invoice.') % (mode)) if inv.reconciled and mode in ('cancel', 'modify'): - raise osv.except_osv(_('Error !'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice.') % (mode)) + raise osv.except_osv(_('Error !'), _('Cannot %s invoice which is already reconciled, invoice should be unreconciled first. You can only refund this invoice.') % (mode)) if form.period.id: period = form.period.id else: @@ -144,7 +144,7 @@ class account_invoice_refund(osv.osv_memory): if not period: raise osv.except_osv(_('Data Insufficient !'), \ - _('No Period is found on Invoice!')) + _('No period found on the invoice.')) refund_id = inv_obj.refund(cr, uid, [inv.id], date, period, description, journal_id) refund = inv_obj.browse(cr, uid, refund_id[0], context=context) diff --git a/addons/account/wizard/account_invoice_state.py b/addons/account/wizard/account_invoice_state.py index 78ebe5de5fa..55eab584040 100644 --- a/addons/account/wizard/account_invoice_state.py +++ b/addons/account/wizard/account_invoice_state.py @@ -41,7 +41,7 @@ class account_invoice_confirm(osv.osv_memory): for record in data_inv: if record['state'] not in ('draft','proforma','proforma2'): - raise osv.except_osv(_('Warning!'), _("Selected Invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state!")) + raise osv.except_osv(_('Warning!'), _("Selected invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state.")) wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_open', cr) return {'type': 'ir.actions.act_window_close'} @@ -65,7 +65,7 @@ class account_invoice_cancel(osv.osv_memory): for record in data_inv: if record['state'] in ('cancel','paid'): - raise osv.except_osv(_('Warning!'), _("Selected Invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state!")) + raise osv.except_osv(_('Warning!'), _("Selected invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state.")) wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_cancel', cr) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index d7c692e0619..f14e8c555e6 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -83,25 +83,25 @@ class account_move_journal(osv.osv_memory): if context: if not view_id: return res - + period_pool = self.pool.get('account.period') journal_pool = self.pool.get('account.journal') - + journal_id = self._get_journal(cr, uid, context) period_id = self._get_period(cr, uid, context) - + journal = False if journal_id: journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name'] journal_string = _("Journal: %s") % tools.ustr(journal) else: journal_string = _("Journal: All") - + period = False if period_id: period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] period_string = _("Period: %s") % tools.ustr(period) - + open_string = _("Open") view = """
@@ -116,7 +116,7 @@ class account_move_journal(osv.osv_memory):