← Back to team overview

magentoerpconnect-community team mailing list archive

Re: payment management

 

Hello Jordi

I am working with Raphael and I have some question for you.

Firstly thank you for all of your contribution in the magento connector.

I am currently looking after the module payment and sale_payment
Firstly we found your idea to configure how the sales orders are generated
is good ;)
Now I have some questions (see at the end of the mail) to understand exactly
how your solution works

------------------------------

> Hello Raphaël,
>
> I was waiting your mail since two weeks ago, this commit is old, so I
> suppose you were glad with it. I think that it is a good contribution, I
> argue in your email:
>
> En/na Raphaël Valyi ha escrit:
>
>> Hello Jordi,
>>
>> We thank you very much for all your contributions but I should say I don't
>> feel very comfortable with one of your commit:
>>
>> http://bazaar.launchpad.net/~openlabs-akretion-consortium/magentoerpconnect/magentoerpconnect_generic/revision/288<http://bazaar.launchpad.net/%7Eopenlabs-akretion-consortium/magentoerpconnect/magentoerpconnect_generic/revision/288><
>> http://bazaar.launchpad.net/%7Eopenlabs-akretion-consortium/magentoerpconnect/magentoerpconnect_generic/revision/288
>> >
>>
>>
>> So you add a dependency upon "account_payment" and seems to use it a bit
>> like we currently use statement for customers payments (I'm not sure I get
>> it all, but it seems that this is the big picture).
>>
> Well, not exactly. You can create account statement in different journals
> to encode the several payments types, but you lose the payment type
> information in invoices and sale orders. Yes, you can optionally install
> sale_payment module (depends on account_payment) to add the payment type in
> sale orders; this payment type then is flushed to the invoices. If you look
> inside the code of this commit, you'll see it checks if sale_payment module
> is installed or not.
>

>
account_payment (official module) and sale_payment (addons extra module)
> help a lot to control the payment type in sales and invoices. All the
> Spanish companies use them.
>
>
>
>> The reason why I'm not sure this is good is:
>> - we already deal with customers payments by making a statement on the
>> proper journal thanks to the sale_order#generate_payment_with_pay_code
>> method brought by the base_sale_multichannels module. It might not be very
>> sophisticated but it looks it cover everything Magento do in relation with
>> payments (or do I miss something?)
>>
> This is Ok for prepaid payments like paypal or credit card. With postpaid
> payments it is not good because the account statement will not be created.
> In postpaid payments is better to encode a payment type entity in the sale
> order and invoice. I think that having payment type entities in OpenERP will
> help Magento users.
>
>  ---------------------------------

I totally agree with you that in the sale order payment type is needed, but
we already do that without your contribution. Indeed, for each sale order we
map the payment type in the field sale_order.magento_payment_method (this
field is always filled independently of the fact of generating a statement
or not) .  And as you can see in the list of the sale order there is a row
called "magento payment method" which give this info. I know that this field
didn't exist in the object invoice but I think if some customer really need
it can be added without depending of other module.

So can you give me more info about the module payment and sale_payment?

I give you here some explication about the basic function :
generate_payment_with_pay_code implanted by default in openerp

This function can allow you to create a payment in draft, validate or no
one.
For example, for one of our customers (with kettle and terminatooor in order
to connect os-commerce) we use this function to create :
- a draft payment if the customer pay with a check (which be validated when
the company will receive it)
- a validated payment if the customer pay by card
- and no one if the customer pay by transfer (it will be created directly
when we import the bank statement)

For the moment it's not possible to set statement state according to the
payment type in the magento connector because we didn't have the time to do
it. But we could eventually implement it for one of our customers, and now
as you already implemented a new object (magerp_sale_shop_payment_type) to
configure how the sales orders are generated we could easily extract it and
add an option to select the way to generate the payment. But nothing I
decided because may be I didn't understand exactly which is the advantage of
using the payment module.
What do you think about that?

If you want we can speak about it on IRC/skype (akretion.live) also if you
have some documentation about payment module in spanish (I speak spanish) or
english you can send it.

Regards

I also fix correctly in rev 297 the bug with last_products_exported_date for
exporting the catalog.

BEAU Sébastien

www.akretion.com

Follow ups

References