openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03876
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-684741-rha into lp:openobject-addons
Rifakat Haradwala (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-684741-rha into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
#684741 Please use string formatting instead of concatenation
https://bugs.launchpad.net/bugs/684741
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-684741-rha/+merge/52641
bug #684741 :use string formatting instead of concatenation
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-684741-rha/+merge/52641
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-684741-rha.
=== modified file 'account/account.py'
--- account/account.py 2011-03-03 14:59:00 +0000
+++ account/account.py 2011-03-09 06:11:12 +0000
@@ -2942,6 +2942,7 @@
acc_cash_id = obj_acc.create(cr,uid,vals)
#create the bank journal
+<<<<<<< TREE
analytical_bank_ids = analytic_journal_obj.search(cr,uid,[('type','=','situation')])
analytical_journal_bank = analytical_bank_ids and analytical_bank_ids[0] or False
vals_journal = {
@@ -2952,6 +2953,18 @@
'analytic_journal_id': False,
'currency_id': False,
}
+=======
+ analitical_bank_ids = analytic_journal_obj.search(cr,uid,[('type','=','situation')])
+ analitical_journal_bank = analitical_bank_ids and analitical_bank_ids[0] or False
+
+ vals_journal['name']= vals['name']
+ vals_journal['code']= _('BNK%s') % str(current_num)
+ vals_journal['sequence_id'] = seq_id
+ vals_journal['type'] = line.account_type == 'cash' and 'cash' or 'bank'
+ vals_journal['company_id'] = company_id
+ vals_journal['analytic_journal_id'] = analitical_journal_bank
+
+>>>>>>> MERGE-SOURCE
if line.currency_id:
vals_journal['view_id'] = view_id_cur
vals_journal['currency'] = line.currency_id.id
=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py 2011-01-27 12:17:21 +0000
+++ account/account_bank_statement.py 2011-03-09 06:11:12 +0000
@@ -303,8 +303,7 @@
st = self.browse(cr, uid, st_id, context=context)
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
raise osv.except_osv(_('Error !'),
- _('The statement balance is incorrect !\n') +
- _('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
+ _('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
return True
def statement_close(self, cr, uid, ids, journal_type='bank', context=None):
=== modified file 'account/i18n/account.pot'
--- account/i18n/account.pot 2011-01-14 00:11:01 +0000
+++ account/i18n/account.pot 2011-03-09 06:11:12 +0000
@@ -675,13 +675,6 @@
msgstr ""
#. module: account
-#: code:addons/account/account_bank_statement.py:306
-#, python-format
-msgid "The statement balance is incorrect !\n"
-""
-msgstr ""
-
-#. module: account
#: selection:account.payment.term.line,value:0
#: selection:account.tax.template,type:0
msgid "Percent"
@@ -2459,9 +2452,10 @@
msgstr ""
#. module: account
-#: code:addons/account/account_bank_statement.py:307
+#: code:addons/account/account_bank_statement.py:306
#, python-format
-msgid "The expected balance (%.2f) is different than the computed one. (%.2f)"
+msgid "The statement balance is incorrect !\n"
+"The expected balance (%.2f) is different than the computed one. (%.2f)"
msgstr ""
#. module: account
@@ -2682,6 +2676,12 @@
msgstr ""
#. module: account
+#: code:addons/account/account.py:2951
+#, python-format
+msgid "BNK%s"
+msgstr ""
+
+#. module: account
#: code:addons/account/account.py:2906
#: code:addons/account/installer.py:296
#, python-format
@@ -3998,12 +3998,6 @@
msgstr ""
#. module: account
-#: code:addons/account/invoice.py:989
-#, python-format
-msgid "Invoice "
-msgstr ""
-
-#. module: account
#: field:account.automatic.reconcile,date1:0
msgid "Starting Date"
msgstr ""
@@ -5238,9 +5232,9 @@
msgstr ""
#. module: account
-#: code:addons/account/invoice.py:989
+#: code:addons/account/invoice.py:997
#, python-format
-msgid "is validated."
+msgid "Invoice '%s' is validated."
msgstr ""
#. module: account
=== modified file 'account/invoice.py'
--- account/invoice.py 2011-03-03 17:07:00 +0000
+++ account/invoice.py 2011-03-09 06:11:12 +0000
@@ -994,7 +994,7 @@
ctx = context.copy()
if obj_inv.type in ('out_invoice', 'out_refund'):
ctx = self.get_log_context(cr, uid, context=ctx)
- message = _('Invoice ') + " '" + name + "' "+ _("is validated.")
+ message = _("Invoice '%s' is validated.") % name
self.log(cr, uid, inv_id, message, context=ctx)
return True
=== modified file 'account_followup/i18n/account_followup.pot'
--- account_followup/i18n/account_followup.pot 2011-01-14 00:11:01 +0000
+++ account_followup/i18n/account_followup.pot 2011-03-09 06:11:12 +0000
@@ -54,13 +54,13 @@
msgstr ""
#. module: account_followup
-#: code:addons/account_followup/wizard/account_followup_print.py:287
+#: code:addons/account_followup/wizard/account_followup_print.py:290
#, python-format
msgid "\n"
"\n"
"E-Mail sent to following Partners successfully. !\n"
"\n"
-""
+"%s"
msgstr ""
#. module: account_followup
@@ -430,11 +430,11 @@
msgstr ""
#. module: account_followup
-#: code:addons/account_followup/wizard/account_followup_print.py:284
+#: code:addons/account_followup/wizard/account_followup_print.py:287
#, python-format
msgid "All E-mails have been successfully sent to Partners:.\n"
"\n"
-""
+"%s"
msgstr ""
#. module: account_followup
@@ -615,11 +615,11 @@
msgstr ""
#. module: account_followup
-#: code:addons/account_followup/wizard/account_followup_print.py:286
+#: code:addons/account_followup/wizard/account_followup_print.py:289
#, python-format
msgid "E-Mail not sent to following Partners, Email not available !\n"
"\n"
-""
+"%s"
msgstr ""
#. module: account_followup
=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py 2011-01-14 00:11:01 +0000
+++ account_followup/wizard/account_followup_print.py 2011-03-09 06:11:12 +0000
@@ -284,10 +284,10 @@
msg += partner.name + '\n'
msg_unsent += msg
if not msg_unsent:
- summary = _("All E-mails have been successfully sent to Partners:.\n\n") + msg_sent
+ summary = _("All E-mails have been successfully sent to Partners:.\n\n%s") % msg_sent
else:
- msg_unsent = _("E-Mail not sent to following Partners, Email not available !\n\n") + msg_unsent
- msg_sent = msg_sent and _("\n\nE-Mail sent to following Partners successfully. !\n\n") + msg_sent
+ msg_unsent = _("E-Mail not sent to following Partners, Email not available !\n\n%s") % msg_unsent
+ msg_sent = msg_sent and _("\n\nE-Mail sent to following Partners successfully. !\n\n%s") % msg_sent
line = '=========================================================================='
summary = msg_unsent + line + msg_sent
context.update({'summary': summary})
=== modified file 'base_module_quality/i18n/base_module_quality.pot'
--- base_module_quality/i18n/base_module_quality.pot 2011-01-14 00:11:01 +0000
+++ base_module_quality/i18n/base_module_quality.pot 2011-03-09 06:11:12 +0000
@@ -351,10 +351,9 @@
msgstr ""
#. module: base_module_quality
-#: code:addons/base_module_quality/speed_test/speed_test.py:115
#: code:addons/base_module_quality/speed_test/speed_test.py:116
#, python-format
-msgid "Error in Read method"
+msgid "Error in Read method: %s"
msgstr ""
#. module: base_module_quality
=== modified file 'base_module_quality/speed_test/speed_test.py'
--- base_module_quality/speed_test/speed_test.py 2011-01-14 00:11:01 +0000
+++ base_module_quality/speed_test/speed_test.py 2011-03-09 06:11:12 +0000
@@ -113,7 +113,7 @@
except Exception, e:
self.log.warning('Error in read method', exc_info=True)
list2 = [obj, _("Error in Read method")]
- speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Error in Read method") + ": %s " % e]
+ speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Error in Read method: %s") % e]
else:
if size < 5:
speed_list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, _("Warning! Not enough demo data")]
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2011-03-04 12:53:34 +0000
+++ crm/crm_lead.py 2011-03-09 06:11:12 +0000
@@ -279,7 +279,7 @@
if 'stage_id' in vals and vals['stage_id']:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
- self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name, details=_("Changed Stage to: ") + stage_obj.name)
+ self.history(cr, uid, ids, _("Changed Stage to: %s") % stage_obj.name, details=_("Changed Stage to: %s") % stage_obj.name)
message=''
for case in self.browse(cr, uid, ids, context=context):
if case.type == 'lead' or context.get('stage_type',False)=='lead':
=== modified file 'crm/i18n/crm.pot'
--- crm/i18n/crm.pot 2011-01-14 00:11:01 +0000
+++ crm/i18n/crm.pot 2011-03-09 06:11:12 +0000
@@ -2268,6 +2268,12 @@
msgstr ""
#. module: crm
+#: code:addons/crm/crm_lead.py:282
+#, python-format
+msgid "Changed Stage to: %s"
+msgstr ""
+
+#. module: crm
#: selection:crm.segmentation.line,operator:0
msgid "Mandatory Expression"
msgstr ""
=== modified file 'email_template/email_template.py'
--- email_template/email_template.py 2011-01-17 20:48:40 +0000
+++ email_template/email_template.py 2011-03-09 06:11:12 +0000
@@ -36,7 +36,7 @@
TEMPLATE_ENGINES.append(('mako', 'Mako Templates'))
except ImportError:
logging.getLogger('init').warning("module email_template: Mako templates not installed")
-
+
try:
from django.template import Context, Template as DjangoTemplate
#Workaround for bug:
@@ -316,7 +316,7 @@
default = {}
default = default.copy()
old = self.read(cr, uid, id, ['name'], context=context)
- new_name = _("Copy of template ") + old.get('name', 'No Name')
+ new_name = _("Copy of template %s") % old.get('name', 'No Name')
check = self.search(cr, uid, [('name', '=', new_name)], context=context)
if check:
new_name = new_name + '_' + random.choice('abcdefghij') + random.choice('lmnopqrs') + random.choice('tuvwzyz')
=== modified file 'email_template/i18n/email_template.pot'
--- email_template/i18n/email_template.pot 2011-01-14 00:11:01 +0000
+++ email_template/i18n/email_template.pot 2011-03-09 06:11:12 +0000
@@ -856,7 +856,7 @@
#. module: email_template
#: code:addons/email_template/email_template.py:319
#, python-format
-msgid "Copy of template "
+msgid "Copy of template %s"
msgstr ""
#. module: email_template
=== modified file 'mail_gateway/i18n/mail_gateway.pot'
--- mail_gateway/i18n/mail_gateway.pot 2011-01-14 00:11:01 +0000
+++ mail_gateway/i18n/mail_gateway.pot 2011-03-09 06:11:12 +0000
@@ -113,9 +113,9 @@
msgstr ""
#. module: mail_gateway
-#: code:addons/mail_gateway/mail_gateway.py:242
+#: code:addons/mail_gateway/mail_gateway.py:250
#, python-format
-msgid " wrote on "
+msgid " wrote on %s:\n"
msgstr ""
#. module: mail_gateway
@@ -286,9 +286,9 @@
msgstr ""
#. module: mail_gateway
-#: code:addons/mail_gateway/mail_gateway.py:246
+#: code:addons/mail_gateway/mail_gateway.py:254
#, python-format
-msgid " on "
+msgid " on %s:\n"
msgstr ""
#. module: mail_gateway
=== modified file 'mail_gateway/mail_gateway.py'
--- mail_gateway/mail_gateway.py 2011-02-24 15:03:09 +0000
+++ mail_gateway/mail_gateway.py 2011-03-09 06:11:12 +0000
@@ -169,7 +169,7 @@
'message_id': message_id,
'attachment_ids': [(6, 0, attachments)]
}
-
+
obj.create(cr, uid, data, context=context)
return True
mailgate_thread()
@@ -221,7 +221,7 @@
action_data = False
action_pool = self.pool.get('ir.actions.act_window')
message_pool = self.browse(cr ,uid, ids, context=context)[0]
- att_ids = [x.id for x in message_pool.attachment_ids]
+ att_ids = [x.id for x in message_pool.attachment_ids]
action_ids = action_pool.search(cr, uid, [('res_model', '=', 'ir.attachment')])
if action_ids:
action_data = action_pool.read(cr, uid, action_ids[0], context=context)
@@ -247,11 +247,11 @@
for message in self.browse(cr, uid, ids, context=context):
msg_txt = ''
if message.history:
- msg_txt += (message.email_from or '/') + _(' wrote on ') + format_date_tz(message.date, tz) + ':\n\t'
+ msg_txt += (message.email_from or '/') + _(' wrote on %s:\n\t') % format_date_tz(message.date, tz)
if message.description:
msg_txt += self.truncate_data(cr, uid, message.description, context=context)
else:
- msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
+ msg_txt = (message.user_id.name or '/') + _(' on %s:\n\t') % format_date_tz(message.date, tz)
msg_txt += message.name
result[message.id] = msg_txt
return result
=== modified file 'mrp/report/price.py'
--- mrp/report/price.py 2011-01-14 00:11:01 +0000
+++ mrp/report/price.py 2011-03-09 06:11:12 +0000
@@ -147,12 +147,14 @@
<col para='yes'>-</col>
</row></lines>"""
xml += """<lines style='total'> <row>
- <col> """ + _('Total Cost of ') + str(number) +' '+ product.uom_id.name + """: </col>
+ <col> Total Cost of %d %s: </col>
<col/>
<col f='yes'/>
- <col t='yes'>"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
- <col t='yes'>"""+ rml_obj.formatLang(total, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
- </row></lines>'"""
+ <col t='yes'>%s %s</col>
+ <col t='yes'>%s %s</col>
+ </row></lines>'""" %(number, product.uom_id.name, rml_obj.formatLang(total_strd, digits=purchase_price_digits),
+ company_currency.symbol, rml_obj.formatLang(total, digits=purchase_price_digits),company_currency.symbol)
+
else:
bom = bom_pool.browse(cr, uid, bom_id, context=context)
factor = number * product.uom_id.factor / bom.product_uom.factor
@@ -191,19 +193,22 @@
xml += workcenter_header
xml += "<lines style='lines'>" + xml_tmp + '</lines>'
xml += """<lines style='sub_total'> <row>
- <col> """ + _('Work Cost of ') + str(number) +' '+ product.uom_id.name +""": </col>
- <col/>
- <col/>
- <col/>
- <col t='yes'>"""+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +"""</col>
- </row></lines>'"""
+ <col> Work Cost of %d "%s: </col>
+ <col/>
+ <col/>
+ <col/>
+ <col t='yes'>%s %s</col>
+ </row></lines>'""" %(number, product.uom_id.name, rml_obj.formatLang(total2, digits=purchase_price_digits),
+ company_currency.symbol)
+
xml += """<lines style='total'> <row>
- <col> """ + _('Total Cost of ') + str(number) +' '+ product.uom_id.name + """: </col>
+ <col> Total Cost of %d %s: </col>
<col/>
<col t='yes'/>
- <col t='yes'>"""+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
+ <col t='yes'>%s %s</col>
<col t='yes'></col>
- </row></lines>'"""
+ </row></lines>'""" %(number, product.uom_id.name, rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits),
+ company_currency.symbol)
xml = '<?xml version="1.0" ?><report>' + config_start + config_stop + xml + '</report>'
=== modified file 'project/i18n/project.pot'
--- project/i18n/project.pot 2011-01-14 00:11:01 +0000
+++ project/i18n/project.pot 2011-03-09 06:11:12 +0000
@@ -59,6 +59,12 @@
msgstr ""
#. module: project
+#: code:addons/project/wizard/project_task_delegate.py:67
+#, python-format
+msgid "CHECK: %s"
+msgstr ""
+
+#. module: project
#: code:addons/project/wizard/project_task_delegate.py:55
#: code:addons/project/wizard/project_task_delegate.py:56
#: code:addons/project/wizard/project_task_delegate.py:63
=== modified file 'project/wizard/project_task_delegate.py'
--- project/wizard/project_task_delegate.py 2011-02-02 13:24:29 +0000
+++ project/wizard/project_task_delegate.py 2011-03-09 06:11:12 +0000
@@ -64,7 +64,7 @@
newname = tools.ustr(task_name).replace(_('CHECK: '), '')
else:
newname = tools.ustr(task_name or '')
- prefix = _('CHECK: ') + newname
+ prefix = _('CHECK: %s') % newname
res.update({'prefix': prefix})
if 'new_task_description' in fields:
res.update({'new_task_description': task.description})
=== modified file 'project_scrum/i18n/project_scrum.pot'
--- project_scrum/i18n/project_scrum.pot 2011-01-14 00:11:01 +0000
+++ project_scrum/i18n/project_scrum.pot 2011-03-09 06:11:12 +0000
@@ -221,6 +221,18 @@
#. module: project_scrum
#: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:57
+#, python-format
+msgid "Product Backlog '%s' is converted into Task %d."
+msgstr ""
+
+#. module: project_scrum
+#: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:62
+#, python-format
+msgid "Product Backlog '%s' is assigned sprint:%s"
+msgstr ""
+
+#. module: project_scrum
+#: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:57
#: code:addons/project_scrum/wizard/project_scrum_backlog_sprint.py:62
#: model:ir.model,name:project_scrum.model_project_scrum_product_backlog
#: view:project.scrum.product.backlog:0
@@ -254,12 +266,6 @@
msgstr ""
#. module: project_scrum
-#: code:addons/project_scrum/project_scrum.py:325
-#, python-format
-msgid "*Blocks encountered:"
-msgstr ""
-
-#. module: project_scrum
#: view:project.scrum.product.backlog:0
msgid "Change Stage"
msgstr ""
@@ -391,12 +397,6 @@
msgstr ""
#. module: project_scrum
-#: code:addons/project_scrum/project_scrum.py:324
-#, python-format
-msgid "for the Sprint"
-msgstr ""
-
-#. module: project_scrum
#: view:project.scrum.backlog.create.task:0
msgid "C_onvert"
msgstr ""
@@ -434,12 +434,6 @@
msgstr ""
#. module: project_scrum
-#: code:addons/project_scrum/project_scrum.py:324
-#, python-format
-msgid "Hello "
-msgstr ""
-
-#. module: project_scrum
#: field:project.scrum.meeting,question_today:0
msgid "Tasks for today"
msgstr ""
@@ -602,12 +596,6 @@
msgstr ""
#. module: project_scrum
-#: code:addons/project_scrum/project_scrum.py:325
-#, python-format
-msgid "*Tasks since yesterday:"
-msgstr ""
-
-#. module: project_scrum
#: view:project.scrum.meeting:0
#: view:project.scrum.sprint:0
msgid "Scrum Sprint"
@@ -746,12 +734,6 @@
msgstr ""
#. module: project_scrum
-#: code:addons/project_scrum/project_scrum.py:325
-#, python-format
-msgid "No Blocks"
-msgstr ""
-
-#. module: project_scrum
#: field:project.scrum.meeting,question_backlog:0
msgid "Backlog Accurate"
msgstr ""
@@ -922,7 +904,23 @@
#. module: project_scrum
#: code:addons/project_scrum/project_scrum.py:324
#, python-format
-msgid "I am sending you Daily Meeting Details of date"
+msgid "Hello %s,\n"
+" \n"
+"I am sending you Daily Meeting Details of date %s for the Sprint %s\n"
+""
+msgstr ""
+
+#. module: project_scrum
+#: code:addons/project_scrum/project_scrum.py:325
+#, python-format
+msgid "\n"
+"*Tasks since yesterday:\n"
+"_______________________%s\n"
+"*Task for Today:\n"
+"_______________________ %s\n"
+"\n"
+"*Blocks encountered:\n"
+"_______________________ %s"
msgstr ""
#. module: project_scrum
@@ -971,12 +969,6 @@
msgstr ""
#. module: project_scrum
-#: code:addons/project_scrum/project_scrum.py:325
-#, python-format
-msgid "*Task for Today:"
-msgstr ""
-
-#. module: project_scrum
#: code:addons/project_scrum/project_scrum.py:303
#, python-format
msgid "Please provide email address for scrum master defined on sprint."
=== modified file 'project_scrum/project_scrum.py'
--- project_scrum/project_scrum.py 2011-03-04 05:57:08 +0000
+++ project_scrum/project_scrum.py 2011-03-09 06:11:12 +0000
@@ -321,9 +321,9 @@
meeting_id = self.browse(cr, uid, ids, context=context)[0]
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
user_email = email_from or user.address_id.email or email_from
- body = _('Hello ') + meeting_id.sprint_id.scrum_master_id.name + ",\n" + " \n" +_('I am sending you Daily Meeting Details of date')+ ' %s ' % (meeting_id.date)+ _('for the Sprint')+ ' %s\n' % (meeting_id.sprint_id.name)
- body += "\n"+ _('*Tasks since yesterday:')+ '\n_______________________%s' % (meeting_id.question_yesterday) + '\n' +_("*Task for Today:")+ '\n_______________________ %s\n' % (meeting_id.question_today )+ '\n' +_('*Blocks encountered:') +'\n_______________________ %s' % (meeting_id.question_blocks or _('No Blocks'))
- body += "\n\n"+_('Thank you')+",\n"+ user.name
+ body = _("Hello %s,\n \nI am sending you Daily Meeting Details of date %s for the Sprint %s\n") %(meeting_id.sprint_id.scrum_master_id.name, meeting_id.date, meeting_id.sprint_id.name)
+ body += _('\n*Tasks since yesterday:\n_______________________%s\n*Task for Today:\n_______________________ %s\n\n*Blocks encountered:\n_______________________ %s') %(meeting_id.question_yesterday,meeting_id.question_today, meeting_id.question_blocks or _('No Blocks'))
+ body += _("\n\nThank you,\n%s") % user.name
sub_name = meeting_id.name or _('Scrum Meeting of %s') % meeting_id.date
flag = tools.email_send(user_email , [email], sub_name, body, reply_to=None, openobject_id=str(meeting_id.id))
if not flag:
=== modified file 'project_scrum/wizard/project_scrum_backlog_sprint.py'
--- project_scrum/wizard/project_scrum_backlog_sprint.py 2011-01-14 00:11:01 +0000
+++ project_scrum/wizard/project_scrum_backlog_sprint.py 2011-03-09 06:11:12 +0000
@@ -54,12 +54,12 @@
'planned_hours':backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
})
- message = _('Product Backlog') + " '" + backlog.name + "' "+ _("is converted into Task %d."%(task_id,))
+ message = _("Product Backlog '%s' is converted into Task %d.") %(backlog.name, task_id)
self.log(cr, uid, backlog.id, message)
if data['state_open'] and backlog.state == "draft":
backlog_obj.write(cr, uid, backlog.id, {'state':'open'})
sprint = sprint_obj.browse(cr, uid, data['sprint_id'], context=context)
- message = _('Product Backlog') + " '" + backlog.name + "' "+ _("is assigned sprint:%s"%(sprint.name))
+ message = _("Product Backlog '%s' is assigned sprint:%s") %(backlog.name, sprint.name)
self.log(cr, uid, backlog.id, message)
backlog_obj.write(cr, uid, backlog_ids, {'sprint_id': data['sprint_id']}, context=context)
return {'type': 'ir.actions.act_window_close'}
=== modified file 'sale_crm/i18n/sale_crm.pot'
--- sale_crm/i18n/sale_crm.pot 2011-01-14 00:11:01 +0000
+++ sale_crm/i18n/sale_crm.pot 2011-03-09 06:11:12 +0000
@@ -28,9 +28,10 @@
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:108
#, python-format
-msgid "is converted to Quotation."
+msgid "Opportunity '%s' is converted to Quotation."
msgstr ""
+
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:89
#, python-format
@@ -95,12 +96,6 @@
msgstr ""
#. module: sale_crm
-#: code:addons/sale_crm/wizard/crm_make_sale.py:108
-#, python-format
-msgid "Opportunity "
-msgstr ""
-
-#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:92
#, python-format
msgid "Opportunity: %s"
=== modified file 'sale_crm/wizard/crm_make_sale.py'
--- sale_crm/wizard/crm_make_sale.py 2011-01-14 00:11:01 +0000
+++ sale_crm/wizard/crm_make_sale.py 2011-03-09 06:11:12 +0000
@@ -105,7 +105,7 @@
new_id = sale_obj.create(cr, uid, vals)
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
new_ids.append(new_id)
- message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Quotation.")
+ message = _("Opportunity '%s' is converted to Quotation.") % (case.name)
self.log(cr, uid, case.id, message)
case_obj._history(cr, uid, [case], _("Converted to Sales Quotation(id: %s).") % (new_id))
=== modified file 'share/i18n/share.pot'
--- share/i18n/share.pot 2011-01-14 00:11:01 +0000
+++ share/i18n/share.pot 2011-03-09 06:11:12 +0000
@@ -61,10 +61,12 @@
msgstr ""
#. module: share
-#: code:addons/share/wizard/share_wizard.py:425
+#: code:addons/share/wizard/share_wizard.py:453
#, python-format
msgid "Dear,\n"
"\n"
+"%s\n"
+"\n"
""
msgstr ""
@@ -116,9 +118,9 @@
msgstr ""
#. module: share
-#: code:addons/share/wizard/share_wizard.py:429
+#: code:addons/share/wizard/share_wizard.py:457
#, python-format
-msgid "You may use the following login and password to get access to this protected area:"
+msgid "You may use the following login and password to get access to this protected area:\n"
msgstr ""
#. module: share
=== modified file 'share/wizard/share_wizard.py'
--- share/wizard/share_wizard.py 2011-01-18 19:30:22 +0000
+++ share/wizard/share_wizard.py 2011-03-09 06:11:12 +0000
@@ -450,11 +450,11 @@
for result_line in wizard_data.result_line_ids:
email_to = result_line.login
subject = _('%s has shared OpenERP %s information with you') % (user.name, wizard_data.action_id.name)
- body = _("Dear,\n\n") + subject + "\n\n"
+ body = _("Dear,\n\n%s\n\n") % subject
body += _("To access it, you can go to the following URL:\n %s") % result_line.share_url
body += "\n\n"
if result_line.newly_created:
- body += _("You may use the following login and password to get access to this protected area:") + "\n"
+ body += _("You may use the following login and password to get access to this protected area:\n")
body += "%s: %s" % (_("Username"), result_line.login) + "\n"
body += "%s: %s" % (_("Password"), result_line.password) + "\n"
body += "%s: %s" % (_("Database"), cr.dbname) + "\n"
=== modified file 'stock/i18n/stock.pot'
--- stock/i18n/stock.pot 2011-01-14 00:11:01 +0000
+++ stock/i18n/stock.pot 2011-03-09 06:11:12 +0000
@@ -686,12 +686,6 @@
msgstr ""
#. module: stock
-#: code:addons/stock/stock.py:2348
-#, python-format
-msgid "is consumed with"
-msgstr ""
-
-#. module: stock
#: help:stock.move,prodlot_id:0
msgid "Production lot is used to put a serial number on the production"
msgstr ""
@@ -813,6 +807,12 @@
msgstr ""
#. module: stock
+#: code:addons/stock/stock.py:1315
+#, python-format
+msgid "is scheduled %s."
+msgstr ""
+
+#. module: stock
#: help:stock.picking,location_id:0
msgid "Keep empty if you produce at the location where the finished products are needed.Set a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."
msgstr ""
@@ -1849,12 +1849,6 @@
msgstr ""
#. module: stock
-#: code:addons/stock/stock.py:2348
-#, python-format
-msgid "Product "
-msgstr ""
-
-#. module: stock
#: view:stock.location.product:0
msgid "Stock Location Analysis"
msgstr ""
@@ -3081,9 +3075,9 @@
msgstr ""
#. module: stock
-#: code:addons/stock/wizard/stock_change_product_qty.py:74
+#: code:addons/stock/wizard/stock_change_product_qty.py:88
#, python-format
-msgid "INV: "
+msgid "INV: %s"
msgstr ""
#. module: stock
@@ -3368,12 +3362,6 @@
msgstr ""
#. module: stock
-#: code:addons/stock/stock.py:1318
-#, python-format
-msgid "is scheduled"
-msgstr ""
-
-#. module: stock
#: field:stock.location,chained_company_id:0
msgid "Chained Company"
msgstr ""
@@ -3506,9 +3494,15 @@
msgstr ""
#. module: stock
-#: code:addons/stock/stock.py:2348
-#, python-format
-msgid "quantity."
+#: code:addons/stock/stock.py:2386
+#, python-format
+msgid "Product '%s' is consumed with '%s' quantity."
+msgstr ""
+
+#. module: stock
+#: code:addons/stock/stock.py:2595
+#, python-format
+msgid "Inventory '%s' is done."
msgstr ""
#. module: stock
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-02-25 14:57:06 +0000
+++ stock/stock.py 2011-03-09 06:11:12 +0000
@@ -1312,7 +1312,7 @@
if pick.min_date:
msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%m/%d/%Y')
state_list = {
- 'confirmed': _("is scheduled") + msg +'.',
+ 'confirmed': _('is scheduled %s.') % msg,
'assigned': _('is ready to process.'),
'cancel': _('is cancelled.'),
'done': _('is done.'),
@@ -2383,7 +2383,7 @@
product_obj = self.pool.get('product.product')
for new_move in self.browse(cr, uid, res, context=context):
for (id, name) in product_obj.name_get(cr, uid, [new_move.product_id.id]):
- message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(new_move.product_qty) + "' "+ _("quantity.")
+ message = _("Product '%s' is consumed with '%s' quantity.") %(name, new_move.product_qty)
self.log(cr, uid, new_move.id, message)
self.action_done(cr, uid, res)
@@ -2592,7 +2592,7 @@
'product_qty': line.product_qty
})
move_ids.append(self._inventory_line_hook(cr, uid, line, value))
- message = _('Inventory') + " '" + inv.name + "' "+ _("is done.")
+ message = _("Inventory '%s' is done.") %(inv.name)
self.log(cr, uid, inv.id, message)
self.write(cr, uid, [inv.id], {'state': 'confirm', 'move_ids': [(6, 0, move_ids)]})
return True
=== modified file 'stock/wizard/stock_change_product_qty.py'
--- stock/wizard/stock_change_product_qty.py 2011-02-01 14:25:28 +0000
+++ stock/wizard/stock_change_product_qty.py 2011-03-09 06:11:12 +0000
@@ -85,7 +85,7 @@
res_original = prod_obj_pool.browse(cr, uid, rec_id, context=context)
for data in self.browse(cr, uid, ids, context=context):
- inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: ') + tools.ustr(res_original.name)}, context=context)
+ inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: %s') % tools.ustr(res_original.name)}, context=context)
line_data ={
'inventory_id' : inventory_id,
'product_qty' : data.new_quantity,
=== modified file 'stock_planning/i18n/stock_planning.pot'
--- stock_planning/i18n/stock_planning.pot 2011-01-14 00:11:01 +0000
+++ stock_planning/i18n/stock_planning.pot 2011-03-09 06:11:12 +0000
@@ -294,10 +294,12 @@
msgstr ""
#. module: stock_planning
-#: code:addons/stock_planning/stock_planning.py:715
+#: code:addons/stock_planning/stock_planning.py:719
#, python-format
-msgid "Pick List "
+msgid "%s Pick List %s (%s, %s) %s %s \n"
+""
msgstr ""
+""
#. module: stock_planning
#: view:stock.planning.createlines:0
@@ -408,7 +410,7 @@
#. module: stock_planning
#: code:addons/stock_planning/stock_planning.py:626
#, python-format
-msgid "Manual planning for "
+msgid "Manual planning for %s"
msgstr ""
#. module: stock_planning
@@ -442,7 +444,17 @@
#. module: stock_planning
#: code:addons/stock_planning/stock_planning.py:636
#, python-format
-msgid "Procurement created in MPS by user: "
+msgid " Procurement created in MPS by user: %s Creation Date: %s \n"
+" For period: %s \n"
+" according to state: \n"
+" Warehouse Forecast: %s \n"
+" Initial Stock: %s \n"
+" Planned Out: %s Planned In: %s \n"
+" Already Out: %s Already In: %s \n"
+" Confirmed Out: %s Confirmed In: %s \n"
+" Planned Out Before: %s Confirmed In Before: %s \n"
+" Expected Out: %s Incoming Left: %s \n"
+" Stock Simulation: %s Minimum stock: %s"
msgstr ""
#. module: stock_planning
@@ -776,6 +788,14 @@
msgstr ""
#. module: stock_planning
+#: code:addons/stock_planning/stock_planning.py:656
+#, python-format
+msgid "%s Requisition (%s, %s) %s %s \n"
+""
+msgstr ""
+""
+
+#. module: stock_planning
#: code:addons/stock_planning/stock_planning.py:655
#, python-format
msgid "Requisition ("
@@ -1206,6 +1226,14 @@
#. module: stock_planning
#: code:addons/stock_planning/stock_planning.py:627
+#: code:addons/stock_planning/stock_planning.py:673
+#: code:addons/stock_planning/stock_planning.py:697
+#, python-format
+msgid "MPS(%s) %s"
+msgstr ""
+
+#. module: stock_planning
+#: code:addons/stock_planning/stock_planning.py:627
#: code:addons/stock_planning/stock_planning.py:671
#: code:addons/stock_planning/stock_planning.py:693
#, python-format
@@ -1213,9 +1241,18 @@
msgstr ""
#. module: stock_planning
-#: code:addons/stock_planning/stock_planning.py:678
+#: code:addons/stock_planning/stock_planning.py:680
#, python-format
-msgid "Pick created from MPS by user: "
+msgid "Pick created from MPS by user: %s Creation Date: %s \n"
+"For period: %s according to state: \n"
+" Warehouse Forecast: %s \n"
+" Initial Stock: %s \n"
+" Planned Out: %s Planned In: %s \n"
+" Already Out: %s Already In: %s \n"
+" Confirmed Out: %s Confirmed In: %s \n"
+" Planned Out Before: %s Confirmed In Before: %s \n"
+" Expected Out: %s Incoming Left: %s \n"
+" Stock Simulation: %s Minimum stock: %s "
msgstr ""
#. module: stock_planning
=== modified file 'stock_planning/stock_planning.py'
--- stock_planning/stock_planning.py 2011-01-14 00:11:01 +0000
+++ stock_planning/stock_planning.py 2011-03-09 06:11:12 +0000
@@ -623,8 +623,8 @@
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
proc_id = self.pool.get('procurement.order').create(cr, uid, {
'company_id' : obj.company_id.id,
- 'name': _('Manual planning for ') + obj.period_id.name,
- 'origin': _('MPS(') + str(user.login) +') '+ obj.period_id.name,
+ 'name': _('Manual planning for %s') %(obj.period_id.name),
+ 'origin': _('MPS(%s) %s') %(user.login, obj.period_id.name),
'date_planned': obj.period_id.date_start,
'product_id': obj.product_id.id,
'product_qty': uom_qty,
@@ -633,28 +633,30 @@
'product_uos': uos,
'location_id': obj.procure_to_stock and obj.warehouse_id.lot_stock_id.id or obj.warehouse_id.lot_input_id.id,
'procure_method': 'make_to_order',
- 'note' : _("Procurement created in MPS by user: ") + str(user.login) + _(" Creation Date: ") + \
- time.strftime('%Y-%m-%d %H:%M:%S') + \
- _("\nFor period: ") + obj.period_id.name + _(" according to state:") + \
- _("\n Warehouse Forecast: ") + str(obj.warehouse_forecast) + \
- _("\n Initial Stock: ") + str(obj.stock_start) + \
- _("\n Planned Out: ") + str(obj.planned_outgoing) + _(" Planned In: ") + str(obj.to_procure) + \
- _("\n Already Out: ") + str(obj.already_out) + _(" Already In: ") + str(obj.already_in) + \
- _("\n Confirmed Out: ") + str(obj.outgoing) + _(" Confirmed In: ") + str(obj.incoming) + \
- _("\n Planned Out Before: ") + str(obj.outgoing_before) + _(" Confirmed In Before: ") + \
- str(obj.incoming_before) + \
- _("\n Expected Out: ") + str(obj.outgoing_left) + _(" Incoming Left: ") + str(obj.incoming_left) + \
- _("\n Stock Simulation: ") + str(obj.stock_simulation) + _(" Minimum stock: ") + str(obj.minimum_op),
-
+ 'note' : _(' Procurement created in MPS by user: %s Creation Date: %s \
+ \n For period: %s \
+ \n according to state: \
+ \n Warehouse Forecast: %s \
+ \n Initial Stock: %s \
+ \n Planned Out: %s Planned In: %s \
+ \n Already Out: %s Already In: %s \
+ \n Confirmed Out: %s Confirmed In: %s \
+ \n Planned Out Before: %s Confirmed In Before: %s \
+ \n Expected Out: %s Incoming Left: %s \
+ \n Stock Simulation: %s Minimum stock: %s') %(user.login, time.strftime('%Y-%m-%d %H:%M:%S'),
+ obj.period_id.name, obj.warehouse_forecast, obj.planned_outgoing, obj.stock_start, obj.to_procure,
+ obj.already_out, obj.already_in, obj.outgoing, obj.incoming, obj.outgoing_before, obj.incoming_before,
+ obj.outgoing_left, obj.incoming_left, obj.stock_simulation, obj.minimum_op)
}, context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
self.calculate_planning(cr, uid, ids, context)
prev_text = obj.history or ""
self.write(cr, uid, ids, {
- 'history': prev_text + _('Requisition (') + str(user.login) + ", " + time.strftime('%Y.%m.%d %H:%M) ') + str(obj.incoming_left) + \
- " " + obj.product_uom.name + "\n",
+ 'history': _('%s Requisition (%s, %s) %s %s \n') % (prev_text, user.login, time.strftime('%Y.%m.%d %H:%M'),
+ obj.incoming_left, obj.product_uom.name)
})
+
return True
def internal_supply(self, cr, uid, ids, context, *args):
@@ -668,29 +670,31 @@
uom_qty, uom, uos_qty, uos = self._qty_to_standard(cr, uid, obj, context)
user = self.pool.get('res.users').browse(cr, uid, uid, context)
picking_id = self.pool.get('stock.picking').create(cr, uid, {
- 'origin': _('MPS(') + str(user.login) +') '+ obj.period_id.name,
- 'type': 'internal',
- 'state': 'auto',
- 'date': obj.period_id.date_start,
- 'move_type': 'direct',
- 'invoice_state': 'none',
- 'company_id': obj.company_id.id,
- 'note': _("Pick created from MPS by user: ") + str(user.login) + _(" Creation Date: ") + \
- time.strftime('%Y-%m-%d %H:%M:%S') + \
- _("\nFor period: ") + obj.period_id.name + _(" according to state:") + \
- _("\n Warehouse Forecast: ") + str(obj.warehouse_forecast) + \
- _("\n Initial Stock: ") + str(obj.stock_start) + \
- _("\n Planned Out: ") + str(obj.planned_outgoing) + _(" Planned In: ") + str(obj.to_procure) + \
- _("\n Already Out: ") + str(obj.already_out) + _(" Already In: ") + str(obj.already_in) + \
- _("\n Confirmed Out: ") + str(obj.outgoing) + _(" Confirmed In: ") + str(obj.incoming) + \
- _("\n Planned Out Before: ") + str(obj.outgoing_before) + _(" Confirmed In Before: ") + \
- str(obj.incoming_before) + \
- _("\n Expected Out: ") + str(obj.outgoing_left) + _(" Incoming Left: ") + str(obj.incoming_left) + \
- _("\n Stock Simulation: ") + str(obj.stock_simulation) + _(" Minimum stock: ") + str(obj.minimum_op),
+ 'origin': _('MPS(%s) %s') %(user.login, obj.period_id.name),
+ 'type': 'internal',
+ 'state': 'auto',
+ 'date': obj.period_id.date_start,
+ 'move_type': 'direct',
+ 'invoice_state': 'none',
+ 'company_id': obj.company_id.id,
+ 'note': _('Pick created from MPS by user: %s Creation Date: %s \
+ \nFor period: %s according to state: \
+ \n Warehouse Forecast: %s \
+ \n Initial Stock: %s \
+ \n Planned Out: %s Planned In: %s \
+ \n Already Out: %s Already In: %s \
+ \n Confirmed Out: %s Confirmed In: %s \
+ \n Planned Out Before: %s Confirmed In Before: %s \
+ \n Expected Out: %s Incoming Left: %s \
+ \n Stock Simulation: %s Minimum stock: %s ')
+ % (user.login, time.strftime('%Y-%m-%d %H:%M:%S'), obj.period_id.name, obj.warehouse_forecast,
+ obj.stock_start, obj.planned_outgoing, obj.to_procure, obj.already_out, obj.already_in,
+ obj.outgoing, obj.incoming, obj.outgoing_before, obj.incoming_before,
+ obj.outgoing_left, obj.incoming_left, obj.stock_simulation, obj.minimum_op)
})
move_id = self.pool.get('stock.move').create(cr, uid, {
- 'name': _('MPS(') + str(user.login) +') '+ obj.period_id.name,
+ 'name': _('MPS(%s) %s') %(user.login, obj.period_id.name),
'picking_id': picking_id,
'product_id': obj.product_id.id,
'date': obj.period_id.date_start,
@@ -712,8 +716,8 @@
prev_text = obj.history or ""
pick_name = self.pool.get('stock.picking').browse(cr, uid, picking_id).name
self.write(cr, uid, ids, {
- 'history' : prev_text + _('Pick List ')+ pick_name + " (" + str(user.login) + ", " + time.strftime('%Y.%m.%d %H:%M) ') \
- + str(obj.incoming_left) +" " + obj.product_uom.name + "\n",
+ 'history': _('%s Pick List %s (%s, %s) %s %s \n') % (prev_text, pick_name, user.login, time.strftime('%Y.%m.%d %H:%M'),
+ obj.incoming_left, obj.product_uom.name)
})
return True
Follow ups