Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
6607 Lượt xem

Hello

I tried a lot to import historical data for sales and purchase orders with correct effect in inventory valuation? 

Odoo's behaviors is like the following:

When importing orders, Odoo takes the validation date for POs,So Delivery and Receipt Orders not the real date for the orders!, which effect the many things like reports and inventory valuation

is there a way to fix this issue?


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi  Mohammad,

You can override Odoo functions, for example, passing a variable into context in the action_confirm function of the sale.order model and using that variable in the action_done function of stock.move.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi, did anyone find an actual solution to this???

I have the same problem and I am going crazy.

Thanks

Ảnh đại diện
Huỷ bỏ

I don't know this works or not but,
try to update the fields is pgadmin,
maybe this will write the old dates.

Thank You

Hi Jenish M, thanks for your answer.
I am using odoo online, is it possible to update the fields in pgadmin in my case?
If so, how should I do it?

Thank you.

Hi,

For anyone looking for an answer, this worked for me:

Create an excel with the old data you want to import, and make sure it works (you can try first exporting some data you already have)

You'll be able to import all the data you want, except for the state of the order (which will be Quotation by defect.)

If you just validate that quoatation, the order date will be the current date, and we don't want that.
Instead of this, you need to create a new action.

Go to Server actions (in Settings / Technical / server Actions), and create a new action.

Name: (whichever name you want, in my case "Test Old Sales")
Model: Sales Order
Action: Update the record
Field: State
Evaluation type: value
Value: sale

Now, go to the Sales dashboard, select the sales you just imported (and that are Quotations) and in the Actions you should see the action you just created.

That's it :)

Hope it helps someone!

@Maria Senyer
I have used your solution it did change the status but it did not show its effect in move history any idea how it can be done?

@krakalien no idea. I know my solution does not affect in move history. I would also like to know how to do it.

Câu trả lời hay nhất

I just wanted to express my gratitude for the time I spent reading your post.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello, Have you please found a solution for that problem? Thank you for your help !

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello

Yes, you may export the posted entries, then you change the dates in the excel and import them again. With that you have the correct date. 

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for you answer, I tried this way before, but I didn't effect in stock valuation layer, because Odoo calculate it once the user validate the (Delivery/ Receipt )orders. actually this is the main problem!

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 20
3869
1
thg 11 24
3854
0
thg 7 24
2411
1
thg 3 24
2641
Out of Stock Đã xử lý
4
thg 2 24
5927