SmartGWT two modules one datasource - datasource

I am having a hell of a time sharing a datasource across two GWT modules. Is there some trick I am missing?
I have tried about everything. I would post something, but not sure it would help as I have changed it so much. Any guidance/tutorial on how a datasource can be shared between two GWT modules?
Here is the issue I have. One module will add data to the source, that source goes into an HSQLDB for persistence. This works fine. However the second module never picks up the data added. If I try to show the data from the first module, I get no problems.
I am using "DataSource.get("DS_Name")" in both modules.
In each HTML I added this line: "[script src="FirstModuleName/sc/DataSourceLoader?dataSource=DS_Name"][/script]"
Any thoughts?

Since this is SmartGWT, in the html for your second module, make sure that the isomorphicDir="FirstModuleName/sc". That should give it the correct path to the dataSourceLoader

Related

ALV field in RIMARA20 program is missing after migration to S4HANA

I have the following issue.
In the past, we have added some fields to transaction IH09.
However last year we migrated to HANA and a lot of programs were updated in the process including the program RIMARA20, which is the program behind IH09.
IH09 has worked fine with the added fields were seen.
Last week I was asked to add another field and I did it however although the field catalog has the new field, it is not shown in the output of IH09.
I have debugged the code countless times trying to figure out what is going on but I don't know what happens.
This program internally uses the function REUSE_ALV_GRID_DISPLAY.
We still have the former SAP environment and I tried to make exactly the same enhancement with this new field and I can see it as expected.
In other words; the same field, the same data element, and the same enhancement in both environments but in the HANA instance I cannot see it.
I'm truly frustrated because I see the new field in the field catalog but I can't make it visible in the report.
Any advice on this issue?
Sounds like the REUSE_ALV_GRID_DISPLAY has "remembered" the old catalog
Did you try
to reset the layout / add the missing field?

Does DOORS maintain a history of all the modules I have worked in?

Background
I am currently doing a task where I am relinking objects inside a module (Module_B). While relinking, I forgot to include a new "Link_" column to set up the new links for Module_C. Therefore I erroneously linked to the wrong module (Module_D). I did not realize this until I looked at both the links to the old module (Module_A) and the new module (Module_D but should be Module_C). Now all the links inside the Link_Module_A and Link_Module_C columns of Module_B go to nowhere.
I need to figure which module contains my mistake, that is, I want to find which Module was Module_B.
Question
Is there a way I can find the history of all modules that I have opened in DOORS?
AFAIK, there is no built-in running history of modules that have been opened for vanilla DOORS.
I know on the database I work on, we created a trigger to log what you're asking for.
Assuming you're not the admin, maybe you can ask your admin if they have something like this implemented on the database you're working on.

Can't migrate custom Plone file types to Blobs

