تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2556 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
الكاتب

Thanks for your reply.

I want to delete lines under 'move_ids_without_package'

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مايو 25
4879
0
يوليو 21
3169
1
مارس 21
4419
2
يوليو 24
1829
1
مايو 23
11290