Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3561 Vizualizări

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?

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
oct. 21
342
1
mai 17
3058
5
apr. 17
7547
3
nov. 15
7186
1
mar. 15
5517