跳至內容
選單
此問題已被標幟
1 回覆
3635 瀏覽次數

What I have done is, I entered Opening Balances in journal Entry through a sql query mentioned below.

insert into account_move_line (move_id,journal_id, company_id, account_id, operating_unit_id, partner_id, name, currency_id, debit, credit, date_maturity) values(18467,79,1,3,10,11091,'TN',21,25538.71,0,'2018-03-31');
Both debit and Credit are showing. Balance being a compute field should reflect automatically but its showing 00.0. Any Idea where I have been wrong in this case?



頭像
捨棄
最佳答案

Computed fields are only triggered to calculate when ORM is used to create or edit data. When you import via SQL you are bypassing ORM - Odoo knows nothing about these kinds of updates. SQL isn't a good method to import data, especially without a good understanding of the data model and corresponding calls to ORM functions that trigger the Odoo business logic.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 22
15258
1
12月 19
8378
0
11月 18
2446
2
11月 18
8276
1
9月 17
3645