openlabs / magento_integration

Magento OpenERP Integration
https://openerp-magento-connector.readthedocs.org/en/develop/
80 stars 77 forks source link

Invoice sync #107

Open schnere opened 11 years ago

schnere commented 11 years ago

Hi,

I did not see a function to sync invoices. Is there any plan to integrate this?

Thanks

sharoonthomas commented 11 years ago

@schnere How would you envision this integration to work ? Can you explain the expectations from this sync ?

schnere commented 11 years ago

@sharoonthomas Thanks for your fast answer.

I think, the module should check if an invoice is created anywhere. Or better trigger an event on invoice creation. Then the invoice data should be synced to the other system. So if an invoice is created in Magento, the Magento module should trigger invoice creation with the same data (possible partial invoicing) in OpenERP.

There are a few things to consider:

As OpenERP is the base financial system, all invoices should get there. But for orders placed in a Magento store, the customer would have the ability to see the invoice in his customer account. So there are also reasons to have invoices in Magento.

I might also be able to help on implementing this.

Best regards,

schnere

capitaine commented 11 years ago

I don't think this feature should be implemented this way. As said by schnere above, OpenERP is the ++main++ financial system. This means it can handle much more complex operations (financial or accounting) than Magento can do. Magento has a very simplified approach of accounting. For example, it creates systematically an invoice when registering an order with a valid payment. You may not wish to create an invoice in your accounting system at the ordering time but later when delivery is ready. Magento records every payment as a payment. In openErp (and in accounting science) a payment may be considered as a payment or as a deposit, it's not exactly the same. Also, you may differ the credit card payment some days till the order is prepared and ready for delivery. Or you may have to partially cancel an order or even create multiple invoices for a single order (if multiple deliveries when not all products of the order are available at the same time). So there are a lot of reasons for not creating automatically an invoice inside openErp when Magento creates one. From my point of view, synchronization of invoices should go the other way: from openErp to Magento. This would require an extension (Magento side) that would prevent magento to emit invoices up to OpenERP does it.

schnere commented 11 years ago

@capitaine You are right, the invoices should be generated in OpenERP and then synched back to Magento, so that the customer has the ability to see the invoice in his Magento customer account.

But tax sync should be fixed first, so that invoice would get correct tax settings.

shalabhaggarwal commented 11 years ago

The tax sync has been fixed for simple products and shipping (See #82 ).