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

Hi I've just started with Odoo (sandbox no data) and I've successfully created 2 warehouses and I want to delete one of them.

When I tried to delete one I have the following error message :

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it- creation/update: a mandatory field is not correctly set
[object with reference: Procurement Rule - procurement.rule]


I see we can archieve it but i really want to delete it how can I do ?

아바타
취소

Thanks Bejaoui for your reply,

Unfortunately I have no idea where the procurement rule records are set, I added no records except a new warehouse.

Do you have an idea where I can find default  procurement rules to delete in the app ?

Kind regards

Procurement rules are created by default with the warehouse.

I updated the answer to explain how to find them.

베스트 답변

Hi Benoit R,

This Tell you that you try to delete this warehouse while some Procurement Rule records still reference it.

So, you should delete those records before deleting the warehouse.

To do that,

First you have to activate the advanced routing feature to access the procurement rule menu

        1-Activate the developer mode[ V9, V10]

        2- Go to the configuration menu for inventory on Configuration/Settings

        3- Check "Advanced routing of products using rules" and apply

         

Then go to Inventory/Configuration/Routes/Global Procurement Rules

Finally, delete the Procurement Rules related to the undesirable warehouse.

Same for other records like stock location, operations type, etc ..

Best regards.


아바타
취소
베스트 답변

FWIW, I submitted this defect the other day... https://github.com/odoo/odoo/issues/22117

I believe there are some FK constraint issues in the model(s). 


On the community version, you can go to Inventory->Configuration->Warehouses->(select one)->Routes(button)->(name)-Ship Only... then you can see Procurement Rules for that Route.  However, I can't seem to "delete" any of the Warehouse->Route->ProcurementRule relationships.





아바타
취소
베스트 답변

How do you activate the developer mode???  Is that possible in the Community version????

I still can't delete warehouses or locations. These messages still appear:

When trying to delete a warehouse:

Odoo Warning - Validation Error The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it - creation/update: a mandatory field is not correctly set [object with reference: Procurement Rule - procurement.rule]


When trying to delete a location:

Odoo Warning - Validation Error The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it - creation/update: a mandatory field is not correctly set [object with reference: Warehouse - stock.warehouse]

아바타
취소
베스트 답변

Hi,

I'm had problems with this as well, trying to setup Odoo 10,, but following the tips mentioned above doesn't solve it for me. I deleted ALL global procurement rules and operation types. I cannot delete the locations however (gives error: object with reference: Warehouse - stock.warehouse). And when I try to delete the warehouse I get: object with reference: Procurement Rule - procurement.rule

Again, my global procurement rules list is completely empty (also after unchecking the 'global' filter in the search field)

What am I missing?

Thanks in advance for any help
MF


Edit: solved this. there were archived global procurement rules I hadn't noticed. Sorry...

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

Thanks a lot Bejaoui, I'm convinced it's the correct answer for the on premise solution but unfortunatly I cannot see the Procurement Rules in the odoo saas version following the indicated path (Inventory/Configuration/Routes/Global Procurement Rules)

Do you have an idea to access to it with the saas version ?

Kind regards,

Benoit



아바타
취소

I forgot to mention that you have to activate the developer mode.

Otherwise, It's the same, for all version.

관련 게시물 답글 화면 활동
2
11월 17
4555
1
9월 25
1450
3
3월 25
1521
Delete Blank Lines 해결 완료
1
8월 24
2035
1
5월 24
6990