Skip to content

Commit

Permalink
[16.0][FIX] rma: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sofien Moalla committed Aug 22, 2023
1 parent 7dd713f commit 2aa6927
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rma/tests/test_rma.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ def setUpClass(cls):
cls.env.company.rma_return_grouping = True

def _create_rma(self, partner=None, product=None, qty=None, location=None):
rma_form = Form(recordp=self.env["rma"].with_context(
rma_form = Form(
recordp=self.env["rma"].with_context(
default_location_id=location and location.id,
),)
),
)
if partner:
rma_form.partner_id = partner
if product:
Expand Down Expand Up @@ -200,7 +202,9 @@ def test_ensure_required_fields_on_confirm(self):
rma_form.partner_id = self.partner
with self.assertRaises(ValidationError) as e:
rma.action_confirm()
self.assertEqual(e.exception.args[0], "Required field(s):\nproduct_id\nlocation_id")
self.assertEqual(
e.exception.args[0], "Required field(s):\nproduct_id\nlocation_id"
)
with Form(rma) as rma_form:
rma_form.product_id = self.product
rma_form.location_id = self.rma_loc
Expand Down

0 comments on commit 2aa6927

Please sign in to comment.