← Back to team overview

openerp-india team mailing list archive

[Bug 1094227] [NEW] [6.1 / 7.0 / trunk] bank statements with the duplicate numbers

 

Public bug reported:

I tested this with 6.1 and 7.0 but it probably applies to 6.0 and trunk
too.

When the user creates a bank statement, he can assign the bank statement
number manually. When the bank statement is confirmed, the generated
accounting entries are derived from the bank statement number by
appending /+number. There is no constraint preventing two bank
statements to have the same number, therefore it becomes possible to
have journal entries with the same number too.

How to reproduce:
- 7.0 with demo data
- create a bank statement with one item and give it the name BS1 (instead of the default /)
- create a second bank statement with on item and give it the same name BS1 (instead of the default /)
- confirm both bank statements
-> two accounting entries with the same number BS1/1 are generated

Proposed fix: add the following constraint on account_bank_statement:

    _sql_constraints = [
        ('name_journal_uniq', 'unique (name,journal_id)', 'The name of the Bank Statement must be unique per journal !')
    ]

-sbi

** Affects: openobject-addons
     Importance: Undecided
         Status: New

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

Title:
  [6.1 / 7.0 / trunk] bank statements with the duplicate numbers

Status in OpenERP Addons (modules):
  New

Bug description:
  I tested this with 6.1 and 7.0 but it probably applies to 6.0 and
  trunk too.

  When the user creates a bank statement, he can assign the bank
  statement number manually. When the bank statement is confirmed, the
  generated accounting entries are derived from the bank statement
  number by appending /+number. There is no constraint preventing two
  bank statements to have the same number, therefore it becomes possible
  to have journal entries with the same number too.

  How to reproduce:
  - 7.0 with demo data
  - create a bank statement with one item and give it the name BS1 (instead of the default /)
  - create a second bank statement with on item and give it the same name BS1 (instead of the default /)
  - confirm both bank statements
  -> two accounting entries with the same number BS1/1 are generated

  Proposed fix: add the following constraint on account_bank_statement:

      _sql_constraints = [
          ('name_journal_uniq', 'unique (name,journal_id)', 'The name of the Bank Statement must be unique per journal !')
      ]

  -sbi

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


Follow ups

References