Skip to content

Commit

Permalink
[FIX] budget_control_purchase_request: permission fiscal_year
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Jul 23, 2024
1 parent 104c4a7 commit 64e8374
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _prepare_purchase_order_line(self, po, item):
if vals.get("account_analytic_id") and item.line_id.fwd_analytic_account_id:
vals["account_analytic_id"] = item.line_id.fwd_analytic_account_id.id
# Check if date_commit is not in the fiscal year, then update it
fy_dates = item.line_id.company_id.compute_fiscalyear_dates(
fy_dates = item.line_id.company_id.sudo().compute_fiscalyear_dates(
fields.Date.context_today(self)
)
if item.line_id.date_commit > fy_dates["date_to"]:
Expand Down

0 comments on commit 64e8374

Please sign in to comment.