Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
How do get the current view mode?
I want to have a function that returns wether the user is in tree or form view. How do i get the current view mode?
def action_button_get_view(self, cr, uid, ids, context=None):
if context is None:
context = {}
mode = context.get('view_mode')
_logger = logging.getLogger('test_func')
_logger.info("view mode is %s" % mode)
return True
my function just returns None.
About This Community
This platform 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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 7/29/13, 2:57 AM |
Seen: 2164 times |
Last updated: 7/17/17, 11:07 AM |
That info is stored in the client JS, you'd have to edit that to allow appending more of the client state to the context before an RPC command.