changeset 946e7c3b0941 in modules/product_cost_history:default
details:
https://hg.tryton.org/modules/product_cost_history?cmd=changeset;node=946e7c3b0941
description:
Convert read column into proper type with SQLite
As SQLite has few basic types, we must use column names cast parsing to
ensure
to read values in proper type.
issue9652
review310801004
diffstat:
tests/scenario_product_cost_history.rst | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (18 lines):
diff -r 1de1a1a9d22e -r 946e7c3b0941 tests/scenario_product_cost_history.rst
--- a/tests/scenario_product_cost_history.rst Mon Oct 19 00:30:10 2020 +0200
+++ b/tests/scenario_product_cost_history.rst Wed Oct 21 23:11:13 2020 +0200
@@ -104,10 +104,10 @@
>>> [c.cost_price for c in ProductCostHistory.find([], order=order)] == [
... Decimal('100.0000'), Decimal('120.0000'), Decimal('110.0000')]
True
- >>> [str(c.date) for c in ProductCostHistory.find([], order=order)] == [
- ... str(today - dt.timedelta(days=2)),
- ... str(today - dt.timedelta(days=1)),
- ... str(today)]
+ >>> [c.date for c in ProductCostHistory.find([], order=order)] == [
+ ... today - dt.timedelta(days=2),
+ ... today - dt.timedelta(days=1),
+ ... today]
True
Check cost price history on product::