+5
-9
@@ -8,7 +8,7 @@ Imports::
|
||||
>>> from decimal import Decimal
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
>>> from trytond.modules.company.tests.tools import (
|
||||
... create_company, get_company)
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -89,24 +89,20 @@ Create purchase from blanket agreement::
|
||||
|
||||
>>> create_purchase = Wizard(
|
||||
... 'purchase.blanket_agreement.create_purchase', [blanket_agreement])
|
||||
>>> create_purchase.form.lines[0].unit == gr
|
||||
True
|
||||
>>> assertEqual(create_purchase.form.lines[0].unit, gr)
|
||||
>>> create_purchase.execute('create_purchase')
|
||||
|
||||
>>> purchase, = create_purchase.actions[0]
|
||||
>>> line, = purchase.lines
|
||||
>>> line.product == product
|
||||
True
|
||||
>>> assertEqual(line.product, product)
|
||||
|
||||
>>> line.secondary_unit == gr
|
||||
True
|
||||
>>> assertEqual(line.secondary_unit, gr)
|
||||
>>> line.secondary_quantity
|
||||
800.0
|
||||
>>> line.secondary_unit_price
|
||||
Decimal('7.0000')
|
||||
|
||||
>>> line.unit == unit
|
||||
True
|
||||
>>> assertEqual(line.unit, unit)
|
||||
>>> line.quantity
|
||||
8.0
|
||||
>>> line.unit_price
|
||||
|
||||
+2
-3
@@ -8,7 +8,7 @@ Imports::
|
||||
>>> from decimal import Decimal
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
>>> from trytond.modules.company.tests.tools import (
|
||||
... create_company, get_company)
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -100,8 +100,7 @@ Create Purchase order from Request::
|
||||
>>> create_purchase.execute('start')
|
||||
>>> request.state
|
||||
'purchased'
|
||||
>>> request.purchase_line.unit == unit
|
||||
True
|
||||
>>> assertEqual(request.purchase_line.unit, unit)
|
||||
>>> request.purchase_line.quantity
|
||||
3.0
|
||||
>>> request.purchase_line.unit_price
|
||||
|
||||
@@ -6,7 +6,7 @@ Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, \
|
||||
@@ -123,8 +123,7 @@ Check secondary unit on invoice::
|
||||
|
||||
>>> invoice, = purchase.invoices
|
||||
>>> line, = invoice.lines
|
||||
>>> line.secondary_unit == kg
|
||||
True
|
||||
>>> assertEqual(line.secondary_unit, kg)
|
||||
>>> line.secondary_quantity
|
||||
2.0
|
||||
>>> line.secondary_unit_price
|
||||
@@ -133,8 +132,7 @@ Check secondary unit on invoice::
|
||||
Check secondary unit on move::
|
||||
|
||||
>>> move, = purchase.moves
|
||||
>>> move.secondary_unit == kg
|
||||
True
|
||||
>>> assertEqual(move.secondary_unit, kg)
|
||||
>>> move.secondary_quantity
|
||||
2.0
|
||||
>>> move.secondary_unit_price
|
||||
|
||||
Reference in New Issue
Block a user