← Back to team overview

openerp-india team mailing list archive

[Bug 960201] Re: [6.1] Sequence number_next gives invalid feedback since new implementation

 

You're right, the Postgres-backed sequence implementation does not
currently update its "next number", because updating the corresponding
"ir.sequence" row with the new next_number value would make it subject
to the same limitations and concurrency bottlenecks as the "no_gap"
implementation.

We should probably replace the next_number field with a function field
that queries the Postgres sequence on-demand if the sequence is of
`standard` type, and reads it from the database for "no_gap" ones  (also
taking care of `update` operations like it is done now).

Any contributed patches are welcome, by the way :-)

Thanks for reporting!

** Changed in: openobject-server
   Importance: Undecided => Low

** Changed in: openobject-server
       Status: New => Confirmed

** Changed in: openobject-server
     Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/960201

Title:
  [6.1] Sequence number_next gives invalid feedback since new
  implementation

Status in OpenERP Server:
  Confirmed

Bug description:
  A "new" sequence implementation named "standard" is using the pgsql built-in sequence.
  The "Next Number" value is incorrect because not updated when the built-in one is ('ir_sequence_%03d').

  To reproduce:

  [PURCHASES] -> [Purchase Management] -> [Purchase Orders] -> [Create]: PO00001
  [PURCHASES] -> [Purchase Management] -> [Purchase Orders] -> [Create]: PO00002
  [PURCHASES] -> [Purchase Management] -> [Purchase Orders] -> [Create]: PO00003
  [PURCHASES] -> [Purchase Management] -> [Purchase Orders] -> [Create]: PO00004

  [SETTINGS] -> [Configuration] -> [Sequences & Identifiers] ->
  [Sequences]: Purchase Order with Next Number = 1 (should be 5)

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/960201/+subscriptions


References