I am using the following PHP code to create a new invoice via webservice API
$id = $models->execute_kw($db, $uid, $password,'res.partner', 'create',array($datos_cliente));
$invoice_id = $models->execute_kw($db,$uid,$password,'account.invoice','create', array(array( 'partner_id'=>$id, account_id'=>193 )));$result = $models->execute_kw($db, $uid, $password,'account.invoice.line', 'create', array(array( 'account_id'=>477, 'invoice_id'=>$invoice_id, 'quantity'=>1, 'name'=>'Venta de prueba', 'invoice_line_tax_ids' => array(array(4, 23,false)), 'price_unit'=>200.00 )));
The invoice is created and the line shows correct tax code but tax amount is not calculated (Other info tab is blank), but if the line is edited (say quatity or price is modified) tax is calculated correctly.
What I am doing wrong or missed at invoice creation