Merge lp:~openerp-dev/openobject-server/6.1-opw-581437-skh into lp:openobject-server/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 4297
Proposed branch: lp:~openerp-dev/openobject-server/6.1-opw-581437-skh
Merge into: lp:openobject-server/6.1
Diff against target: 11 lines (+1/-0)
1 file modified
openerp/addons/base/ir/ir_sequence.py (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.1-opw-581437-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+133204@code.launchpad.net

Description of the change

Hello Sir,

[FIX]ir_sequence : Next number not updated when selection field implementation set as standard

Steps:
1. change the selection field implementation as "standard" for any sequence. eg: Sales Order
2. set the next number fields as 1.
3. Create a new Sales Order and see the Sale Sequence, it will be SO001 now Open Sale Order sequence from menu "Settings/Configuration/Sequences & Identifiers/Sequences" and look at the next number field.
4. It is still as 1 where it should be according to the "increment number" field.

This branch fixes this issue.

Kindly review the branch and please share your views with us.

Thanks & Regards,
Somesh Khare

To post a comment you must log in.
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-server/trunk-opw-581437-port-kbh/+merge/138386 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

4297. By Somesh Khare

[FIX]ir_sequence : Next number not updated when selection field implementation set as standard (Case: Ref 581437)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/ir/ir_sequence.py'
2--- openerp/addons/base/ir/ir_sequence.py 2012-01-24 11:47:30 +0000
3+++ openerp/addons/base/ir/ir_sequence.py 2012-11-07 10:07:19 +0000
4@@ -200,6 +200,7 @@
5 if seq['implementation'] == 'standard':
6 cr.execute("SELECT nextval('ir_sequence_%03d')" % seq['id'])
7 seq['number_next'] = cr.fetchone()
8+ cr.execute("UPDATE ir_sequence SET number_next=number_next+number_increment WHERE id=%s ", (seq['id'],))
9 else:
10 cr.execute("SELECT number_next FROM ir_sequence WHERE id=%s FOR UPDATE NOWAIT", (seq['id'],))
11 cr.execute("UPDATE ir_sequence SET number_next=number_next+number_increment WHERE id=%s ", (seq['id'],))