Skip to Content
Menu
This question has been flagged

Hi guys,

I spend my morning to find out:

- how to disable the Inventory tab from the products form?

I already managed to hide the tab "Sales" and "Purchase", but the tab "Inventory" I could not hide.


here my source code from xml view file: 


< xpath expr="//page[@name='inventory']" position="attributes">
< attribute name="attrs">{'invisible': [('inventory', 'in', service)]}< /attribute>
< /xpath>


https://pastebin.com/imQug9Pb

Would anyone give me some tips?

Thanks

Avatar
Discard
Best Answer

Hi,

If you need to make it invisible always set invisible="1" by inheriting it.


Thanks

Avatar
Discard

<attribute name="invisible">1</attribute>

Best Answer

Hi,

You can simply hide like below without any condition,

<  xpath expr="//page[@name='inventory']" position="attributes">
   < attribute name="invisible">1
< /xpath>

with condition you can also hide like,

<  xpath expr="//page[@name='inventory']" position="attributes">
        < attribute name="attrs">{'invisible':[('type', '!=', 'product')]< /attribute>
 < /xpath>


Regards

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 23
2883
1
Aug 24
546
2
Mar 24
519
1
Mar 24
307
1
Apr 22
1298