Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
852 Vistas

Greetings to everyone,


I had previously made integration for version 14. After creating the product, I was able to create a translation of the product name by entering a new record in the ir.translation model.


But I think the method was changed in the 16th version. I'm adding the sample php code below. Is there anyone who can help?



$odoo_db = "test";
$odoo_username = "testmail@trst.com";
$odoo_pass = "pass";
$odoo_url = "http://localhost:8069";

$common = ripcord::client("$odoo_url/xmlrpc/2/common");
$uid = $common->authenticate($odoo_db, $odoo_username, $odoo_pass, array());
$models = ripcord::client("$odoo_url/xmlrpc/2/object");
$prodName = "Iphone 15";
$productId = $models->execute_kw(
$odoo_db,
$uid,
$odoo_pass,
'product.product',
'create',
array(
array('name'=>$prodName, "default_code"=>"iph", "currency_id" => 1, "detailed_type" => "consu", "active" => true)
)
);
Avatar
Descartar
Mejor respuesta

Hi, if you are looking for an easier way to do translations.  We struggled with the cumbersome process of exporting/importing and so on, so we developed an app that integrates DEEPL translations for all products and website pages.  You may want to check https://www.spinomana.com/deepl-translator which will greatly reduce time and effort for doing translations with the default export/import.  You can even use it with glossary so you can finetune translations per vertical or business.

Kind regards,

Seppe

Avatar
Descartar