Odoo Help

Welcome!

This community 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.

0

Edit the .py file of Sales Order.

By
sneha antony
on 6/12/14, 3:43 AM 1,103 views

I want to make some changes in the .py file of sales order.But I am not able to trace the location of the file.In which file should I make editings so that it reflect in the sales order

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 6/12/14, 3:48 AM

You should make your own module and overwrite the sales part that you want altered. Never make modifications in the core code because that will bite you in the end and will be lost everytime you update the main branch.

 

This link might help you on that:

https://doc.openerp.com/trunk/server/03_module_dev_01/

Actually there is no need to create as i dont want the alteration permanently.I just want to enable the deletion of sales order in done status.So i am planning to edit the unlink method in the .py file and enable deletion and after deleting all the sales order i will rollback the changes to the py file.

sneha antony
on 6/12/14, 4:33 AM

Ah, in that case, search for the class sale_order(osv.osv). It should be somewhere in addons/sale/sale.py

Ludo - Neobis
on 6/12/14, 5:15 AM
but i cant found that error message in invalid action in addons/sale/sale.py.THe message is
Invalid Action!

In order to delete a confirmed sales order, you must cancel it.
To do so, you must first cancel related picking for delivery orders.


Ok


On Thu, Jun 12, 2014 at 2:45 PM, Ludo - Neobis <ludo@neobis.nl> wrote:

Ah, in that case, search for the class sale_order(osv.osv). It should be somewhere in addons/sale/sale.py

--
Ludo - Neobis Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

sneha antony
on 6/12/14, 6:11 AM

but i cant found that error message in invalid action in addons/sale/sale.py.THe message is Invalid Action! In order to delete a confirmed sales order, you must cancel it. To do so, you must first cancel related picking for delivery orders.

sneha antony
on 6/12/14, 6:29 AM

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/12/14, 3:43 AM
Seen: 1103 times
Last updated: 3/16/15, 8:10 AM