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 fix yml onchange issue?

By
test
on 2/15/13, 6:21 AM 1,845 views

Hello,

I have created onchange method and am trying to trigger it from yml.

where context is also one parameter for onchange method.

but here context return blank dictionary !?

Is it a framework issue?

Here is my YML code:

I create a phonecall record to call a partner onchange method.
!record {model: crm.phonecall, id: crm_phonecall_5}: name: 'Bad time' partner_id: base.res_partner_5

Please do not modify original question.

test
on 2/15/13, 8:26 AM

Please reformulate the question it is not understandable. You may add some sample code too.

Camptocamp SA
on 2/15/13, 8:37 AM

Let me know what you not understand ?

test
on 2/15/13, 11:59 PM

We don't understand what your problem is. Is it that, when you run your onchange function from a yml test, the context is a blank dictionary?

Max
on 3/6/13, 11:13 AM

When you add details to your question, please edit your original question instead of adding them in an answer. I have moved the information you added you your original question. Can you delete the answer you created?

Max
on 3/7/13, 12:35 PM
1
test
On 3/7/13, 7:57 AM

YML Test Onchange


I create a phonecall record to call a partner onchange method.

!record {model: crm.phonecall, id: crm_phonecall_5}: name: 'Bad time' partner_id: base.res_partner_5

1
Max
On 3/7/13, 12:36 PM

Am I right in thinking you are trying to trigger your onchange function from YML by creating a related record?

onchange functions are only triggered by the view UI by setting the on_change attribute for a field to the name of your onchange function, for example:

def my_onchange_function(...):
    ...

<field name="my_field" on_change="my_onchange_function" />

ugly answer.

test
on 3/11/13, 2:41 AM

Well perhaps if you gave us more information and put the effort into writing a more comprehendable answer, I could be of more help. I did take the time out of my day to try and help you, perhaps you could be a bit more cooperative...

Max
on 3/11/13, 6:01 AM

Avoid to answer if you not know the problem domain(YML).

test
on 3/12/13, 3:34 AM

Nobody understood your question, the idea was to have a starting point and then we could jointly improve the answer together.. Besides, one person answering does not mean nobody else can

Max
on 3/12/13, 8:09 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

0 follower(s)

Stats

Asked: 2/15/13, 6:21 AM
Seen: 1845 times
Last updated: 3/16/15, 8:10 AM