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

How to get records that are not yet saved

By
abdelwahed chiheb
on 10/21/13, 12:24 PM 552 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" ?

Bista Solutions US, 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

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

1 follower(s)

Stats

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