Merge lp:~openerp-community-committers/openobject-addons/5.0-bugfix_671172 into lp:~openerp-community-committers/openobject-addons/5.0

Proposed by Jan Verlaan
Status: Needs review
Proposed branch: lp:~openerp-community-committers/openobject-addons/5.0-bugfix_671172
Merge into: lp:~openerp-community-committers/openobject-addons/5.0
Diff against target: 12 lines (+1/-1)
1 file modified
stock/wizard/wizard_return.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-community-committers/openobject-addons/5.0-bugfix_671172
Reviewer Review Type Date Requested Status
Jan Verlaan (community) Approve
Joël Grand-Guillaume @ camptocamp Approve
Review via email: mp+41188@code.launchpad.net

Description of the change

As of version 5.0.8 the returnpacking number contains the hardcoded part in it's number "(return)
See addons/stock/wizard/wizard_return.py line 83
            new_picking = pick_obj.copy(cr, uid, pick.id, {'name':'%s (return)' % pick.name,
                    'move_lines':[], 'state':'draft', 'type':new_type,
                    'date':date_cur, 'invoice_state':data['form']['invoice_state'],})

This does greatly enhance the visibility, but has a side effect when the number is used for internal barcode (EAN13) generation.
The "(" and ")" signs are used for start/end char in the barcode generation, hence the generations fails.

Fix is to rename the part of {'name':'%s (return)' to {'name':'%s -return'

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) :
review: Approve
Revision history for this message
Omar (Pexego) (omar7r) wrote :

Approve. But, Could we translate this statement with _(%s -return)?

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

> Approve. But, Could we translate this statement with _(%s -return)?
Hmmm, good question as it popup a general question about translations for this community branch. As far I can oversee we are not able to sync translations with openerp's MC branch. So how could we deal with eventually needed translations in general?
If that question can be answered we can also answer your question.

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Do the merge from MC branch will not update the translation ? We'll need to merge the MC branch to forbid too much differences, so IMHO we'll probably won't have to care about that for a first step.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :

I think marking it as translatable won't hurt. Even if we eventually don't translate it in our language.

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

> I think marking it as translatable won't hurt. Even if we eventually don't
> translate it in our language.
Agree, I will make the change so we can merge it at once.

review: Needs Fixing
2882. By Jan Verlaan

[FIX] stock module: barcode generation with return pickings corrected and make return name translatable

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Ok, maked it translatable too. Line reads now;

new_picking = pick_obj.copy(cr, uid, pick.id, {'name':_('%s -return') % pick.name,

review: Approve

Unmerged revisions

2882. By Jan Verlaan

[FIX] stock module: barcode generation with return pickings corrected and make return name translatable

2881. By Jan Verlaan

[FIX] stock module: barcode generation with return pickings corrected

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/wizard/wizard_return.py'
2--- stock/wizard/wizard_return.py 2010-07-30 12:15:44 +0000
3+++ stock/wizard/wizard_return.py 2010-11-20 10:14:13 +0000
4@@ -80,7 +80,7 @@
5 new_type='out'
6 else:
7 new_type='internal'
8- new_picking = pick_obj.copy(cr, uid, pick.id, {'name':'%s (return)' % pick.name,
9+ new_picking = pick_obj.copy(cr, uid, pick.id, {'name':_('%s -return') % pick.name,
10 'move_lines':[], 'state':'draft', 'type':new_type,
11 'date':date_cur, 'invoice_state':data['form']['invoice_state'],})
12 new_location = move.location_dest_id.id

Subscribers

People subscribed via source and target branches