[IMP] Account: improved account_use_model.yml for use_model wizard
bzr revid: pap@tinyerp.co.in-20100906093800-l0h3pvihjwz8rq4w
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
name: test1
|
||||
sequence: 0.0
|
||||
quantity: 0.0
|
||||
name: My Model on %(year)s
|
||||
name: My Test Model
|
||||
|
||||
-
|
||||
I create an account use model record
|
||||
@@ -26,4 +26,7 @@
|
||||
!python {model: account.use.model}: |
|
||||
self.create_entries(cr, uid, [ref("account_use_model_0")], {"lang": 'en_US', "active_model":
|
||||
"account.model", "active_ids": [ref("account_model_mymodelonyears0")], "tz":
|
||||
False, "active_id": ref("account_model_mymodelonyears0"), })
|
||||
False, "active_id": ref("account_model_mymodelonyears0"), })
|
||||
move_obj = self.pool.get('account.move')
|
||||
ids = move_obj.search(cr, uid, [('ref', '=', 'My Test Model')])
|
||||
assert len(ids), "Error:moves not created for model 'My Test Model'"
|
||||
@@ -69,7 +69,7 @@ class account_use_model(osv.osv_memory):
|
||||
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
|
||||
period_id = period_id[0]
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'ref': model.ref,
|
||||
'ref': model.name,
|
||||
'period_id': period_id,
|
||||
'journal_id': model.journal_id.id,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user