Skip to content

Commit

Permalink
[FIX] account_sale_stock_report_non_billed: Date can't be comparated …
Browse files Browse the repository at this point in the history
…with bool
  • Loading branch information
CarlosRoca13 committed Aug 16, 2023
1 parent ed5f6d3 commit 67406b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions account_sale_stock_report_non_billed/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def _compute_not_invoiced_values(self):
moves_in_date = invoices_not_cancel.mapped("move_line_ids").filtered(
lambda m: m.date_done >= date_start and m.date_done <= date_end
)
if not self.env.context.get("date_check_iterval_restrict", False):
date_start = False

Check warning on line 131 in account_sale_stock_report_non_billed/models/stock_move.py

View check run for this annotation

Codecov / codecov/patch

account_sale_stock_report_non_billed/models/stock_move.py#L131

Added line #L131 was not covered by tests
inv_lines = moves_in_date.mapped("invoice_line_ids").filtered(
lambda l: l.check_invoice_line_in_date(
date_end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ def open_at_date(self):
search_view_id = self.env.ref(
"account_sale_stock_report_non_billed.view_move_search"
).id
context = dict(self.env.context, date_check_invoiced_moves=self.date_check)
context = dict(
self.env.context,
date_check_invoiced_moves=self.date_check,
date_check_invoiced_moves_start=self.stock_move_non_billed_threshold,
)
if self.interval_restrict_invoices:
context = dict(
context,
date_check_invoiced_moves_start=self.stock_move_non_billed_threshold,
date_check_iterval_restrict=self.interval_restrict_invoices,
)
action = {
"type": "ir.actions.act_window",
Expand Down

0 comments on commit 67406b2

Please sign in to comment.