This question has been flagged
1 Reply
6096 Views

I want to add three new stages- New,Opened,Closed.

Add a Validate button.

Add Print/Send Email Button.

How to add these three requirement?

Avatar
Discard

Where do you want to implement this? On an existing object or a new one?

Author

Want to add in my custom module.

Best Answer

I would suggest to take a look into the source code of an existing object like sale.order.

  • For the stages I would suggest to use a selection field called state.
  • The validate button you have to add in your form view.
  • The functionality of the buttons Print/Send Email I would also copy from the sale.order

I suggest to take a look at the following files:

  • openerp/addons/sale/sale.py (class sale_order)
  • openerp/addons/sale/sale_view.xml
Avatar
Discard
Author

I tried to refer it, but no idea where to start. I new in openerp python code.

Your requirement is not that easy to explain if you are totally new. I update my answer with source code you should investigate.

Author

Ok. For send mail. Did i want to inherit mail.thread?

you should maybe look at the technical doc before to go deeper in the code

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