thaond / magento-openerp-smile-synchro

Automatically exported from code.google.com/p/magento-openerp-smile-synchro
0 stars 0 forks source link

A small change #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I use shipping cost with tax! 
Now the tax_id is still empty when importing the shipping line.

Maybe you would consider changing it to:

            self.pool.get('sale.order.line').create(cr, uid, {

                    'product_id': ship_product_id[0],

                    'name': ship_product.name,

                    'order_id': order_id,

                    'product_uom': ship_product.uom_id.id,

                    'product_uom_qty': 1,

                    'price_unit': so['shipping_amount'],
                    'tax_id' : [(6, 0, [x.id for x in ship_product.taxes_id])]
 # extra, in case shippingcost are inclusive VAT/TAX
            }) 

Kind regards,

Peter

Original issue reported on code.google.com by PeterDap...@gmail.com on 4 Jun 2009 at 7:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Extra info:  you schould alter the product SHIP and make it a product with tax.

Now the module finds the tax (  'tax_id' : [(6, 0, [x.id for x in 
ship_product.taxes_id])]). And the according shipping-cost on the invoices 
in OpenERP will be calculated with that tax.

You should also tell magento (configuration->Sales->tax)  that the 
shipping/delivery are in a certain tax group.
So the calculated total on the site is the same as in OpenERP.

Original comment by PeterDap...@gmail.com on 16 Jun 2009 at 7:15