Odoo Help


How to get records that are not yet saved

abdelwahed chiheb
on 10/21/13, 12:24 PM 904 views

How can i get the list of items selected in a sale order ? Exp: I have a sale order with 3 lines with 3 different items, how can i get those items at the time when i'm adding the 4 th line ( 3 lines not yet saved and i want to do this in product_id_change ). I want to Do this in order to alert the user when an item is double selected. Any ideas

Do you mean you want to check for this during a change of sale order line? on_change="function_you_write_in_python" ?

Ray Carnes
on 10/21/13, 5:09 PM

No i want to check for this in the function which alredy exist in sale.py product_id_change

abdelwahed chiheb
on 10/21/13, 6:33 PM

Send x2many as parametr to onchange metod !! what parameter i should send ? Product_id_change is like this:
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, context=None): this method is the called on_change of many2one field product_id ... Can You Explain me what i should do please

abdelwahed chiheb
on 10/22/13, 6:29 AM

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.


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

1 follower(s)


Asked: 10/21/13, 12:24 PM
Seen: 904 times
Last updated: 3/16/15, 8:10 AM