Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
1385 Näkymät

I'm upgrading our code from 12 -> 18 and noticed that "tree" is replaced by "list" (which is ok), but worse, delete/create no longer has any effect


Odoo12:


Odoo18


Code:

   

<field name="boat_rides" mode="list">    
​<list editable="bottom" create="false" delete="false" default_order="time_departure" decoration-bf="id==False">
...
</list>
</field>

   


As you can see in the screenshots. What has replaced this or how to make it work?

Thanks


EDIT

Digging deeper it looks like Odoo 18 (or earlier) introduced a couple of other terms called "link" and "unlink" in the javascript. Patching the javascript and setting this.activeActions.link and this.activeActions.unlink to false removes those links.

This side effect just probably hasn't been though about by the Odoo team.
I'm going to patch the javascript to handle custom attributes "link" and "unlink" to set these...


Edit 2

This is the core of the issue. And there is no way in the xml template to set unlink to false


Edit 3

I had to patch the core. This just doesn't seems to be supported anymore. I would call this a REGRESSION.
https://github.com/odoo/odoo/issues/186093

..I wish there was a Odoo community for more advanced programming

Avatar
Hylkää
Paras vastaus

Hi,

Upon checking the attribute is still working fine in 18.0, may be you missed to upgrade the module or changing attribute in a wrong place ?




Thanks

Avatar
Hylkää
Tekijä

This is just not true. How does the code you show here look like?
I made a bare bone module which extends product.template with a Many2many on other products.
Then
<div name="options" position="after">
<field name="products_link">
<list edit="false" delete="false" create="false">
<field name="name" />
</list>
</field>
</div>

and it still shows

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
maalisk. 25
953
0
heinäk. 25
280
0
heinäk. 25
909
1
toukok. 25
1347
1
huhtik. 25
1313