obuchmann / odoo-jsonrpc

PHP Odoo Json-RPC connector, prepared for laravel integration
MIT License
34 stars 11 forks source link

Allow setting additional context #13

Closed mvehar-preskok closed 1 month ago

mvehar-preskok commented 9 months ago

For API sync we need to disable VAT ID validation. Per documentation/research we found out that this is possible with setting context ('no_vat_validation', true) -> I tries to set this on the model or in odoo.php config, but without success

obuchmann commented 9 months ago

@mvehar-preskok in version 1.5.0 I added the option to specify any custom context attributes.

e.g.


$odoo = new Odoo(new Odoo\Config($database, $host, $username, $password));
$odoo->connect();

$context = $odoo->getContext();
$context->setContextArg('no_vat_validation', true);

$odoo->....