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

Dear all,


I would like to change the delivery method after a delivery order is validated.

For example when you validate the delivery order with the wrong carrier, I would like to change it afterwards that I am able to print a new label for the correct carrier.


Is this possible?

아바타
취소
베스트 답변

Just Try to Quantity replace with ZERO that's make delivery order Cancelled, Revert Quantity in Inventory as well and Remove Line from Stock History also 

move_lines = saleorder.picking_ids.move_ids.move_line_ids
if move_lines:
for move_line in move_lines:
move_line.write({'quantity': 0.00})

아바타
취소
베스트 답변

Hi,

In the default ODOO the field 'Carrier'(carrier_id) of delivery order is read only in state done and cancel. When the delivery order is validated, it is in the done state, so the carrier cannot be changed. In order to change the field after validation you need to remove the readonly properties of the field carrier_id. By default, it is defined as:

<field name="carrier_id" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}" options="{'no_create': True, 'no_open': True}"/>

Inherit that view and replace it as follows

<field name="carrier_id"  options="{'no_create': True, 'no_open': True}"/> 

Alternatively, you can update the value by writing a query or using postgres

For view inheritance please refer the blog

https://www.cybrosys.com/blog/different-types-of-inheritance-in-odoo-15

Regards

아바타
취소
베스트 답변

Yes, it is possible to change the delivery method (also known as the carrier) of a validated delivery order in Odoo. To do this, you will need to go to the "Inventory" module and find the delivery order that you want to modify. Once you have opened the delivery order, you can click the "Edit" button to access the delivery order's form view.

On the delivery order form, you will see a field called "Carrier" or "Delivery Method" that allows you to select a different carrier for the delivery order. Simply select the new carrier from the drop-down menu and click the "Save" button to update the delivery order.

Keep in mind that changing the carrier of a validated delivery order may have implications for your inventory and shipping process, so it is important to carefully consider the impact of this change before proceeding.


아바타
취소
베스트 답변

Once the delivery order is validated its not the right approrach to change any information after that becuase most of the linking table have updated with all the validated information.

But still you wants it then you should update it via postgress query or writing any scripts but make sure these information should also updated to all its linking tables too.

아바타
취소
베스트 답변

It is possible to export to xls the validated operations, update the carrier and reference and import it

아바타
취소
관련 게시물 답글 화면 활동
0
11월 24
1296
2
3월 24
3846
0
9월 15
4421
2
11월 15
4657
1
5월 25
1421