Skip to content
Snippets Groups Projects

Create branch 16.0

Merged arthur.mayer requested to merge topic/16.0/migration-16.0 into branch/16.0
Compare and Show latest version
1 file
+ 13
1
Compare changes
  • Side-by-side
  • Inline
+ 13
1
@@ -69,7 +69,19 @@
],
limit=1,
)
if not period:
# if doing tests, and any matching period not closed
if tools.config["test_enable"] and not self.env["account.period"].search(
[
("company_id", "=", company.id),
("date_start", "<=", acc_date),
("date_effective_cutoff", ">=", acc_date),
("state", "=", "done"),
],
limit=1,
):
period = self.env["account.period"].sudo().find(acc_date, create=True)
else:
raise exceptions.UserError(
_("No period found around %(date)s in the company %(name)s.")
% {"date": acc_date, "name": company.sudo().name}
Loading