Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6471 Lượt xem

I'm trying to find all paid customer invoices that were paid after the due date.

Is there a way to create a filter to find these invoices?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Not a direct solution, and maybe not the best approach, but here's an idea to achieve similar result (I once had similar requirement).

Create a field of function type (fields.function) which check several values in the account.invoice object (and another related objects such as payment -> account.move.line) and compare these values:

  • state
  • date_due
  • account_move_line.date (many2many)

Beware that this would probably slows down tree view a bit.

Another idea and probably a better approach is to write the paid_date to account.invoice when the state changes from 'open' to 'paid'. I don't know but it may also be possible to check the wkf_item object checking it's workflow transformation date, could someone confirm this?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 17
13802
2
thg 12 23
22851
2
thg 1 24
13841
1
thg 3 15
4343
0
thg 3 15
4010