Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

How to align validate button of payment screen to right in POS?

By
Sreedath Namangalam
on 7/12/13, 4:10 AM 1,348 views

I want to align the Validate button of the payment-screen to the right of pos-actionbar-button-list. Similarly I want to align the Next Order button in the receipt-screen to right of pos-actionbar-button-list. How can I do that?

Thanks in Advance

Sreedath

1
Sreedath Namangalam
On 8/2/13, 4:17 AM

I have solved it some days back. I have created pos-actionbar-button-left and pos-actionbar-button-right instead of pos-actionbar-button-list and appended the button based on some condition. The JavaScript code is as below

    instance.point_of_sale.ActionBarWidget.include({
    add_new_button: function(button_options){
        var button = new instance.point_of_sale.ActionButtonWidget(this,button_options);
        this.button_list.push(button);
        if(button_options.name){
            this.buttons[button_options.name] = button;
        }
        if (button_options.name == 'validation' || button_options.label == "Next Order"){
            button.appendTo(this.$('.pos-actionbar-button-right'));
        }
        else{
            button.appendTo(this.$('.pos-actionbar-button-left'));
        }
        return button;
    },
});

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/12/13, 4:10 AM
Seen: 1348 times
Last updated: 3/16/15, 8:10 AM