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

Proposed by Sébastien BEAU - http://www.akretion.com
Status: Merged
Merged at revision: 106
Proposed branch: lp:~akretion-team/banking-addons/bank-statement-reconcile-70-uniq-name
Merge into: lp:banking-addons/bank-statement-reconcile-70
Diff against target: 15 lines (+5/-0)
1 file modified
account_statement_ext/statement.py (+5/-0)
To merge this branch: bzr merge lp:~akretion-team/banking-addons/bank-statement-reconcile-70-uniq-name
Reviewer Review Type Date Requested Status
Joël Grand-Guillaume @ camptocamp code review, no tests Approve
Omar (Pexego) code review Approve
Frederic Clementi - Camptocamp functionnal Approve
Nicolas Bessi - Camptocamp Pending
Guewen Baconnier @ Camptocamp Pending
Review via email: mp+197777@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi,

Thanks for the contrib ! In fact, I agree with you, but I'd rather prefer a unique name BY COMPANY.

Would you please change the constraint ?

Thanks,

Joël

review: Needs Fixing (code review, no tests)
104. By Sébastien BEAU - http://www.akretion.com

[FIX] fix uniq name constraint, should work in multi-company

Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

Fixed! Thanks for the review

Revision history for this message
Frederic Clementi - Camptocamp (frederic-clementi) wrote :

Very good idea. So far bank statement name was pretty useless. so it makes definitely sens to me and easy to reconcile processe for e-commerce flow for ex.

review: Approve (functionnal)
Revision history for this message
Omar (Pexego) (omar7r) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

LGTM now, thanks !

review: Approve (code review, no tests)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_statement_ext/statement.py'
2--- account_statement_ext/statement.py 2013-10-16 08:58:12 +0000
3+++ account_statement_ext/statement.py 2013-12-11 16:01:21 +0000
4@@ -111,6 +111,11 @@
5 _constraints = [
6 (_check_partner, "You need to put a partner if you tic the 'Force partner on bank move'!", []),
7 ]
8+
9+ _sql_constraints = [
10+ ('name_uniq', 'unique (name, company_id)', 'The name of the bank statement must be unique !')
11+ ]
12+
13
14
15 class AccountBankSatement(Model):

Subscribers

People subscribed via source and target branches