Hello, I'm a developper and for my company, i need to pre-fill the accounting documents in ODOO 15. I can add all the information but the debit and credit return this error:
"Cannot create unbalanced journal entry. Differences debit - credit"
my code:
data_list = {'state': 'draft', 'date': date, 'name': 'title', 'ref': 'ref', 'line_ids': [ (0,0,{'account_id': 754, 'name': 'SOME TEXT', 'credit': 100}, {'account_id': 532, 'name': 'REMISE CB', 'debit': 100 }) ]}
subscription_model.create(list)
I try to save all the lines at the same time in ODOO but i have still the error. All I found is a method to cancel the function (check_move_validity = False) who calculate the difference between credit and debit but i don't known how call this function in my python program. If someone can help me please
Have a good day !
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Hi, Your provided data for line_ids is not correct so it's create a journal entry with only one line so you got the error . Please use the below:
data_list = {'state': 'draft', 'date': date, 'name': 'title', 'ref': 'ref',
'line_ids': [
(0,0,{'account_id': 754, 'name': 'SOME TEXT', 'credit': 100}),
(0,0,{'account_id': 532, 'name': 'REMISE CB', 'debit': 100 })
]
}
Hellooo! How can I get the total of the "debit" rounded, since I have added several accounting lines that will go in the debit but when adding the total (due to rounding) it always ends up with 1 cent left over or missing and it won't let me create the entry .
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
ม.ค. 25
|
996 | ||
|
1
ต.ค. 16
|
10522 | ||
|
1
พ.ย. 24
|
1499 | ||
|
0
มิ.ย. 16
|
3728 | ||
|
3
ต.ค. 24
|
13302 |
Indeed, it works! Thanks very much ! It was so simple... Thanks to you
Have a nice day