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