I created a custom module in odoo 9.I wanted to add a new journal entry from this module.But i don't know how to do this. can anyone help me.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi silviaa...
We hope this will help you..
l1 = {
'name': line.name,
'debit': line.debit,
'credit': line.credit,
'account_id': line.account_id.id,
'partner_id': partner,
'ref': record.ref,
'date': record.date,
'date_maturity': line.date_maturity,
'currency_id': line.currency_id.id,
'amount_currency': 0.0,
'company_id': company_id,}
l2 = {
'name': line.name,
'debit': line.credit,
'credit': line.debit,
'account_id': acc_id,
'partner_id': partner,
'ref': record.ref,
'date': record.date,
'date_maturity': line.date_maturity,
'currency_id': line.currency_id.id,
'amount_currency': 0.0,
'company_id': company_id,
'analytic_account_id': an_acc_id }
move_lines.extend(((0, 0, l1), (0, 0, l2)))
move = self.pool.get('account.move').create(cr, uid,{ 'ref': record.ref, 'line_id': move_lines, 'journal_id': record.journal_id.id, 'period_id': record.period_id.id, 'date': record.date, })
how to implement it in odoo studio
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký
Import from csv file?
No i need to do this from python code