如何在 odoo 10 中获取静态帐户、合作伙伴和其他值?

How can I get static account, partner and other values in odoo 10?

我想获得特定的(静态)帐户和合作伙伴来做新的 account.move 和 account.move.line。我该怎么做?

关于这个我还有其他问题。我放在代码注释里了。

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, # i'm generate this value
                'credit': self.cost # i have this value
             })

journal_id - 日记帐分录 partner_id - container.partner.id - 您可以在其中设置默认合作伙伴 ID。 move_id - 期刊 ID - 期刊 (line_ids = fields.One2many('account.move.line', 'move_id', string='Journal Items', states={'posted': [('readonly', True)]}, copy=True)) 不是递增

account_id = fields.Many2one('account.account', string='Account', required=True, index=True, ondelete="cascade", domain=[('deprecated', '=', False)], default=lambda self: self._context.get('account_id', False))