Odoo Help

0

javascript get field added to pos.order.line

By
Marco Sanchez
on 4/9/14, 7:41 PM 1,140 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??

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 4/9/14, 7:41 PM
Seen: 1140 times
Last updated: 3/16/15, 8:10 AM