This question has been flagged
1 Reply
2933 Views

I am trying to get the partner default for the customer checkbox in sales & purchases tab off by default i have looked in the set defaults but when i uncheck the box there isn't a "customer = false" option to allow me to save it.

Any help would be greatly appreciated

Kind Regards Matt

Avatar
Discard
Author

Hi Ray ive tried that. for suppliers by default it is supplier (Happy with that) however i want to change when i am clicking create in Sales -> Contacts OR create in messaging -> contacts (the context is {"search_default_customer":1} or {} Respectively. i have tried changing them but it has no effect

Author

apologies forgot to log out and log back in. thank you for the help i will look into getting into the nitty gritty of menus but this is just for a demo / testing platform at the mo

Best Answer

Have a look at the way the Purchases -> Purchase -> Suppliers menu option works.

The corresponding Window Action defines default values via a Python dictionary in the Context Value field.

{'default_customer': 0,'default_supplier': 1}

This notation of default_fieldname can be used in your own menu item (I wouldn't suggest changing any of the OpenERP ones because the changes will be reverted during the next upgrade or if you update the core modules.

Note: you can EDIT the WINDOW ACTION from the dropdown menu that is shown in DEVELOPER MODE.

Avatar
Discard