Odoo Help


How to add a new journal entry from a custom module?

on 10/31/16, 7:14 AM 392 views

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.

Import from csv file?

on 10/31/16, 9:08 AM

No i need to do this from python code

on 11/1/16, 12:10 AM

Cybrosys Technologies

--Cybrosys Technologies--
Cybrosys Technologies
| 2 2 3
Calicut, India
--Cybrosys Technologies--

Cybrosys is a well known and highly flourished software development company in India, which provides various services in the IT industry. We are mainly dealing with ERP implementation in both Odoo and .Net, Source Code sale offer for various products and Employee Staffing solutions.

Odoo is the Key service of our company and we have cultivated many potential partners and clients in Europe, Asia, Middle East and Africa within a short span of time. We are really glad to be a part of Odoo and to provide the quality services without any compromise. You can manage the entire project by choosing our experienced and talented developers whenever required. You can feel free to have direct communication with our experts and can assign tasks according to your project plan, the developer will be yours till the end of the work.

Hold your hand with cybrosians to make your Odoo dreams comes true.

Cybrosys Technologies
On 11/1/16, 12:44 AM

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, })

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/31/16, 7:14 AM
Seen: 392 times
Last updated: 11/11/16, 7:00 AM