select_record footer

31 views
Skip to first unread message

marcjammet

unread,
Mar 18, 2026, 6:18:44 AM (7 days ago) Mar 18
to Jam.py Users Mailing List
Hello,
how to get rid of the footer with new edit delete button when select_record  is called ?
Thank you for your help

Drazen Babic

unread,
Mar 18, 2026, 6:37:14 AM (7 days ago) Mar 18
to Jam.py Users Mailing List
Pic pls. Thx

marcjammet

unread,
Mar 18, 2026, 8:15:18 AM (6 days ago) Mar 18
to Jam.py Users Mailing List
I want to remove all in red rect 

CleanShot 2026-03-18 at 13.09.48.png

Drazen Babic

unread,
Mar 18, 2026, 9:32:14 PM (6 days ago) Mar 18
to Jam.py Users Mailing List
On Demo Tracks:

function on_view_form_created(item) {
if (item.view_form.closest('.modal').length) {
        item.view_form.find("#edit-btn").hide();
        item.view_form.find("#delete-btn").hide();
        item.view_form.find("#new-btn").hide();
    }
...

marcjammet

unread,
Mar 20, 2026, 9:28:28 AM (4 days ago) Mar 20
to Jam.py Users Mailing List
Thank you for this info.
However the select_record is called inside a detail in detail as you can see in the screen capture and client code.
function on_edit_form_created(item) {
item.edit_options.form_header = false;
item.read_only = true;

var b = task.buys.copy();
b.set_where({B_font: item.id.value});
b.view(item.edit_form.find('.edit-detail'));

b.view_options.form_header = false;
b.view_options.form_footer = false;
b.read_only = true;
b.buys.read_only = true;
b.use.read_only = true;

b.on_view_form_created = function(quest) {
quest.paginate = false;
};

b.on_before_append = function(quest) {
if (!item.id.value) {
quest.alert_error('Police inconnue');
quest.abort();
}
};

b.on_before_post = function(quest) {
b.b_buys_details.value = item.id.value;
};
}

function on_field_changed(field, lookup_item) {
var item = field.owner;
item.apply();
item.edit();
}

function on_before_delete(item) {
var b = task.buys.copy();
b.set_where({id: item.id.value});
b.open();
while (!b.eof()) {
b.delete();
}
b.apply();
}



CleanShot 2026-03-20 at 13.54.23.gif

Drazen Babic

unread,
Mar 22, 2026, 3:05:38 AM (3 days ago) Mar 22
to Jam.py Users Mailing List
Yes, 

but this is exactly how Invoices works, see:
https://jampy.pythonanywhere.com/
Screenshot from 2026-03-22 13-25-05.png
Screenshot from 2026-03-22 13-25-51.png

Dean Babic

unread,
Mar 22, 2026, 10:39:18 PM (2 days ago) Mar 22
to Jam.py Users Mailing List
Are you sure that this code is needed at all?

As Details you have Type, Police, Version table, so in THIS table something like from Demo invoice_table Details:
function on_view_form_created(item) {
if (item.master) {
item.view_form.find('#new-btn').off('click.task').on('click', function() {
item.select_records('track');
});
item.view_form.find("#delete-btn, #new-btn").prop("disabled", item.owner.paid.value);
}
}   
Because that is your details, correct?
So when you say  "select_record is called inside a detail in detail" it is not visible how it's called, your code does not show that.
Reply all
Reply to author
Forward
0 new messages