Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions budget_control/models/budget_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def action_cancel(self):
return self.write({"state": "cancel"})

def _domain_template_line(self):
return [("id", "in", self.template_line_ids.ids)]
return [("id", "in", self.template_id.line_ids.ids)]

def _get_dict_budget_lines(self, date_range, template_line):
return {
Expand Down Expand Up @@ -440,13 +440,12 @@ def prepare_budget_control_matrix(self):
for date_range in date_ranges # Loop1
for template_line in template_lines # Loop2
]
# Delete the existing budget lines
bc.mapped("line_ids").unlink()

# Delete the existing budget lines
self.mapped("line_ids").unlink()

# Create the new budget lines and Reset the carry over budget
self.write({"init_budget_commit": False})
self.env["budget.control.line"].create(items)
# Create the new budget lines and Reset the carry over budget
self.write({"init_budget_commit": False})
self.env["budget.control.line"].create(items)

def _get_domain_budget_monitoring(self):
return [("analytic_account_id", "=", self.analytic_account_id.id)]
Expand Down
Loading