On 27 juin, 10:53, sampac <*[email protected]> wrote:
> On 26 juin, 18:17, Rom1 <[email protected]> wrote:
>
>
>
>
>
>
>
>
>
> > On Tue, Jun 26, 2012 at 5:14 PM, sampac <*[email protected]> wrote:
>
> > > I did something here:https://github.com/sampaccoud/tryton-bank
>
> > > So if we want to allow storing different numbers for a same bank
> > > account I can refactor to make a separate object for the bank number.
> > > Then we can add several account numbers to a bank account.
>
> > > But I don't think it is necessary because a given bank account only
> > > works with a given number. RIB and IBAN are just the same thing with a
> > > different checksum...
>
> > > The way I did the account number is very generic and we can write as
> > > many methods to validate and split the account number depending on the
> > > country case...
>
> > > Looking forward to your comments / pull requests.
>
> > Very nice job, much better than what I did.
>
> Thanks, I built on yours ;-)
>
> > Just a few comments :
> > BankAccount
> > Who is "party" ? The owner or the bank agency (because I don't
> > understand the domain on the address).  For me, you have the party
> > (the owner), the bank agency (party.bank), the address (with domain on
> > the bank agency).
>
> Ok let me refactor and propose something like this.
>
> > The RIB key could be calculated with stdnum.iso7064.mod_97_10
>
> A bit overkill ? It's just 15 lines of code so maybe we keep it like
> this ?
>
> > Bank
> > Why is it an inherit of address and not of party?
> > The bank code shouldn't it be stored in parent of the bank?
> > I think there is not one BIC per agency, but you have one BIC for
> > several agency within the same region.
>
> bank code: I will propose a parent on bank which will be a inherit of
> party (same scheme as "company.company" in fact). Bank code will be
> available with required = false.
> BIC : the field is not marked as unique so should be ok.


Here is a new version : https://github.com/sampaccoud/trytond_bank

I think there still misses a field "bank_address" on the bank_account
object to identify which one of the bank's addresses is registered for
this bank account:
so we will have on the bank_account object:

        bank = fields.Many2One("bank.bank", "Bank")
        bank_address = fields.Many2One("party.address", "Bank
address")

But I couldn't figure out what domain to set on the bank_address to
filter only addresses from the related bank object. I thought it
should look something like:

        domain = [('party', '=', Eval('_parent_bank').get('party'))]

But it didn't work... probably because of the inherit on bank.bank :-
( or am I missing something ?

-- 
-- 
[email protected] mailing list



Reply via email to