Related branches

Related bugs

Sprints

Whiteboard

On OpenERP side, have a look at the l10n_ca module to get an idea of the tax complexity.
On the Magento side, you need to add 2 taxes:
- GST, Canada, *, 5%
- PST, Canada, QC, 8.5%
and 2 taxes rules:
- GST with priority 1
- PST with priority 2

== FROM Joël, Camptocamp ==
To solve this part, we miss something on the magento side : Giving the tax infos per sales lines. Currently, we don't know which tax has been applied by Magento. That means if more than one was, we're not able to find them. We need to add this info in the Magento API of the Sale Order.

== FROM Maxime, Savoir-faire Linux ==
Before trying to add this info in the API, couldn't we use the logic of OpenERP to apply the right taxes instead of trying to sync them? When we import orders, we set taxes from the ones defined in the product object of OpenERP and the fiscal position of the partner, regardless of the taxes Magento applied to the sales order line.

== FROM Joël, Camptocamp ==
I think we'll have trouble once this way... As the tax management and rules system are completely different on both side (Magento & OpenERP), we'll have a lot of trouble to ensure that both compute the same value in all cases. IMHO the only good solution is to add a mapping of taxes object between OERP & Magento (like it's done for all other object, like partner, sales order, product,...). To achieve that, we'll need the API to give us the tax applied per line. It's not a big job on the Magento side, but it'll need to be done.

== FROM Joël, Camptocamp ==
Unfortunately, I can't help you on the magento side :( I'll try to ask a friend about it. But thanks to starts this ! We gonna have that well designed.

== FROM Mohammed, Dacrydium ==
For each order placed in Magento, information concerning tax (order_id, amount, percentage, code,...) is stored in the table 'sales_order_tax'.
You'll need to create a custom module which extends the magento Api and add a new function which returns those information based on order_id
to do so you can actually follow the instructions in the tutorial mentioned in your previous post : http://www.magentocommerce.com/wiki/doc/webservices-api/custom-api?

== FROM Maxime, Savoir-faire Linux ==
Along with Sébastien Beau from Akretion, we decided to use OpenERP logic to apply the right taxes (account_fiscal_position_rule_sale : http://apps.openerp.com/addon/1690). When we import orders, we compare total_amount and if different, we raise an exception.

We have a customer running this solution for quite a while (~50 orders) and it is working well (no exception so far). So I am closing this blueprint.