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

i have to delete delivery order lines except state is done. Validation is raising when i tried to delete the lines, how to remove that validation

Avatar
Hylkää
Paras vastaus

Hello Asha,


You can directly run a query on database to bypass all the validations but this is not recommended. Instead of deleting records you can use Odoo's standard 'Archive' functionality.

If 'Archive' action is not visible then you have to define a Boolean field in the model like this.

active = fields.Boolean(default=True)

After the you just need to upgrade the module and we're good to go. Now you can also manually set the value of this 'active' field as False to hide record from view.

Referance: https://www.odoo.com/documentation/16.0/applications/productivity/studio/models_modules_apps.html?highlight=archive%20action

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Hylkää
Tekijä

Thanks for your reply.

I want to delete lines under 'move_ids_without_package'

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
toukok. 25
4736
0
heinäk. 21
3141
1
maalisk. 21
4343
2
heinäk. 24
1766
1
toukok. 23
11189