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.

0

javascript get field added to pos.order.line

By
Marco Sanchez
on 4/9/14, 7:41 PM 948 views

Here is what I did:

class pos_order_line(osv.osv):
    _inherit = "pos.order.line"
    _columns = {
        'order_line_state_id': fields.many2one('pos.order.line.state', "Order Line State"),
    }

class pos_order_line_state(osv.osv):
    _name = "pos.order.line.state"

    _columns = {
        'name': fields.char('Name', size=18),
        'sequence': fields.integer('Sequence'),
    }

And in javascript I do:

var order = this.pos.get('selectedOrder');    
var line = order.getSelectedLine();

But line doesn't have order_line_state_id even though the column is in the database (checked with PGadminIII)

What am I doing wrong??

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: 4/9/14, 7:41 PM
Seen: 948 times
Last updated: 3/16/15, 8:10 AM