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

I have added a custom functional field called "amount_profit" in account.invoice object adopting new API syntaxs..

So while computing amount_total, even profit for the same will be calculated. But whenever i try to save the Invoice record..

Am getting an error stated below:

Field account.invoice.amount_profit is accessed before being computed.

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

Well.. It was a bug in Odoo standard..  version [openerp-8.0-ab7b5d7]....

Luckily they have fixed the issue in the new version [openerp-8.0-1b53469] module...


However my temporary fix for [openerp-8.0-ab7b5d7] was:
    1. I changed the function name [in case of inherited/overriden computational method]
    2. Added a dummy initialization for all the computational fields, even though they were not been accessed

Seemed to work pretty well...

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
3406
1
thg 7 25
1570
1
thg 8 25
1152
0
thg 5 25
1900
2
thg 4 25
4187