We have custom content types that were created as extensions of the ATTypes, two of them extend the ATFile type and one extends the ATImage type. We recently upgraded from Plone 4.2 to Plone 4.3.2. Just discovered we are not using Blob storage at all. No wonder our Data.fs is HUGE. So, I have been trying to migrate these custom types.
I have followed all of the steps explained in this example and the product's notes from pypi, these Plone instructions, and used the example from the pypi page for archetypes.schemaextender (Sorry, since I'm still a noob my reputation won't let me post more than 2 links).
In the end, I created an extender script that just extends the ATFile type changing the FileField to BlobField. It seems to be working for new items. I can add a new CustomFileType and it appears to be uploading the file to blob, and my new upload field is showing (I changed the description as a quick way to verify which one it was using).
However, I am having a problem migrating all existing content items to move the binary files over to blob. I tried the generic migrate() script, then I created my own migrate and walker as suggested in the above resources. It doesn't seem like it is doing anything though. When printing results for each item it tries merging, I do see this returned for each item:
DEBUG ATCT.migration Migrating /site/path/to/custom/file/filename.ext (CustomFile -> Blob)
When I navigate to the custom file type in the site, where it usually shows the link to the file, it is just empty. Then going to edit, it treats it as if there is no file there. As a check, I disabled the extender, restarted, and reloaded the custom file. The file was there now. So it looks like the script I am running just isn't moving that file over to where it should be now.
I feel like I am missing something simple, and it is right there, but I can't seem to find it. All of this is learn as I go and a bit over my head, so hopefully someone can easily set me straight.
If I need to provide any additional information leave a comment and I will try to provide what you need.
UPDATE
I used the Red Turtle objects as examples to migrate my custom types as suggested by keul. I still was not able to get the file to migrate to blob within the type itself. So, I tried a different approach. I created a new custom type "CustomBlob", that is a mimic setup of my CustomFile type, and only extended this new blob type to be blob aware. Then I migrated the CustomFiles to CustomBlob, did a complete clear and rebuild, and packed the zeo. The migration seemed to work for the most part, the blobstorage grew by an expected amount, the new types worked. However, the Data.fs didn't go down in size. I would have thought that the binary files that were stored in Data.fs would be removed during the migration. Am I understanding this incorrectly? How can I remove these files so the Data.fs size goes down appropriately?
Not sure if this is the best solution, but here is how I was able to get this to work.
I created temporary content types parallel of each type (for CustomImage I made CustomImageBlob, and so on). I made the new types blob-aware only, migrated all types to their parallel. Then I enabled the extender for the original types to make them blob-aware, and migrated back. It is a little redundant and time consuming, but I just could not get the files to migrate to blob when migrating to itself.
Providing this as the best answer so far in case it helps someone else, or might encourage someone to find a better solution. Thanks for the tip keul, it definitely helped me get to this solution.

Modify prestashops search algorithm

I've added some database tables to prestashop 1.5.3 which contain additional product data. Now I'd like to modify the search-alorithm from prestashop to include those tables.
I had guessed that the corresponding code would be found in classes/search.php, but modifing this code does not change anything. I even deleted the whole file and the search function kept working.
Can anybody please point me in the right direction and tell me where I can find prestashops search-code.
Searching code is really in /classes/Search.php. I cannot see why search is still working with this file empty...
Please don't modify core files, you'd rather add your logic in the overriden one :
/override/classes/Search.php

OpenERP: modify core module

I'm new to OpenERP and Python too. I have OpenERP 6.0.4
I have modified the invoice.py file in the account folder using python 2.7 (I just edited and saved the file, I didn't compile anything).
The change I made is how the total amount is calculated, I needed the total amount to always add 0.3 EUR to the total.
I then restarted OpenERP server, I also went to admnisitration>modules> set the account module to upgrade and then applied the upgrades.
I then started a new invoice and the changes were not reflected.
For testing purposes, since I'm new to Python and thought maybe I didn't code correctly, I have modified the help message that appears when you hover the mouse over "Residual" in the invoice interface by modifying a line in invoice.py from help="Remaining amount due." to help="This is just for testing."
I restarted the server and upgraded the modules and even this change isn't reflected.
I even created a new database and the modifications are still not showing.
Am I missing something? Is it even possible to edit the core modules ? Is there any workaround to this?
FINAL SOLUTION : Uninstalling and reinstalling the server solved the problem.
The most probable cause is the the addons directory being used is not the same you are editing. You can be sure if you change the name of the addons directory and can restart the server without problems. You can also try to set the --addons-path parameter to the server start command.
If/when you confirm to be working on the right files, try instead to make small text changes on views, since these are visible right after a module upgrade, not requiring a server restart. For instance, try changing some string attributes on account\partner_view.xml.
Slightly off topic, but important: you should not be modifying the core modules directly in the source. The correct way is to extend the core class in your own module which will depend on the core module.
From your comments, it seems you want to add a set tax amount to your invoice. Have a look at http://doc.openerp.com/v6.1/book/3/3_7/invoicing.html#tax-management - openerp already caters for that need and then you dont need to hack the source code which should be your last resort :)