Somesh Khare(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-577601-skh into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577601-skh/+merge/118545
Hello Sir,
[FIX]picking_log: date format in the created log for deliveries and receptions
are wrong
Steps to reproduce:
1. Create a user and select user lang(Eg: Dutch).
2. Change the Date format as %d/%m/%Y.
3. Now confirm a sale order or confirm the Reception of PO, Now check the date
format of the created logs.
This branch fixes this issue.
Kindly review the branch and please share your views on it.
Thanks,
Somesh Khare
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577601-skh/+merge/118545
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-577601-skh.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-08-07 10:04:35 +0000
+++ stock/stock.py 2012-08-07 12:31:42 +0000
@@ -1333,6 +1333,10 @@
if context is None:
context = {}
data_obj = self.pool.get('ir.model.data')
+ lang_obj = self.pool.get('res.lang')
+ user_lang = self.pool.get('res.users').browse(cr, uid, uid, context=context).context_lang
+ lang_ids = lang_obj.search(cr, uid, [('code','like',user_lang)])
+ date_format = lang_obj.browse(cr, uid, lang_ids[0], context=context).date_format
for pick in self.browse(cr, uid, ids, context=context):
msg=''
if pick.auto_picking:
@@ -1349,7 +1353,7 @@
}
message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "
if pick.min_date:
- msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%m/%d/%Y')
+ msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime(date_format)
state_list = {
'confirmed': _('is scheduled %s.') % msg,
'assigned': _('is ready to process.'),
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp