As a default, when a user creates a Quotation or a Sales Order, OpenERP opens the same form view (sale.view_order_form) for both of them.
Now, I would like to do some customization to the FormView based on which type of document the user is creating. As I understand it, I can override the Quotations and Sale Orders menu items to provide a context (e.g. {is_quotation: True}) to pass to the TreeViews that open when clicking the menu item, but when the Create button is clicked in the TreeViews the context does not get passed along to FormView where it is actually needed.
Is it possible to pass a context from a menu item --> TreeView --> FormView and eventually to python code that is triggered from the FormView?
Another alternative to achieve the customization would be to create completely separate forms for Quotation and Sales Order creation, but that would create a lot of duplicated code, so a context-based solution would be great.
Anyone has a answer or solution for this problem? I am also facing difficult doing this exactly same thing. Please help to enlighten!