diff options
| author | William Henrotin <whe@odoo.com> | 2020-03-24 12:18:03 +0000 |
|---|---|---|
| committer | William Henrotin <whe@odoo.com> | 2020-03-26 10:26:17 +0000 |
| commit | 75191f8ac44103163dbcaa5cf16f67365d5b2127 (patch) | |
| tree | f57a4cb800bd30484f25167f07099f54fe972f75 /addons/payment_authorize/data | |
| parent | 459c02b39c8ede72fcbf9134c2f7d6d6f6060ad4 (diff) | |
[FIX] purchase: ensure all vendor bills are gathered from purchase order
The 'vendor bills' stat button on purchase order, once clicked, will
have a specific behavior depending on the invoice count :
0 : open a new invoice with pre filled fields (not saved yet)
1 : open the form view of the invoice
2+: open the list view of the invoices.
Before this commit, the invoice count was computed with an environment on
the current user. That means a record rule could make the invoice count
lower than the real count and so give an unwanted behavior. Ex: create a
new invoice even if there is already one created because the user cannot
see the other people's invoices.
After this commit, the action_view_invoice with make an explicit read()
in database to fill the cache with all the purchase order's invoices and
make sure the count is the real one.
Task : 2206969
closes odoo/odoo#48274
X-original-commit: e3101d92187946b2bd539e05956e4e83cd9c9097
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/payment_authorize/data')
0 files changed, 0 insertions, 0 deletions
