banking-addons-drivers team mailing list archive
-
banking-addons-drivers team
-
Mailing list archive
-
Message #00062
Re: account_payment_extension
Le 21/02/2014 11:00, Alexis de Lattre a écrit :
1) the name of the module : I propose "account_partner_payment"
2) the dependancies : this module would only depend on the module
account_payment from the official addons
3) the datamodel : here are the additionnal fields that would be
provided by that module :
- 2 field.property : customer_payment_mode and supplier_payment_mode,
which would be a many2one to payment.mode (in
account_payment_extension, the field points to payment.type, but I
find this strange, no ?)
- 1 field on account.invoice : payment_mode_id, which would be a
many2one to payment.mode (again, in account_payment_extension, the
field points to payment.type !)
4) then, we would need to have a way to filter on the payment mode of
the invoice when we select the invoices to pay. Does that mean that
"account_banking_payment_export" would declare a dependancy on
"account_partner_payment" ?
I started the implementation... that's the best way to fine-tune the ideas !
In fact, account_payment_extension comes with 2 other modules :
sale_payment (depends on sale + account_payment_extension) and
purchase_payment (depends on purchase + account_payment_extension).
These 2 modules copy payment mode/type and bank account from partner to
sale/purchase.order, and then copy it to the invoice. I think we also
need that. So I'll add 2 other modules :
- account_payment_sale
- account_payment_purchase
(the initial one would probably be renamed "account_payment_partner", to
keep the naming logic)
About point 3) in my first mail, I initially proposed to have the
many2one fields point to payment.mode instead of payment.type. I think I
understand why account_payment_extension points to payment.type : if you
consider that your company has 2 bank accounts A and B : they sometimes
pay their suppliers from account A, sometimes from account B, depending
on the situation of each bank account. As they have 2 bank accounts,
they have 2 payment modes for wire transfer... but they could share the
same account type "wire transfer". In this case, we would prefer to have
the many2one fields point to account.type, so that it is independant
from the bank account that will be used for the payment.
Note : if the 2 banks use 2 different versions of SEPA PAIN, then we'll
have 2 different payment types... bad luck ! But maybe we could change
that in the future and have 1 payment type for "pain.001.001.xx" and
store the xx on the payment.mode.
So, to conclude on point 3), I think it's better if we point to
payment.type (and NOT payment.mode).
--
Alexis de Lattre
Follow ups
References