Migrate to python 3.
This commit is contained in:
parent
7b3666603d
commit
9d34f416d8
|
@ -282,7 +282,7 @@ class TemplateLine(UnionMixin, sequence_ordered(), ModelSQL, ModelView):
|
|||
for model in models:
|
||||
record = cls.union_unshard(model.id)
|
||||
models_to_write[record.__name__].extend(([record], values))
|
||||
for model, arguments in models_to_write.iteritems():
|
||||
for model, arguments in models_to_write.items():
|
||||
Model = pool.get(model)
|
||||
Model.write(*arguments)
|
||||
|
||||
|
@ -295,7 +295,7 @@ class TemplateLine(UnionMixin, sequence_ordered(), ModelSQL, ModelView):
|
|||
for model in lines:
|
||||
record = cls.union_unshard(model.id)
|
||||
models_to_delete[record.__name__].append(record)
|
||||
for model, records in models_to_delete.iteritems():
|
||||
for model, records in models_to_delete.items():
|
||||
Model = pool.get(model)
|
||||
Model.delete(records)
|
||||
|
||||
|
@ -780,7 +780,7 @@ class TestLine(UnionMixin, sequence_ordered(), ModelSQL, ModelView):
|
|||
for model in models:
|
||||
record = cls.union_unshard(model.id)
|
||||
models_to_write[record.__name__].extend(([record], values))
|
||||
for model, arguments in models_to_write.iteritems():
|
||||
for model, arguments in models_to_write.items():
|
||||
Model = pool.get(model)
|
||||
Model.write(*arguments)
|
||||
|
||||
|
@ -793,7 +793,7 @@ class TestLine(UnionMixin, sequence_ordered(), ModelSQL, ModelView):
|
|||
for model in lines:
|
||||
record = cls.union_unshard(model.id)
|
||||
models_to_delete[record.__name__].append(record)
|
||||
for model, records in models_to_delete.iteritems():
|
||||
for model, records in models_to_delete.items():
|
||||
Model = pool.get(model)
|
||||
Model.delete(records)
|
||||
|
||||
|
|
6
setup.py
6
setup.py
|
@ -4,11 +4,7 @@ from setuptools import setup
|
|||
import re
|
||||
import os
|
||||
import io
|
||||
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
from configparser import ConfigParser
|
||||
|
||||
MODULE = 'quality_control'
|
||||
PREFIX = 'nantic'
|
||||
|
|
|
@ -34,7 +34,6 @@ Create product::
|
|||
>>> template.default_uom = unit
|
||||
>>> template.type = 'service'
|
||||
>>> template.list_price = Decimal('40')
|
||||
>>> template.cost_price = Decimal('25')
|
||||
>>> template.save()
|
||||
>>> product.template = template
|
||||
>>> product.save()
|
||||
|
@ -153,25 +152,25 @@ Confirm Test::
|
|||
|
||||
>>> test.save()
|
||||
>>> test.state
|
||||
u'draft'
|
||||
'draft'
|
||||
>>> Test.confirmed([test.id], config.context)
|
||||
>>> test.reload()
|
||||
>>> test.state
|
||||
u'confirmed'
|
||||
'confirmed'
|
||||
|
||||
Validate "successful" Test::
|
||||
|
||||
>>> Test.manager_validate([test.id], config.context)
|
||||
>>> test.reload()
|
||||
>>> test.state
|
||||
u'successful'
|
||||
'successful'
|
||||
|
||||
Set To Draft Test::
|
||||
|
||||
>>> Test.draft([test.id], config.context)
|
||||
>>> test.reload()
|
||||
>>> test.state
|
||||
u'draft'
|
||||
'draft'
|
||||
|
||||
Modify test to check failed test::
|
||||
|
||||
|
@ -181,4 +180,4 @@ Modify test to check failed test::
|
|||
>>> Test.manager_validate([test.id], config.context)
|
||||
>>> test.reload()
|
||||
>>> test.state
|
||||
u'failed'
|
||||
'failed'
|
||||
|
|
Loading…
Reference in New Issue