Skip to content

Commit

Permalink
Merge pull request #442 from ecosoft-odoo/15.0-fix-purchase_request-p…
Browse files Browse the repository at this point in the history
…ermission

[FIX] budget_control_purchase_request: permission fiscal_year
  • Loading branch information
Saran440 authored Jul 23, 2024
2 parents 104c4a7 + 64e8374 commit afa90eb
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 afa90eb

Please sign in to comment.