← Back to team overview

banking-addons-team team mailing list archive

lp:~akretion-team/banking-addons/bank-statement-reconcile-70-uniq-name into lp:banking-addons/bank-statement-reconcile-7.0

 

Sébastien BEAU - http://www.akretion.com has proposed merging lp:~akretion-team/banking-addons/bank-statement-reconcile-70-uniq-name into lp:banking-addons/bank-statement-reconcile-7.0.

Requested reviews:
  Guewen Baconnier @ Camptocamp (gbaconnier-c2c)

For more details, see:
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-uniq-name/+merge/197777

When you import bank statement automatically it's great to avoid duplicated bank statement so having a constainte on the name can be a good solution.
Now the question is "the name  should be uniq by default?". If no, I will create a specific module for that.

Thanks
-- 
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-uniq-name/+merge/197777
Your team Banking Addons Core Editors is subscribed to branch lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_statement_ext/statement.py'
--- account_statement_ext/statement.py	2013-10-16 08:58:12 +0000
+++ account_statement_ext/statement.py	2013-12-04 18:12:34 +0000
@@ -111,6 +111,11 @@
     _constraints = [
         (_check_partner, "You need to put a partner if you tic the 'Force partner on bank move'!", []),
     ]
+    
+    _sql_constraints = [
+        ('name_uniq', 'unique (name)', 'The name of the bank statement must be unique !')
+    ]
+
 
 
 class AccountBankSatement(Model):


Follow ups