콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2424 화면

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
5월 25
4495
0
7월 21
3074
1
3월 21
4231
2
7월 24
1668
1
5월 23
11108