Odoo Help

0

how overwrite a py file with installing a new module

By
samir Guesmi
on 3/12/13, 12:58 PM 915 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

--Ray Carnes--
16349
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0.

Completed Odoo Functional and Technical Training.

Major Skills:

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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: 915 times
Last updated: 3/16/15, 8:10 AM