Odoo Help

0

how overwrite a py file with installing a new module

By
samir Guesmi
on 3/12/13, 12:58 PM 1,006 views

hello , i trying to overwrite a py file , can i do that when install of a new specifique module ?

i need to overwrite .py file ( in /tools directory ) i try to use f= open(filename,"w") ....

but an error appear

thks , if someone have an idea

You should write your own python classes that inherit and override the classes you want to change. Which file are you trying to replace and why?

Bista Solutions US, Ray Carnes
on 3/12/13, 8:23 PM

What Ray suggest is correct

senthil
on 3/13/13, 3:45 AM

thks for ur replay, i am trying to overwrite ( amount_to_text.py , you can find it in /tools/amount_to_text ) i would overwrite it when installing a module , not to do it manually

can i use read and write file like that : fichier = open("fichier.py", 'w')...

??

samir Guesmi
on 3/13/13, 11:04 AM

No. You should not do this (and I don't know how to do it anyway). Other parts of the product that need these functions will act unpredictably if you make any changes. If your module needs different functions, write them in your module. If you are trying to fix something, submit a bug.

Bista Solutions US, Ray Carnes
on 3/13/13, 7:34 PM
0
senthil
On 3/13/13, 3:19 AM

your question is not clear would you explain your scenario more clearer ?

0
Ray Carnes
On 3/12/13, 8:23 PM

You should write your own python classes that inherit and override the classes you want to change. Which file are you trying to replace and why?

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

0 follower(s)

Stats

Asked: 3/12/13, 12:58 PM
Seen: 1006 times
Last updated: 3/16/15, 8:10 AM