Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3717 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to use cr.execute? แก้ไขแล้ว
1
ส.ค. 22
15337
Cursor not closed explicit แก้ไขแล้ว
1
ธ.ค. 19
8413
0
พ.ย. 18
2489
2
พ.ย. 18
8398
1
ก.ย. 17
3720