mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] product_quantity_update_force_inventory: Migration to 14.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Product Quantity Update Force Inventory",
|
"name": "Product Quantity Update Force Inventory",
|
||||||
"version": "13.0.1.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||||
"category": "Warehouse",
|
"category": "Warehouse",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class ProductTemplate(models.Model):
|
|||||||
"""Create an Inventory Adjustment instead of edit directly on quants"""
|
"""Create an Inventory Adjustment instead of edit directly on quants"""
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
view_form_id = self.env.ref("stock.view_inventory_form").id
|
view_form_id = self.env.ref("stock.view_inventory_form").id
|
||||||
action = self.env.ref("stock.action_inventory_form").read()[0]
|
action = self.env.ref("stock.action_inventory_form").sudo().read()[0]
|
||||||
action.update(
|
action.update(
|
||||||
{
|
{
|
||||||
"views": [(view_form_id, "form")],
|
"views": [(view_form_id, "form")],
|
||||||
@@ -31,7 +31,7 @@ class ProductProduct(models.Model):
|
|||||||
"""Create an Inventory Adjustment instead of edit directly on quants"""
|
"""Create an Inventory Adjustment instead of edit directly on quants"""
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
view_form_id = self.env.ref("stock.view_inventory_form").id
|
view_form_id = self.env.ref("stock.view_inventory_form").id
|
||||||
action = self.env.ref("stock.action_inventory_form").read()[0]
|
action = self.env.ref("stock.action_inventory_form").sudo().read()[0]
|
||||||
action.update(
|
action.update(
|
||||||
{
|
{
|
||||||
"views": [(view_form_id, "form")],
|
"views": [(view_form_id, "form")],
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class TestStockQuantEditableViewBlock(TransactionCase):
|
|||||||
self.assertIn(
|
self.assertIn(
|
||||||
self.product_product.display_name, action_pp["context"]["default_name"]
|
self.product_product.display_name, action_pp["context"]["default_name"]
|
||||||
)
|
)
|
||||||
self.assertEquals(
|
self.assertEqual(
|
||||||
action_pp["context"]["default_product_ids"],
|
action_pp["context"]["default_product_ids"],
|
||||||
[(6, 0, self.product_product.ids)],
|
[(6, 0, self.product_product.ids)],
|
||||||
)
|
)
|
||||||
@@ -65,7 +65,7 @@ class TestStockQuantEditableViewBlock(TransactionCase):
|
|||||||
self.assertIn(
|
self.assertIn(
|
||||||
self.product_template.display_name, action_pt["context"]["default_name"]
|
self.product_template.display_name, action_pt["context"]["default_name"]
|
||||||
)
|
)
|
||||||
self.assertEquals(
|
self.assertEqual(
|
||||||
action_pt["context"]["default_product_ids"],
|
action_pt["context"]["default_product_ids"],
|
||||||
[(6, 0, self.product_template.product_variant_ids.ids)],
|
[(6, 0, self.product_template.product_variant_ids.ids)],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user