[FIX] base_report_to_printer: Stateless tests (#123)

If the test was run in a database with the `account` module installed, they were failing for 2 reasons:

- It was searching for the first report it could find, with the first 5 records to report. This made it load the `account.report_agedpartnerbalance` report, which caused a fake `TypeError: 'NoneType' object has no attribute '__getitem__'` error.
- It was running tests without loading the full module graph, thus not getting the default value for the new required `invoice_warn` field.

Now tests are run in `post_install` mode to load full module graph, and they use stateless data.
This commit is contained in:
Jairo Llopis
2018-01-19 17:22:37 +00:00
committed by Carlos Roca
parent bb0b8c0edb
commit cf9fb7986b
9 changed files with 53 additions and 54 deletions

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com>
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com>
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)