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
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-08-07 10:04:35 +0000
3+++ stock/stock.py 2012-08-07 12:31:42 +0000
4@@ -1333,6 +1333,10 @@
5 if context is None:
6 context = {}
7 data_obj = self.pool.get('ir.model.data')
8+ lang_obj = self.pool.get('res.lang')
9+ user_lang = self.pool.get('res.users').browse(cr, uid, uid, context=context).context_lang
10+ lang_ids = lang_obj.search(cr, uid, [('code','like',user_lang)])
11+ date_format = lang_obj.browse(cr, uid, lang_ids[0], context=context).date_format
12 for pick in self.browse(cr, uid, ids, context=context):
13 msg=''
14 if pick.auto_picking:
15@@ -1349,7 +1353,7 @@
16 }
17 message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "
18 if pick.min_date:
19- msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%m/%d/%Y')
20+ msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime(date_format)
21 state_list = {
22 'confirmed': _('is scheduled %s.') % msg,
23 'assigned': _('is ready to process.'),