openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06817
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-781585-ara into lp:openobject-addons
Ashvin Rathod (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-781585-ara into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #781585 in OpenERP Addons: "[PS] Error when typing unsupported character in a recurring model and generating the entries"
https://bugs.launchpad.net/openobject-addons/+bug/781585
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-781585-ara/+merge/61088
Hello,
Fix: Error when typing unsupported character in a recurring model and generating the entries
Thanks,
ara
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-781585-ara/+merge/61088
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-781585-ara.
=== modified file 'account/wizard/account_use_model.py'
--- account/wizard/account_use_model.py 2011-01-27 06:32:26 +0000
+++ account/wizard/account_use_model.py 2011-05-16 10:13:23 +0000
@@ -63,7 +63,10 @@
else:
data_model = account_model_obj.browse(cr, uid, context['active_ids'], context=context)
for model in data_model:
- entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%d')}
+ try:
+ entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%d')}
+ except Exception, e:
+ raise osv.except_osv(_('Warning'), _('Incomplete model name format: %s !') % (str(e)))
period_id = account_period_obj.find(cr, uid, context=context)
if not period_id:
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
Follow ups