Edit invoices opening

Hello
When i click on purchase invoice , i want to open it in a popup not in a window
how to do this ?
thanks

Hi @creativeps,

Go to the Purchase Invoice Customize Form

Then enable Quick Entry and set the quick entry field you’re according to.

  • Quick Entry: Checking this box will allow you to create a ‘Quick Entry’ using a particular form. This means that whenever a user creates this Form from another existing Form, a box will pop up, allowing the user to create the DocType by entering only the essential details. For example, check Quick Entry in Journal Entry.

Thank You!

Hi
thanks for replying
I don’t mean this , I mean when it click to open on an old sales invoice or a purchase invoice, for example, to preview it, it opens as a pop up instead of opening it in a new window

Hello ,
Is there any solution ?

Hi @creativeps,

Please apply the listview client script.

frappe.listview_settings['Sales Invoice'] = {
    add_fields: ["name"],
    button: {
        show: function (doc) {
            return doc.name;
        },
        get_label: function (doc) {
         return __("View Invoice", null, "Access");
        },
        get_description: function (doc) {
            return __("View Invoice of {0}", [`${doc.name}`]);
        },
        action: function (doc) {
            // window.open("/app/sales-invoice/"+doc.name);
            frappe.set_route('Form', 'Sales Invoice', doc.name);
        }
    }
};

When click on View Invoice button then invoice will show in new tab.

I hope this helps.
Thank You!

Thanks very mych …
I tried but the invoices still open as a windows not a side panel



24

It’s not open in popup. and it’s not possible.

If you want to open in new tab then remove the comment and then check it.

Like:

            window.open("/app/sales-invoice/"+doc.name);
        //  frappe.set_route('Form', 'Sales Invoice', doc.name);
1 Like

I want the details of invoice open as a side panel
Like this

I don’t think it is possible.

If you want to show it in a popup dialog then please apply it.

frappe.listview_settings['Sales Invoice'] = {
    add_fields: ["name"],
    button: {
        show: function (doc) {
            return doc.name;
        },
        get_label: function (doc) {
            return __("View Invoice", null, "Access");
        },
        get_description: function (doc) {
            return __("View Invoice of {0}", [`${doc.name}`]);
        },
        action: function (doc) {
            var url = frappe.urllib.get_full_url(
                    '/app/sales-invoice/' + doc.name + '?popup=1'
            );
            var popup = window.open(
                url,
                'Sales Invoice',
                'height=600,width=800,top=100,left=25,resizable=yes,scrollbars=yes'
            );
            if (window.focus) {
                popup.focus();
            }
        }
    }
};

I hope this helps.
Thank You!

2 Likes

Thanks very much
i will try to search againg too
:rose:

Hello again :smile:
I searched and think that dialog can be used to get the result I want, but I could not use it properly. Is there any help?
Thanks in advance.

Only this way to open dialog and check invoice.
We haven’t another scenario for it. so sorry.

Different ERPs/local setup systems have different-different features. so we can’t match with them.

I hope you think about them.
Thank You!

2 Likes