Odoo Help

0

Odoo 10 - How to change the name of product_template in python method

By
E.M.
on 8/31/17, 8:57 PM 481 views

Hi,


I have an issue in Odoo 10. I change name of a given product.template by using:

my_product_template_id.name = '...'

In database the name is actually changed:

 

select id,name from product_template where id=226;

 id | name -----+---------------------------------------------------

 226 | ISO4028 M 1.4 S1max 0.65 t1 1 dp 21 z2max 31 t2 A

(1 row)




As shown in the image, the ID 226 appears with the following name: 


I have tried to refresh browser, restart server, etc. but the old name is still there.


It happens the same if the name is updated directly in database:

update product_template set name = 'New Name' where id=226;


Database name is updated but when you read again the record in web the old name is still there.


I guess I am missing something important, could someone help me to understand how to change the name of a product_template?

Regarding product_product, I am not using variants and hence there is no column name in that table.

0
Markku Luosto
On 9/1/17, 9:35 AM

Hi,

Do you have two languages defined in your system? Perhaps the translated name of copied product is not changed only the original name? 

Best regards,

-make


0
Tim Lai
On 9/1/17, 7:23 AM

Hi,

Your situation sounds strange to me as if you update the record by direct sql command, it should be updated instantly on the web side as well.

May I know if the issue only occurs at the name of product_template or it actually impacts every others models?

Maybe you should first check the connection from Odoo to database and try to create a new database in order to check whether your issue is database dependent.

Best regards,

Tim

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/31/17, 8:57 PM
Seen: 481 times
Last updated: 9/1/17, 9:35 AM