Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use 'onlyonmymodule' in manifest.xml?
#1
In the manifest file, we have the option to add customlinks (which will become business actions), but can we also specify the 'Only on my module' option? And if yes, how? Something like this?

PHP Code:
<customlink>
  <
linktype>DETAILVIEWWIDGET</linktype>
  <
linklabel>InventoryDetailsBlock</linklabel>
  <
linkurl><![CDATA[block://InventoryDetailsBlock:modules/WorkAssignment/InventoryDetailsBlock.php]]></linkurl>
  
<linkicon><![CDATA[]]></linkicon>
  <
sequence>0</sequence>
  <
handler_path><![CDATA[]]></handler_path>
  <
handler_class><![CDATA[]]></handler_class>
  <
handler><![CDATA[]]></handler>
  <
onlyonmymodule>1</onlyonmymodule>
</
customlink
Reply
#2
seems like it is there: https://github.com/tsolucio/corebos/blob/master/vtlib/Vtiger/PackageImport.php#L835

but with the name <onlyonmodule>
Joe
TSolucio
Reply
#3
Seems a bit dubious, since there are two fields in business actions: one checkbox 'onlyonmymodule' that turns limiting on or off, and a 'modules' field that tells which modules the business action should apply to. This seems to indicate it applies to the checkbox, so maybe we should update the import code so that it reflects the fieldname/columnname better?
Reply
#4
There are some link types that, by default apply to all modules, no matter what module is selected in the module list. Namely

'HEADERSCRIPT_POPUP', 'HEADERCSS_POPUP','FOOTERSCRIPT', 'HEADERLINK','HEADERSCRIPT', 'HEADERCSS'

these normally make sense to be this way, but from time to time you want one of these types only on some modules. In that particular case you can use the OnlyOnMyModule checkbox to revert these to the default behavior of respecting the module selection.

So, I think it is correct as it is. What do you think?
Joe
TSolucio
Reply
#5
Well the way I see it we have two directives:
  • Only on module
  • Only on my module
The way I see it the first one is a list of one or more modules you want to limit your business action's application to, with the exception of the types you mentioned. The second is the checkbox that enforces the application of the business action to be limited to the modules in the aforementioned list. If I look at the code, it looks like the name of the first item in the list is actually performing the function of the second, which I think is confusing. I'd rather do:
Code:
<onlyonmymodule>1</onlyonmymodule>
<onlyonmodule>
  <module>SalesOrder</module>
  <module>Accounts</module>
  <module>Quotes</module>
</onlyonmodule>
Would you agree?
Reply
#6
then we don't have support for the module lists in the manifest file

yes, I would agree on adding the module list in the manifest file (and also in the call). the name can be onlyonmodules or onthesemodules
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)