Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master/Detail issue, not possible to select from Detail, it is creating a New record #291

Open
platipusica opened this issue Jan 17, 2024 · 6 comments

Comments

@platipusica
Copy link
Collaborator

Hi,
here is the Export:

t_1.0.0_5.4.136_2024-01-17_10-59-28.zip

Here is the vid:

Master_detail.mp4

How to solve this?

Thanks

@platipusica
Copy link
Collaborator Author

platipusica commented Jan 17, 2024

Maybe I'm missing something, I have a number of pages with Details and associated Master_record_id.
The Details are displaying fine, the problem is when I try to ADD a new detail it has no correlation with existing ones.

The issue can be seen here, for example ClientID =350 :
https://resourcingandbilling.pythonanywhere.com
It has 2 Client Work Products, but I cant add a new one without creating a new Product.

This is the Legacy app, imported tables.

Is the solution to split the Details in two tables, new one containing Products, and the original Detail the Product Lookup?
But then the same is Client projects Details. It has ONLY Project Name and Active boolean in the table, plus ClientID.
I can't add a detail without creating a new Project name.

Again, the Detail Client projects has a number of records!
At this stage I do not know how solve this two Details.

@platipusica
Copy link
Collaborator Author

I think the best way to explain is Assets/Parts Master/Detail.
It is only needed to add Part Name to Asset as Details. Parts is a detail table containing only Part name. Assets Journal has only Asset name.
It is impossible to add existing Parts to Assets in this scenario as an detail.

So, what would be the solution? Thx

@platipusica
Copy link
Collaborator Author

Here are my thoughts, not sure if this is possible:

Parts_Details

@platipusica
Copy link
Collaborator Author

Hi Andrew,
here is the solution I would like to see on official Demo, select multiple Details and add to Master:

Max_master.mp4

Hope this helps with understanding where the problem is.

You can see this in here (use translate to English option with Chrome):
https://carparts.pythonanywhere.com/

@platipusica
Copy link
Collaborator Author

Ok, sorry, I looked at the demo.jam-py.com and could not find the "Select Tracks".

So I went to check the v7, and THAT is EXACTLY whats needed! The New would open the selection where also New can be used!

Fantastic!

@platipusica
Copy link
Collaborator Author

platipusica commented Jan 22, 2024

Hmmm, I am taking the above statement back.

Reopening, since for v5 this code does not work:

function on_view_form_created(item) {
    var btn = item.add_view_button('Select', {type: 'primary', btn_id: 'select-btn'});
    btn.click(function() {
        item.alert('Select the records to add to the Clients and close the from');
        item.select_records('insert_your_name');
    });
}

The reason why it does not work is insert_your_name
is not a lookup. I guess it would not work for v7 as well if the field is not a lookup.
On console error:

Uncaught TypeError: field.lookup_item.copy is not a function

On the original Export from above, the detail is ONE single Text field. So the
item.select_records('test_detail') wont work.

Hence, what to do?
MultiSel
MulitSelv7

Also, on 7.0.29 I can't select the Details on Journal again. So the above pic is from 7.0.28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant