Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
4802 Vues

How to fix warning message

warnings.warn(f"The tag is deprecated, use a for {xml_id!r}.", DeprecationWarning)

Avatar
Ignorer
Meilleure réponse

Hi,
The warning message you provided indicates that the

<act_window>


tag is deprecated in Odoo 16 and suggests using a

<record>


instead for the specified xml_id.

<act_window id="wizard_action_stock_check"
         name="Check Stock"
         src_model="stock.inventory"
res_model="bi.stock.check.report"
         view_type="form" view_mode="form"
         key2="client_action_multi" target="new"
     groups="base.group_no_one"/>




 In odoo 16 using

<record>

instead of

<act_window>

like this:-

<record id="action_stock_inventory_check" model="ir.actions.act_window">
            <field name="name">Stock Check</field>
<field name="res_model">bi.stock.check.report</field>
            <field name="view_mode">form</field>
<field name="view_id" ref="bi_stock_inventory_check_form"/>
            <field name="target">new</field>
</record>


Hope it helps

Avatar
Ignorer
Meilleure réponse

Hi,

If you have tried to create a window action using the tag:  act_window, you have to replace this with record as follows:

<record id="product_template_action" model="ir.actions.act_window">
record>

Thanks

Avatar
Ignorer
Publications associées Réponses Vues Activité
1
mai 24
2073
1
avr. 24
1947
1
févr. 24
2757
0
févr. 24
10
0
janv. 24
2441