Merge lp:~openerp-dev/openobject-addons/6.1-opw-576027-han into lp:openobject-addons/6.1

Proposed by Hardik Ansodariya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6810
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-576027-han
Merge into: lp:openobject-addons/6.1
Diff against target: 37 lines (+7/-2)
2 files modified
sale/sale.py (+7/-1)
stock/__openerp__.py (+0/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-576027-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+111353@code.launchpad.net

Description of the change

Hello,

I have update context in onchange_pricelist_id method of sale.py as it raised warning was not able to translate.

Thanks

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-576027-port-mma/+merge/132695 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

6810. By Hardik Ansodariya (OpenERP)

[FIX] sale: Update context as it was none in method and was not able to translate raised exception (Maintanence Case: 576027)

6809. By Hardik Ansodariya (OpenERP)

[FIX] sale: Update context as it was none in method and was not able to translate raised exception (Maintanence case: 575807)

6808. By Hardik Ansodariya (OpenERP)

[IMP] Removed the string [Different inventory methods (FIFO, LIFO, ...)] from description as FIFO and LIFO methos is not available in current version of OpenERP

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2012-02-16 16:52:53 +0000
3+++ sale/sale.py 2012-06-21 07:30:29 +0000
4@@ -327,6 +327,7 @@
5 return True
6
7 def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context={}):
8+ context.update({'lang': self.pool.get('res.users').context_get(cr, uid, context)['lang']})
9 if (not pricelist_id) or (not order_lines):
10 return {}
11 warning = {
12@@ -646,7 +647,12 @@
13 return True
14
15 def action_wait(self, cr, uid, ids, context=None):
16- for o in self.browse(cr, uid, ids):
17+ if context is None:
18+ context = {}
19+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
20+ if user.context_lang:
21+ context.update({'lang':user.context_lang})
22+ for o in self.browse(cr, uid, ids, context=context):
23 if not o.order_line:
24 raise osv.except_osv(_('Error !'),_('You cannot confirm a sale order which has no line.'))
25 if (o.order_policy == 'manual'):
26
27=== modified file 'stock/__openerp__.py'
28--- stock/__openerp__.py 2012-01-31 13:36:57 +0000
29+++ stock/__openerp__.py 2012-06-21 07:30:29 +0000
30@@ -30,7 +30,6 @@
31
32 Thanks to the double entry management, the inventory controlling is powerful and flexible:
33 * Moves history and planning,
34- * Different inventory methods (FIFO, LIFO, ...)
35 * Stock valuation (standard or average price, ...)
36 * Robustness faced with Inventory differences
37 * Automatic reordering rules (stock level, JIT, ...)