Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !1617

wip: erp5_accounting: invoice number should be continuous

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed Xiaowu Zhang requested to merge xiaowu.zhang/erp5:invoice_number into master May 06, 2022
  • Overview 9
  • Commits 1
  • Pipelines 0
  • Changes 1

if use uid IdGenerator, we may have incontinuous invoice number, but it seems it's very important to have continuous one.

the following scenario can reproduce error(in theory):

  1. System call this script when user confirm invoice transaction, an invoice number is generated by portal_ids.generateNewId
  2. If somehow this script ends with database conflit error
  3. This script is called again, a new invoice number is geneated again

And uid IdGenerator use non_continuous_integer_increasing, there has no guarantee for continuous

Capture_d_écran_du_2022-05-06_11-55-34

Edited May 06, 2022 by Xiaowu Zhang
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: invoice_number
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7