Patch assignation required in test scenario to create move without shipment
This commit is contained in:
1 parent
b5a13b5c5e
commit
be609bf3e8
13 files changed
+105
No files matched your search
@@ -6,13 +6,21 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('product_cost_fifo', create_company)
|
||||
|
||||
@@ -6,13 +6,21 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('product_cost_fifo', create_company)
|
||||
|
||||
@@ -6,13 +6,22 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('product_cost_fifo', create_company)
|
||||
|
||||
+9
@@ -6,14 +6,23 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
>>> yesterday = today - dt.timedelta(days=1)
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('product_cost_fifo', create_company)
|
||||
|
||||
@@ -6,13 +6,21 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('product_cost_fifo', create_company)
|
||||
|
||||
@@ -5,11 +5,19 @@ Product Cost FIFO Warehouse Scenario
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate product_cost_warehouse::
|
||||
|
||||
>>> config = activate_modules(
|
||||
|
||||
@@ -5,11 +5,19 @@ Product Cost Warehouse Scenario
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('product_cost_warehouse', create_company)
|
||||
|
||||
@@ -6,15 +6,23 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
>>> next_day = today + dt.timedelta(days=1)
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock', create_company)
|
||||
|
||||
@@ -5,12 +5,20 @@ Stock Product Replace Scenario
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import (
|
||||
... activate_modules, assertEqual, assertFalse, assertTrue)
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
@@ -6,13 +6,21 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual, assertFalse
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock', create_company)
|
||||
|
||||
@@ -6,15 +6,23 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
>>> yesterday = today - dt.timedelta(days=1)
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock', create_company)
|
||||
|
||||
@@ -12,6 +12,7 @@ Imports::
|
||||
>>> from trytond.ir.date import Date
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> period_close = globals().get('period_close', False)
|
||||
@@ -22,6 +23,12 @@ Patch today::
|
||||
>>> mock = patch.object(Date, 'today', return_value=dt.date(2025, 1, 15))
|
||||
>>> _ = mock.start()
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock', create_company)
|
||||
|
||||
@@ -6,15 +6,23 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.modules.stock.move import Move
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
>>> yesterday = today - dt.timedelta(days=1)
|
||||
|
||||
Patch on_change_with_assignation_required::
|
||||
|
||||
>>> _ = patch.object(
|
||||
... Move, 'on_change_with_assignation_required',
|
||||
... return_value=False).start()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock', create_company)
|
||||
|
||||
Reference in new issue
Block a user