[6.1 / 7.0] p&l and balance sheet reports ignore "target move" field
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello,
The Balance Sheet and Profit and Loss report ignore the "target moves" wizard field. This means draft entries are always selected in the report even if the user selected the default "All Posted Entries".
How to reproduce:
- install accounting module, default account chart
- make sure there are no accounting entries for the company
- manually create an accounting entry involving account 200000 Product Sales, do not post it (leave it draft)
- print the trial balance, selecting "All Posted Entries" in the wizard -> empty report, which is normal since all entries are unposted
- print the profit and loss, selecting "All Posted Entries" in the wizard -> the report contains data, which is not normal since all entries are unposted (draft)
This is because the code for this specific record ignores the wizard field target_move. In other accounting report, there is a line like ctx['state'] = form['target_
This applies to 6.1 and 7.0 (tested a few minutes ago on runbot).
-sbi