[FIX] sale_timesheet_purchase: show only Vendor Bills in smart button
Under Projects, click on Overview, click on the smart button "Vendor Bills". The list will display account moves based only on the analytic account and not the actual type of the move opw-2180598 closes odoo/odoo#44330 X-original-commit: 5a476fb4f5d335d5460943603269f48e7ec3e026 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -22,7 +22,7 @@ class Project(models.Model):
|
||||
context={'create': False, 'edit': False, 'delete': False}
|
||||
)
|
||||
})
|
||||
account_invoice_lines = self.env['account.move.line'].search([('analytic_account_id', 'in', accounts)])
|
||||
account_invoice_lines = self.env['account.move.line'].search([('analytic_account_id', 'in', accounts), ('move_id.type', 'in', ['in_invoice', 'in_refund'])])
|
||||
account_invoices = account_invoice_lines.mapped('move_id')
|
||||
if account_invoices:
|
||||
stat_buttons.append({
|
||||
|
||||
Reference in New Issue
Block a user