I currently have this:
$line_array_product = array(
'order_id' => new xmlrpcval($erp_order_id, "int"),
'type' => new xmlrpcval('Product', "string"),
'product_id' => new xmlrpcval($erp_product_id, "int"),
'price_unit' => new xmlrpcval($total_price, "string"),
'product_uom_qty' => new xmlrpcval($details['product_quantity'], "string"),
'name' => new xmlrpcval(str_replace('+', ' ', urlencode($details['product_name'])), "string"),
'discount' => new xmlrpcval($reduction_rate_tax_excl, "string"),
'tax_id' => new xmlrpcval($erp_tax_id, "string"), ## <-- Problema aqui
'ecommerce_channel' => new xmlrpcval('prestashop', "string"),
);
I want to be able to pass the taxes to Odoo 9 but for some reason odoo is not receiving the data (odoo 9 native API).
I know that the tax_id can receive several ids but I'm not sure how...
If I'm not mistaken, the field
tax_id
of the tableorder_line_id
is of the typemany2many
, so try doing it this way:If you have a value:
If you have multiple values:
I would like to be more exact but I haven't used Odoo for a long time and I don't have examples at hand.
Here is what is indicated by their documentation:
You had to format it as requested by odoo like this: