Skip to content

Commit

Permalink
[IMP] procurement_purchase_no_grouping: black, isort, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-dehtiarenko committed Jan 26, 2022
1 parent 091b3c8 commit b36f7f2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ class ResConfigSettings(models.TransientModel):
_description = "Procurement purchase grouping settings"

procured_purchase_grouping = fields.Selection(
related="company_id.procured_purchase_grouping", readonly=False,
related="company_id.procured_purchase_grouping",
readonly=False,
)
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def test_procurement_grouped_purchase(self):
self._run_procurement(self.product_2)
orders = self._search_purchases()
self.assertEqual(
len(orders), 1, "Procured purchase orders are not the same",
len(orders),
1,
"Procured purchase orders are not the same",
)
self.assertEqual(
len(orders.order_line),
Expand All @@ -91,7 +93,9 @@ def test_procurement_system_grouped_purchase(self):
orders = self._search_purchases()
self.assertEqual(len(orders), 1, "Procured purchase orders are not the same")
self.assertEqual(
len(orders.order_line), 2, "Procured purchase orders lines are the same",
len(orders.order_line),
2,
"Procured purchase orders lines are the same",
)

def test_procurement_no_grouping_line_purchase(self):
Expand Down Expand Up @@ -124,7 +128,9 @@ def test_procurement_no_grouping_order_purchase(self):
self._run_procurement(self.product_2)
orders = self._search_purchases()
self.assertEqual(
len(orders), 3, "Procured purchase orders are the same",
len(orders),
3,
"Procured purchase orders are the same",
)
self.assertEqual(
len(orders.mapped("order_line")),
Expand Down
6 changes: 6 additions & 0 deletions setup/procurement_purchase_no_grouping/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit b36f7f2

Please sign in to comment.