2
0
This commit is contained in:
Stéphane Bidoul 2014-04-18 15:03:11 +02:00 committed by Alexis de Lattre
parent b5ca9344bb
commit 8cf103cf5c
2 changed files with 26 additions and 25 deletions

View File

@ -37,7 +37,9 @@ class test_account_partner_required(common.TransactionCase):
def _create_move(self, with_partner, amount=100):
date = datetime.now()
period_id = self.registry('account.period').find(self.cr, self.uid, date, context={'account_period_prefer_normal': True})[0]
period_id = self.registry('account.period').find(
self.cr, self.uid, date,
context={'account_period_prefer_normal': True})[0]
move_vals = {
'journal_id': self.ref('account.sales_journal'),
'period_id': period_id,
@ -49,16 +51,15 @@ class test_account_partner_required(common.TransactionCase):
'name': '/',
'debit': 0,
'credit': amount,
'account_id': self.ref('account.a_sale'),
})
move_line_id = self.move_line_obj.create(self.cr, self.uid,
'account_id': self.ref('account.a_sale')})
move_line_id = self.move_line_obj.create(
self.cr, self.uid,
{'move_id': move_id,
'name': '/',
'debit': amount,
'credit': 0,
'account_id': self.ref('account.a_recv'),
'partner_id': self.ref('base.res_partner_1') if with_partner else False,
})
'partner_id': self.ref('base.res_partner_1') if with_partner else False})
return move_line_id
def _set_partner_policy(self, policy, aref='account.a_recv'):