Skip to content

Commit

Permalink
Merge PR #1887 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 26, 2025
2 parents 12cb722 + 2654722 commit ae107ba
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ class TestPurchaseSTockPickingInvoiceLink(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
if not cls.env.company.chart_template_id:
# Load a CoA if there's none in current company
coa = cls.env.ref("l10n_generic_coa.configurable_chart_template", False)
if not coa:
# Load the first available CoA
coa = cls.env["account.chart.template"].search(
[("visible", "=", True)], limit=1
)
coa.try_loading(company=cls.env.company, install_demo=False)
cls.supplier = cls.env["res.partner"].create({"name": "Supplier for Test"})
cls.product = cls.env["product.product"].create({"name": "Product for Test"})
po_form = Form(cls.env["purchase.order"])
Expand Down

0 comments on commit ae107ba

Please sign in to comment.