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

Is there a way to delete archived pricelist entries in Odoo Online v15? 

I am asking because I have reason to believe that some prices that have been archived are still linked to products in our website, which is bad because it suggests prices that are outdated. 
I can not find where I could delete these entries.

Any help is greatly appreciated - thanks        

아바타
취소
작성자 베스트 답변

Thanks for the elaborate answer, but it's not what I was looking for. 
I need to delete archived pricelist ENTRIES (ITEMS) not the archived priceslist themselves. 

On our website, there are prices showing up that are not in the pricelist (there is a discount that is not existing in my pricelist). I think it's an old pricelist entry that I have archived before, and it's still linked to the product for some reason. This is really annoying because our website is showing wrong price and I can not do anything against it.

If anyone knows how to solve this problem, I would be extremely thankful.

아바타
취소
베스트 답변

Hello Tom,
Odoo will not allow to delete any pricelist entries linked with other models. You can only archive pricelist entries.

If you want to delete pricelist forcefully then you can override the unlink method of "product.pricelist" model as follow.

Please find code in comment. 

I Hope this will help you. 

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

아바타
취소

Code:

def unlink(self):
# search and unlink peicelist_id from all products
self.env["product.template"].search([("pricelist_id", "=", self.ids)]).pricelist_id = False
return super(ProductTemplate, self).unlink()

베스트 답변

Hi Tom,

You can find the archived price list by selecting the archived filter in the list view of the price lists as shown in the image.


From there you can select the price lists using the checkboxes near them, after selecting those you click on the 'action -> Delete' to delete those price lists. And please note that there are some restrictions for some price lists which are used as default, that you cannot be deleted from the database.


If those price lists are custom-made (made by users) most of them can be able to delete in this way.

Regards

아바타
취소
관련 게시물 답글 화면 활동
3
4월 24
2962
1
11월 19
7526
1
5월 16
6324
0
3월 15
3930
1
6월 23
3798