[Python] How to get the session data in POS screen in odoo 18

Discussão em 'Python' iniciado por Stack, Março 27, 2025.

  1. Stack

    Stack Membro Participativo

    I make some user option and I want to read it from POS screen in version 18

    this is my code

    class PosSession(models.Model):
    _inherit = 'pos.session'
    def _load_pos_data(self, data):
    res = super(PosSession, self)._load_pos_data(data)
    res['hide_product_information'] = self.env.user.hide_product_information
    return res


    and I want to read it from JavaScript level from the product screen with this code

    patch(ProductScreen.prototype, {

    async onProductInfoClick(product) {

    // here

    }

    })


    Please can any one help me in this,

    Continue reading...

Compartilhe esta Página