Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
2943 Tampilan

Whenever a customer changes their billing address on the website, it changes all their addresses on their previous invoices  that used  the  billing  address  to the new one. This is a big problem as invoices need to remain unchanged when you store them. I have asked odoo, but they say it is how odoo is meant to work. It is a big issue so I am surprised it has not been fixed.

Is there any quick fixes to this?


How can I record the original delivery and billing addresses of the invoice so that a copy of the original data is preserved and not changed? 

I want to do this without adding code or modules (using code inside odoo is fine though, e.g  automated  actions  executing  python  code  is  fine)

Thanks for the Help!

Avatar
Buang
Jawaban Terbai

I think a simple workaround would be instead of changing the existing billing address create a new one and archive the old one that's way old invoice still reference to old address and could not be select anymore for new invoice  because it's archived   

Avatar
Buang
Penulis

Thanks for the help this is a useful method for changing the billing address in the backend. But it cant stop website users causing the problem so ill have to find a way to solve that part. I will use your method in the back end though.

Thanks for the help!

Jawaban Terbai

Hello James Camfield

As per your comment.

Yes,you can create schedule action(automated actions executing python code) .
In python code :
1) Check or find partner's invoice(group by partner_id and created from website).
2) invoice state (not posted,cancel)
3) take latest invoice by in search method order='id desc',limit=1---last one invoice
4) check last invoice Address != older er one invoice

then update invoice address as last invoice address

Thanks & Regards,

Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

Avatar
Buang
Penulis

Hi Jainesh Shah,

Thankyou for posting an answer. I didn't quite understand your last step. What do you do with the latest invoice? could you perhaps give some simple code so I can understand.

Thanks for your help!

Post Terkait Replies Tampilan Aktivitas
1
Apr 24
1788
3
Okt 23
8052
2
Jun 22
3333
1
Apr 22
2163
0
Feb 22
4485