Skip to content

Commit

Permalink
[MIG] sale_restricted_qty: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-pelykh committed Mar 6, 2024
1 parent 045a125 commit a0a602a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sale_restricted_qty/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Sale order min quantity",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Sales Management",
"author": "Akretion, Odoo Community Association (OCA)",
"contributors": ["Ashish Hirpara"],
Expand Down
9 changes: 4 additions & 5 deletions sale_restricted_qty/tests/test_sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ def setUp(self):
}
)

def refrech_sale_values(self, sale_order):
def refresh_sale_values(self, sale_order):
sale_order.order_line._compute_sale_restricted_qty()
sale_order.order_line.product_id_change()
sale_order.order_line._compute_is_qty_less_min_qty()
sale_order.order_line._compute_is_qty_bigger_max_qty()
sale_values = sale_order._convert_to_write(sale_order._cache)
Expand All @@ -65,7 +64,7 @@ def test_check_sale_order_min_qty_required(self):
sale_order = self.sale_order_model.new(
{"partner_id": self.partner.id, "order_line": [(0, 0, line_values)]}
)
sale_values = self.refrech_sale_values(sale_order)
sale_values = self.refresh_sale_values(sale_order)
sale_values.update(
{
"partner_shipping_id": sale_values["partner_id"],
Expand Down Expand Up @@ -107,7 +106,7 @@ def test_check_sale_order_max_qty_required(self):
sale_order = self.sale_order_model.create(
{"partner_id": self.partner.id, "order_line": [(0, 0, line_values)]}
)
sale_values = self.refrech_sale_values(sale_order)
sale_values = self.refresh_sale_values(sale_order)
self.sale_order_model.create(sale_values)

Check warning on line 110 in sale_restricted_qty/tests/test_sale.py

View check run for this annotation

Codecov / codecov/patch

sale_restricted_qty/tests/test_sale.py#L109-L110

Added lines #L109 - L110 were not covered by tests
line_values["product_uom_qty"] = 2.0
# Create sale order line with Qty great then max Qty
Expand Down Expand Up @@ -143,7 +142,7 @@ def test_check_sale_order_multiple_qty_required(self):
sale_order = self.sale_order_model.create(
{"partner_id": self.partner.id, "order_line": [(0, 0, line_values)]}
)
sale_values = self.refrech_sale_values(sale_order)
sale_values = self.refresh_sale_values(sale_order)
self.sale_order_model.create(sale_values)

Check warning on line 146 in sale_restricted_qty/tests/test_sale.py

View check run for this annotation

Codecov / codecov/patch

sale_restricted_qty/tests/test_sale.py#L145-L146

Added lines #L145 - L146 were not covered by tests
line_values["product_uom_qty"] = 20
# Create sale order line with Qty multiple Qty
Expand Down

0 comments on commit a0a602a

Please sign in to comment.