Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
5 Ответы
6553 Представления

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?


Аватар
Отменить
Лучший ответ

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.

Аватар
Отменить
Лучший ответ

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

I have the same problem and I am going crazy.

Thanks

Аватар
Отменить

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.

Лучший ответ

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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Лучший ответ

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. 

Аватар
Отменить
Автор

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!

Related Posts Ответы Просмотры Активность
0
февр. 20
3810
1
нояб. 24
3807
0
июл. 24
2346
1
мар. 24
2558
Out of Stock Решено
4
февр. 24
5816