changeset 4f8285582efc in modules/stock_lot_unit:default
details:
https://hg.tryton.org/modules/stock_lot_unit?cmd=changeset&node=4f8285582efc
description:
Remove default currency on stock move
issue11512
review433171003
diffstat:
tests/scenario_stock_lot_unit.rst | 6 ++++++
tests/scenario_stock_lot_unit_move_add.rst | 5 ++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diffs (78 lines):
diff -r e71744c95047 -r 4f8285582efc tests/scenario_stock_lot_unit.rst
--- a/tests/scenario_stock_lot_unit.rst Mon May 02 17:15:35 2022 +0200
+++ b/tests/scenario_stock_lot_unit.rst Thu Sep 29 09:08:06 2022 +0200
@@ -68,12 +68,14 @@
>>> move1.product = product
>>> move1.quantity = 60
>>> move1.unit_price = Decimal('8')
+ >>> move1.currency = company.currency
>>> move1.from_location = supplier_loc
>>> move1.to_location = input_loc
>>> move2 = shipment.incoming_moves.new()
>>> move2.product = product
>>> move2.quantity = 40
>>> move2.unit_price = Decimal('8')
+ >>> move2.currency = company.currency
>>> move2.from_location = supplier_loc
>>> move2.to_location = input_loc
>>> shipment.click('receive')
@@ -96,6 +98,7 @@
>>> move.product = product
>>> move.quantity = 1
>>> move.unit_price = Decimal('20')
+ >>> move.currency = company.currency
>>> move.from_location = output_loc
>>> move.to_location = customer_loc
>>> shipment.click('wait')
@@ -117,12 +120,14 @@
>>> move1.product = product
>>> move1.quantity = 1
>>> move1.unit_price = Decimal('20')
+ >>> move1.currency = company.currency
>>> move1.from_location = output_loc
>>> move1.to_location = customer_loc
>>> move2 = shipment.outgoing_moves.new()
>>> move2.product = product
>>> move2.quantity = 1
>>> move2.unit_price = Decimal('20')
+ >>> move2.currency = company.currency
>>> move2.from_location = output_loc
>>> move2.to_location = customer_loc
>>> shipment.click('wait')
@@ -149,6 +154,7 @@
>>> move.product = product
>>> move.quantity = 4
>>> move.unit_price = Decimal('20')
+ >>> move.currency = company.currency
>>> move.from_location = output_loc
>>> move.to_location = customer_loc
>>> shipment.click('wait')
diff -r e71744c95047 -r 4f8285582efc tests/scenario_stock_lot_unit_move_add.rst
--- a/tests/scenario_stock_lot_unit_move_add.rst Mon May 02 17:15:35
2022 +0200
+++ b/tests/scenario_stock_lot_unit_move_add.rst Thu Sep 29 09:08:06
2022 +0200
@@ -7,7 +7,8 @@
>>> from decimal import Decimal
>>> from proteus import Model, Wizard
>>> from trytond.tests.tools import activate_modules
- >>> from trytond.modules.company.tests.tools import create_company
+ >>> from trytond.modules.company.tests.tools import create_company, \
+ ... get_company
Activate modules::
@@ -16,6 +17,7 @@
Create company::
>>> _ = create_company()
+ >>> company = get_company()
Create product::
@@ -46,6 +48,7 @@
>>> move.product = product
>>> move.quantity = 5
>>> move.unit_price = Decimal('20')
+ >>> move.currency = company.currency
>>> move.save()
Create a lot::