跳至內容
選單
此問題已被標幟
1 回覆
3547 瀏覽次數

I need to override 

onchange_picking_type(picking_type_id,partner_id) 

from stock.view_picking_form.

But I need to have the selected carrier_id as well in the parameters to do something with it.

How can I do that?

I can't use the new @api.onchange when there is already an existing v7 method in parent module because Odoo doesn't want to support that (very frustrating). They apparently live in a world we everything is in V8! Ok I feel better now...

I tried to do that in inherited view. It doesn't seems to do anything different.

<field name="partner_id" position="attributes">

<attribute name="on_change">onchange_picking_type(picking_type_id,partner_id,carrier_id)</attribute>

</field>

Any idea?

頭像
捨棄
作者 最佳答案

Ok so the issue is really the warning module that screw everything up.

To correct the problem, the warning module should be fixed. Instead of overriding onchange_picking_type [or call it from onchange_partner_id(partner_id)] , warning module is redefining the on_change attribute in the view which mute the original on_change:

<field name="partner_id" position="attributes">

<attribute name="on_change">onchange_partner_id(partner_id)</attribute>

</field>

Odoo team will most likely fix it in the next days... \https://github.com/odoo/odoo/issues/11342

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
10月 21
342
1
5月 17
3043
5
4月 17
7538
3
11月 15
7177
1
3月 15
5505