• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OCA / server-tools / 7782
80%
9.0: 86%

Build:
Build:
LAST BUILD BRANCH: 13_add_base_changeset
DEFAULT BRANCH: 9.0
Ran 03 Dec 2019 06:06PM UTC
Jobs 4
Files 146
Run time 6min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
7782

Pull #1728

travis-ci

web-flow
[ADD] ir_sequence_standard_default: Use Standard instead No Gap sequence

Set the implementation to "Standard" in all your current Sequences
(ir.sequence) and all new sequences are created as "Standard" by default
instead of "No Gap" implementation.

**What's the problem Sequences with "No Gap" Implementation?**

"No Gap" is the default value of sequences in Odoo. However, this kind of
sequences cause more locks and can turn a database slow.

Taking as example an invoice, if you assign an invoice number to one record,
but it sill not finish the process, this process must end in order to another
invoice could assign a new number and there was no gaps between the invoice
numbers. It seems to be good at first sight. But the problem start when there
is and chained process.

Imagine that there is one user that executes a process that produces 100
invoices and these at the same time produces 100 journal entries that also use
a consecutive (no gap) sequence. And also those invoices are sent to sign with
and external institution (that could take 2 seconds in giving a response
because of internet latency or server load), and maybe they made another
calculations that makes them to take 5 seconds more for each invoice, and all
this is chained to one single transaction. This means that for 8.5 minutes
anybody else could confirm invoices, neither journal entries of the involved
journals.

Now, think there is 20 users that have to execute a similar process. The
problem turns exponential. If another user comes to make an operation with the
same jornal it will thrown a concurrency failure.

You can mitigate it if you segment each transaction and don't chain them. It
means, making commit for each invoice or process. It reduces the
probability that there is a concurrency error or a lock wait. However, it still
not solve it completely.

**Why to use Sequences with "Standard" Implementation?**

If you use the standard sequence of PosgreSQL, it doesn't lock because at the... (continued)
Pull Request #1728: WIP: [ADD] ir_sequence_standard_default: Use Standard instead No Gap sequence

35 of 35 new or added lines in 2 files covered. (100.0%)

5511 of 6911 relevant lines covered (79.74%)

1.59 hits per line

Jobs
ID Job ID Ran Files Coverage
2 7782.2 (TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="database_cleanup") 03 Dec 2019 06:09PM UTC 0
80.04
Travis Job 7782.2
3 7782.3 (TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="database_cleanup") 03 Dec 2019 06:06PM UTC 0
78.42
Travis Job 7782.3
4 7782.4 (TESTS="1" ODOO_REPO="odoo/odoo" EXCLUDE="database_cleanup" MAKEPOT="1") 03 Dec 2019 06:12PM UTC 0
80.04
Travis Job 7782.4
5 7782.5 (TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="database_cleanup" MAKEPOT="1") 03 Dec 2019 06:09PM UTC 0
78.42
Travis Job 7782.5
Source Files on build 7782
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #7782
  • Pull Request #1728
  • PR Base - 12.0 (#7769)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc