Merge lp:~openerp-dev/openobject-addons/6.1-opw-577601-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6937
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577601-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 23 lines (+5/-1)
1 file modified
stock/stock.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-577601-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+118545@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577601-port-mma/+merge/134893 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6937. By Somesh Khare

[FIX]picking_log: date format in the created log for deliveries and receptions are wrong(Case: Ref 577601)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
1333 if context is None:1333 if context is None:
1334 context = {}1334 context = {}
1335 data_obj = self.pool.get('ir.model.data')1335 data_obj = self.pool.get('ir.model.data')
1336 lang_obj = self.pool.get('res.lang')
1337 user_lang = self.pool.get('res.users').browse(cr, uid, uid, context=context).context_lang
1338 lang_ids = lang_obj.search(cr, uid, [('code','like',user_lang)])
1339 date_format = lang_obj.browse(cr, uid, lang_ids[0], context=context).date_format
1336 for pick in self.browse(cr, uid, ids, context=context):1340 for pick in self.browse(cr, uid, ids, context=context):
1337 msg=''1341 msg=''
1338 if pick.auto_picking:1342 if pick.auto_picking:
@@ -1349,7 +1353,7 @@
1349 }1353 }
1350 message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "1354 message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "
1351 if pick.min_date:1355 if pick.min_date:
1352 msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%m/%d/%Y')1356 msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime(date_format)
1353 state_list = {1357 state_list = {
1354 'confirmed': _('is scheduled %s.') % msg,1358 'confirmed': _('is scheduled %s.') % msg,
1355 'assigned': _('is ready to process.'),1359 'assigned': _('is ready to process.'),