Openworx / backend_theme

Odoo Backend Theme
156 stars 242 forks source link

[BUG] CRM menu is not loaded at all #43

Closed melroy89 closed 6 years ago

melroy89 commented 6 years ago

Impacted versions: 11 (atleast) Browser: Firefox 57

Steps to reproduce: Install your theme (backend_theme). Without your theme it is working!

Install CRM module (if not already), go to the CRM module by pressing the menu item.

Current behavior: The CRM module menu items stay hidden. Even though I have access to this menu, the permissions are correct.

The URL of Customer relation (CRM) ends with: web#menu_id=215&action=315. The menu_d 215 (data-menu-parent="215") is present in the HTML contents.

As I said earlier the URL is web#menu_id=215&action=315, the action will (315, whatever that is?), will cause the menu_id disappearing from the URL. Without action filled in in the URL the menu does appear correctly.

To put it simple, the action will cause the menu not being displayed, the menu_id will get removed from the URL because of the action parameter is filled-in.

HOWEVER, in other modules, the action will not prevent the menu from being loaded.

I don't see any javascript error.

You can see it yourself at: http://erp.melroy.org/. You can use 'demo' / 'demo' on the testing database. Which has the correct rights.

Sorry, Dutch Language is installed CRM in Dutch is called Relatiebeheer.

Expected behavior: CRM Menu loads.

intercon commented 6 years ago

It is because the main CRM Option has an action server that goes into pipe line but if you just remove that action server from the main CRM Option, it start to show the menu id properly Of course you need to configure a default search that goes into pipe line when this options is clicked .

melroy89 commented 6 years ago

@intercon, it's just a demo database. The CRM module does work without backend theme... How can you explain that?

simonitfi commented 6 years ago

Also in my installation, the top menu do not update to active app always. Some times for example CRM module have Contacts-modudels top nav bar. Or some times the whole top menubar is missin. CTRL+F5 does not even fix the issue..

sergeiruzkiicode commented 6 years ago

I don't know, is it a good way to fix the problem, but it seems, you can simply replace in file view/sidebar.xml row from

<a t-att-href="'/web%s#menu_id=%s&amp;action=%s' % (debug_param, menu['id'], menu['action'] and menu['action'].split(',')[1] or '')"

to

<a t-att-href="'/web%s#menu_id=%s&amp;action=' % (debug_param, menu['id'])"

As I see, odoo 11 uses t-att-data-action-id tag for all the action things and we doesn't need it in url

mgielissen commented 6 years ago

I will test the fix. For example, in v10 the sidebar works correctly

Update: It seems to work.