Quantcast
Channel: OpenERP Help - Individual question feed
Viewing all articles
Browse latest Browse all 464

Passing context from TreeView to FormView

$
0
0
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.

Viewing all articles
Browse latest Browse all 464

Trending Articles