Skip to Content
Menu
This question has been flagged

Hi I want to get specific(static) account and partner to do new acount.move and account.move.line. How I can do this?

I have other custions aout this. I put it in the code comments.

Thx in advance

self.journal_entry = self.env['account.move'].create({

                    'journal_id': journal, # i dont understand this value
                    'partner_id': self.container.partner.id, #i need this value static
                    'date': fields.Date.context_today(self)
                    })
credit_line = self.env['account.move.line'].create({
                'move_id': self.journal_entry.id, #its this autoincrement?
                'account_id': self.product.revenue_account, # i need this value static
                'partner_id': self.container.partner.id,   # i need this value static
                'name': 'Finish '+self.job_name, # im generate this value
                'credit': self.cost # i have this value
             })



Avatar
Discard
Related Posts Replies Views Activity
2
Mar 22
4355
0
Jun 24
470
2
Nov 23
1291
3
Jan 24
15698
1
Jul 23
499