stock_card flaky error
Closed this issue · 6 comments
hbto commented
moylop260 commented
FYI
2016-09-30 17:34:51,199 274 INFO openerp_test openerp.modules.module: module stock_card: creating or updating database tables
2016-09-30 17:34:54,865 274 INFO openerp_test openerp.modules.loading: loading stock_card/security/ir.model.access.csv
2016-09-30 17:34:54,872 274 INFO openerp_test openerp.modules.loading: loading stock_card/view/view.xml
2016-09-30 17:34:55,333 274 INFO openerp_test openerp.modules.loading: loading stock_card/view/wizard.xml
2016-09-30 17:34:55,336 274 INFO openerp_test openerp.modules.loading: loading stock_card/demo/demo.xml
2016-09-30 17:35:23,316 274 INFO openerp_test openerp.modules.module: openerp.addons.stock_card.tests.test_stock_card running tests.
2016-09-30 17:35:23,317 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card: test_00_stock_card_from_product (openerp.addons.stock_card.tests.test_stock_card.TestStockCard)
2016-09-30 17:35:26,379 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card: test_01_stock_card (openerp.addons.stock_card.tests.test_stock_card.TestStockCard)
2016-09-30 17:35:28,776 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card: test_02_check_inventory_initializations (openerp.addons.stock_card.tests.test_stock_card.TestStockCard)
2016-09-30 17:35:31,787 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card: Ran 3 tests in 8.470s
2016-09-30 17:35:31,787 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card: OK
2016-09-30 17:35:31,788 274 INFO openerp_test openerp.modules.module: openerp.addons.stock_card.tests.test_stock_card tested in 8.47s, 6062 queries
2016-09-30 17:35:31,788 274 INFO openerp_test openerp.modules.module: openerp.addons.stock_card.tests.test_stock_card_negative_stock running tests.
2016-09-30 17:35:31,788 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: test_01_do_inouts (openerp.addons.stock_card.tests.test_stock_card_negative_stock.TestStockCardNegativeStock)
2016-09-30 17:36:07,076 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: Gotten Stock Card
+----+-----------+-------------+---------------------+-----------------------+-----------+------------------+---------------+-------+-------------------------+
| | average | cost_unit | date | inventory_valuation | move_id | move_valuation | product_qty | qty | stock_card_product_id |
|----+-----------+-------------+---------------------+-----------------------+-----------+------------------+---------------+-------+-------------------------|
| 0 | 20 | 20 | 2016-01-01 02:00:00 | 40 | 87 | 40 | 2 | 2 | 0 |
| 1 | 32 | 40 | 2016-01-01 03:00:00 | 160 | 88 | 120 | 5 | 3 | 0 |
| 2 | 32 | 32 | 2016-01-01 04:00:00 | 128 | 89 | -32 | 4 | -1 | 0 |
| 3 | 60 | 88 | 2016-01-01 05:00:00 | 480 | 90 | 352 | 8 | 4 | 0 |
| 4 | 60 | 60 | 2016-01-01 06:00:00 | 60 | 91 | -420 | 1 | -7 | 0 |
| 5 | 64 | 62 | 2016-01-01 07:00:00 | -64 | 92 | -124 | -1 | -2 | 0 |
| 6 | 64 | 64 | 2016-01-01 08:00:00 | 192 | 93 | 256 | 3 | 4 | 0 |
| 7 | 29.3333 | 46.6667 | 2016-01-01 09:00:00 | -88 | 94 | -280 | -3 | -6 | 0 |
| 8 | 32.8 | 38 | 2016-01-01 10:00:00 | -164 | 95 | -76 | -5 | -2 | 0 |
| 9 | 48 | 48 | 2016-01-01 11:00:00 | -68 | 96 | 96 | -3 | 2 | 0 |
| 10 | 52 | 56 | 2016-01-01 12:00:00 | 44 | 97 | 112 | -1 | 2 | 0 |
| 11 | 38 | 24 | 2016-01-01 13:00:00 | 140 | 98 | 96 | 3 | 4 | 0 |
+----+-----------+-------------+---------------------+-----------------------+-----------+------------------+---------------+-------+-------------------------+
2016-09-30 17:36:07,080 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: Expected Stock Card
+----+-------+--------+---------------+-------------+--------------+-------+
| | avg | cost | do_purchase | inv_value | move_value | qty |
|----+-------+--------+---------------+-------------+--------------+-------|
| 0 | 20 | 20 | 1 | 40 | 40 | 2 |
| 1 | 32 | 40 | 1 | 160 | 120 | 3 |
| 2 | 32 | 32 | 0 | 128 | -32 | 1 |
| 3 | 60 | 88 | 1 | 480 | 352 | 4 |
| 4 | 60 | 60 | 0 | 60 | -420 | 7 |
| 5 | 64 | 62 | 0 | -64 | -124 | 2 |
| 6 | 64 | 64 | 1 | 192 | 256 | 4 |
| 7 | 38 | 51 | 0 | -114 | -306 | 6 |
| 8 | 38 | 38 | 0 | -190 | -76 | 2 |
| 9 | 48 | 48 | 1 | -94 | 96 | 2 |
| 10 | 52 | 56 | 1 | 18 | 112 | 2 |
| 11 | 38 | 24 | 1 | 114 | 96 | 4 |
+----+-------+--------+---------------+-------------+--------------+-------+
2016-09-30 17:36:07,081 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: FAIL
2016-09-30 17:36:07,082 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: ======================================================================
2016-09-30 17:36:07,082 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: FAIL: test_01_do_inouts (openerp.addons.stock_card.tests.test_stock_card_negative_stock.TestStockCardNegativeStock)
2016-09-30 17:36:07,082 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: Traceback (most recent call last):
2016-09-30 17:36:07,082 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: ` File "/root/addons-vauxoo/stock_card/tests/test_stock_card_negative_stock.py", line 206, in test_01_do_inouts
2016-09-30 17:36:07,083 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: ` "Average Cost %s is not the expected" % expected)
2016-09-30 17:36:07,083 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: ` AssertionError: 38 != 29.333333333333332 : Average Cost {'move_value': -306, 'do_purchase': False, 'inv_value': -114, 'qty': 6, 'cost': 51, 'avg': 38} is not the expected
2016-09-30 17:36:07,083 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: Ran 1 test in 35.294s
2016-09-30 17:36:07,083 274 ERROR openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: FAILED
2016-09-30 17:36:07,083 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: (failures=1)
2016-09-30 17:36:07,083 274 INFO openerp_test openerp.modules.module: openerp.addons.stock_card.tests.test_stock_card_negative_stock tested in 35.30s, 22650 queries
2016-09-30 17:36:07,083 274 ERROR openerp_test openerp.modules.module: Module stock_card: 1 failures, 0 errors
2016-09-30 17:36:07,084 274 INFO openerp_test openerp.modules.module: openerp.addons.stock_card.tests.test_stock_card_product_returns running tests.
2016-09-30 17:36:07,084 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_product_returns: test_01_do_inouts (openerp.addons.stock_card.tests.test_stock_card_product_returns.TestStockCardProductReturns)
2016-09-30 17:36:07,262 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_product_returns: Ran 1 test in 0.178s
2016-09-30 17:36:07,263 274 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_product_returns: OK
moylop260 commented
I don't know if is useful but the modules installed before was (extracted from log output):
base,base_partner_sequence,odoolint_isolated,auth_crypt,base_location,decimal_precision,l10n_pa_localization,resource,web,base_import,board,bus,instance_introspection,l10n_pa_cities,profiler,report,tour_hide_dom_log_isolated,web_calendar,web_diagram,web_environment_ribbon_isolated,web_gantt,web_graph,web_kanban,web_tree_image,web_view_editor,web_widget_datepicker_options,web_widget_x2many_graph,admin_technical_features,base_setup,im_chat,report_webkit,web_kanban_gauge,web_kanban_sparkline,web_tests,auth_password_settings,im_odoo_support,knowledge,mail,marketing,analytic,base_action_rule,disable_openerp_online,document,email_template,fetchmail,forecasting_smoothing_techniques,hr,mail_delete_sent_by_footer,product,sales_team,share,auth_signup,calendar,edi,hr_attendance,hr_blood_type,hr_contract,hr_employee_accessories,hr_employee_declares_isr,hr_employee_dependant,hr_employee_licence,hr_employee_perception,hr_family,hr_passport_employee,l10n_pa_hr_marital_status,procurement,product_brand,product_manufacturer,product_warranty,web_debranding,website,account,crm,hr_holidays,hr_working_shifts_switch,portal,procurement_jit,stock,survey,website_block_indexing,website_hr,website_hr_directory,website_less,website_mail,website_partner,website_report,account_asset,account_cancel,account_chart,account_coa,account_coa_manager,account_voucher,base_vat,crm_claim,crm_rma_location,fiscal_printer,hr_payroll,hr_recruitment,marketing_crm,partner_address_format,payment,procurement_jit_stock,stock_account,stock_mts_mto_rule,stock_no_negative,survey_crm,theme_common,website_blog,website_crm,account_accountant,hr_applicant_document,l10n_pa,l10n_pa_vat,mrp,payment_transfer,portal_claim,product_unique_serial,purchase,sale,snippet_google_map,snippet_latest_posts,stock_landed_costs,website_hr_recruitment,account_anglo_saxon,hr_expense,mrp_repair,portal_sale,purchase_double_validation,purchase_requisition,sale_crm,sale_stock,theme_avantgarde,vat_partitioned,website_sale,crm_rma_prodlot_invoice,delivery,hr_payroll_account,portal_stock,sale_mrp,sale_order_dates,snippet_omnisearch,snippet_product_categories,snippet_product_deals,website_multi_image_irattachment,website_product_compare,website_qa,website_sale_options,website_wishlist,hr_loan,website_sale_delivery,odoolint_isolated,partner_foreign,controller_report_xls,message_post_model,hr_lastname,product_unique_default_code,website_authorized_service_centers,account_analytic_required,account_currency_tools,account_financial_report,account_move_filters,account_move_line_grouping,account_move_report,aging_due_report,payment_term_type,purchase_incoming_qty,stock_move_entries,stock_transfer_avoid_lot_repeated_split,stock_unfuck,account_invoice_line_asset_category_required,account_move_line_group_by_asset,account_reconcile_grouping,stock_deviation_account,account_group_auditory,account_move_line_production,account_smart_unreconcile,costing_method_settings,mrp_routing_account_journal,purchase_rfq_xls,sale_order_due_date,stock_card
moylop260 commented
FYI We had other results from other build
+----+-----------+-------------+---------------------+-----------------------+-----------+------------------+---------------+-------+-------------------------+
| | average | cost_unit | date | inventory_valuation | move_id | move_valuation | product_qty | qty | stock_card_product_id |
|----+-----------+-------------+---------------------+-----------------------+-----------+------------------+---------------+-------+-------------------------|
| 0 | 20 | 20 | 2016-01-01 02:00:00 | 40 | 87 | 40 | 2 | 2 | 0 |
| 1 | 32 | 40 | 2016-01-01 03:00:00 | 160 | 88 | 120 | 5 | 3 | 0 |
| 2 | 32 | 32 | 2016-01-01 04:00:00 | 128 | 89 | -32 | 4 | -1 | 0 |
| 3 | 60 | 88 | 2016-01-01 05:00:00 | 480 | 90 | 352 | 8 | 4 | 0 |
| 4 | 60 | 60 | 2016-01-01 06:00:00 | 60 | 91 | -420 | 1 | -7 | 0 |
| 5 | 64 | 62 | 2016-01-01 07:00:00 | -64 | 92 | -124 | -1 | -2 | 0 |
| 6 | 64 | 64 | 2016-01-01 08:00:00 | 192 | 93 | 256 | 3 | 4 | 0 |
| 7 | 20.6667 | 42.3333 | 2016-01-01 09:00:00 | -62 | 94 | -254 | -3 | -6 | 0 |
| 8 | 27.6 | 38 | 2016-01-01 10:00:00 | -138 | 95 | -76 | -5 | -2 | 0 |
| 9 | 48 | 48 | 2016-01-01 11:00:00 | -42 | 96 | 96 | -3 | 2 | 0 |
| 10 | 52 | 56 | 2016-01-01 12:00:00 | 70 | 97 | 112 | -1 | 2 | 0 |
| 11 | 38 | 24 | 2016-01-01 13:00:00 | 166 | 98 | 96 | 3 | 4 | 0 |
+----+-----------+-------------+---------------------+-----------------------+-----------+------------------+---------------+-------+-------------------------+
2016-10-18 21:35:45,451 249 INFO openerp_test openerp.addons.stock_card.tests.test_stock_card_negative_stock: Expected Stock Card
+----+-------+--------+---------------+-------------+--------------+-------+
| | avg | cost | do_purchase | inv_value | move_value | qty |
|----+-------+--------+---------------+-------------+--------------+-------|
| 0 | 20 | 20 | 1 | 40 | 40 | 2 |
| 1 | 32 | 40 | 1 | 160 | 120 | 3 |
| 2 | 32 | 32 | 0 | 128 | -32 | 1 |
| 3 | 60 | 88 | 1 | 480 | 352 | 4 |
| 4 | 60 | 60 | 0 | 60 | -420 | 7 |
| 5 | 64 | 62 | 0 | -64 | -124 | 2 |
| 6 | 64 | 64 | 1 | 192 | 256 | 4 |
| 7 | 38 | 51 | 0 | -114 | -306 | 6 |
| 8 | 38 | 38 | 0 | -190 | -76 | 2 |
| 9 | 48 | 48 | 1 | -94 | 96 | 2 |
| 10 | 52 | 56 | 1 | 18 | 112 | 2 |
| 11 | 38 | 24 | 1 | 114 | 96 | 4 |
+----+-------+--------+---------------+-------------+--------------+-------+
hbto commented
@moylop260 Thanks for help @moylop260
moylop260 commented
@hbto I can reproduce it
Using the script extract modules order from log I saw the following order:
- openerp_template
base,base_partner_sequence,odoolint_isolated,auth_crypt,base_location,decimal_precision,l10n_pa_localization,resource,web,base_import,board,bus,instance_introspection,l10n_pa_cities,profiler,report,tour_hide_dom_log_isolated,web_calendar,web_diagram,web_environment_ribbon_isolated,web_gantt,web_graph,web_kanban,web_tree_image,web_view_editor,web_widget_datepicker_options,web_widget_x2many_graph,admin_technical_features,base_setup,im_chat,report_webkit,web_kanban_gauge,web_kanban_sparkline,web_tests,auth_password_settings,im_odoo_support,knowledge,mail,marketing,analytic,base_action_rule,disable_openerp_online,document,email_template,fetchmail,forecasting_smoothing_techniques,hr,mail_delete_sent_by_footer,product,sales_team,share,auth_signup,calendar,edi,hr_attendance,hr_blood_type,hr_contract,hr_employee_accessories,hr_employee_declares_isr,hr_employee_dependant,hr_employee_licence,hr_employee_perception,hr_family,hr_passport_employee,l10n_pa_hr_marital_status,procurement,product_brand,product_manufacturer,product_warranty,web_debranding,website,account,crm,hr_holidays,hr_working_shifts_switch,portal,procurement_jit,stock,survey,website_block_indexing,website_hr,website_hr_directory,website_less,website_mail,website_partner,website_report,account_asset,account_cancel,account_chart,account_coa,account_coa_manager,account_voucher,base_vat,crm_claim,crm_rma_location,fiscal_printer,hr_payroll,hr_recruitment,marketing_crm,partner_address_format,payment,procurement_jit_stock,stock_account,stock_mts_mto_rule,stock_no_negative,survey_crm,theme_common,website_blog,website_crm,account_accountant,hr_applicant_document,l10n_pa,l10n_pa_vat,mrp,payment_transfer,portal_claim,product_unique_serial,purchase,sale,snippet_google_map,snippet_latest_posts,stock_landed_costs,website_hr_recruitment,account_anglo_saxon,hr_expense,mrp_repair,portal_sale,purchase_double_validation,purchase_requisition,sale_crm,sale_stock,theme_avantgarde,vat_partitioned,website_sale,crm_rma_prodlot_invoice,delivery,hr_payroll_account,l10n_pa_reports,portal_stock,sale_mrp,sale_order_dates,snippet_omnisearch,snippet_product_categories,snippet_product_deals,website_multi_image_irattachment,website_product_compare,website_qa,website_sale_options,website_wishlist,hr_loan,website_sale_delivery
- openerp_test
createdb -T openerp_template openerp_test
partner_foreign,controller_report_xls,message_post_model,hr_lastname,product_unique_default_code,website_authorized_service_centers,account_analytic_required,account_currency_tools,account_financial_report,account_move_filters,account_move_line_grouping,account_move_report,aging_due_report,payment_term_type,purchase_incoming_qty,stock_move_entries,stock_transfer_avoid_lot_repeated_split,stock_unfuck,account_invoice_line_asset_category_required,account_move_line_group_by_asset,account_reconcile_grouping,stock_deviation_account,account_group_auditory,account_move_line_production,account_smart_unreconcile,costing_method_settings,mrp_routing_account_journal,purchase_rfq_xls,sale_order_due_date,stock_card
Then I have created the following script to reproduce it:
export NAME=moy6
dropdb $NAME;createdb -T openerp_template $NAME
~/odoo-8.0/odoo.py --logfile=${NAME}.out -d $NAME --stop-after-init -i partner_foreign,controller_report_xls,message_post_model,hr_lastname,product_unique_default_code,website_authorized_service_centers,account_analytic_required,account_currency_tools,account_financial_report,account_move_filters,account_move_line_grouping,account_move_report,aging_due_report,payment_term_type,purchase_incoming_qty,stock_move_entries,stock_transfer_avoid_lot_repeated_split,stock_unfuck,account_invoice_line_asset_category_required,account_move_line_group_by_asset,account_reconcile_grouping,stock_deviation_account,account_group_auditory,account_move_line_production,account_smart_unreconcile,costing_method_settings,mrp_routing_account_journal,purchase_rfq_xls,sale_order_due_date,stock_card --test-enable --xmlrpc-port=18069
export NAME=moy7
dropdb $NAME;createdb -T openerp_template $NAME
~/odoo-8.0/odoo.py --logfile=${NAME}.out -d $NAME --stop-after-init -i partner_foreign,controller_report_xls,message_post_model,hr_lastname,product_unique_default_code,website_authorized_service_centers,account_analytic_required,account_currency_tools,account_financial_report,account_move_filters,account_move_line_grouping,account_move_report,aging_due_report,payment_term_type,purchase_incoming_qty,stock_move_entries,stock_transfer_avoid_lot_repeated_split,stock_unfuck,account_invoice_line_asset_category_required,account_move_line_group_by_asset,account_reconcile_grouping,stock_deviation_account,account_group_auditory,account_move_line_production,account_smart_unreconcile,costing_method_settings,mrp_routing_account_journal,purchase_rfq_xls,sale_order_due_date,stock_card --test-enable --xmlrpc-port=18069
export NAME=moy8
dropdb $NAME;createdb -T openerp_template $NAME
~/odoo-8.0/odoo.py --logfile=${NAME}.out -d $NAME --stop-after-init -i partner_foreign,controller_report_xls,message_post_model,hr_lastname,product_unique_default_code,website_authorized_service_centers,account_analytic_required,account_currency_tools,account_financial_report,account_move_filters,account_move_line_grouping,account_move_report,aging_due_report,payment_term_type,purchase_incoming_qty,stock_move_entries,stock_transfer_avoid_lot_repeated_split,stock_unfuck,account_invoice_line_asset_category_required,account_move_line_group_by_asset,account_reconcile_grouping,stock_deviation_account,account_group_auditory,account_move_line_production,account_smart_unreconcile,costing_method_settings,mrp_routing_account_journal,purchase_rfq_xls,sale_order_due_date,stock_card --test-enable --xmlrpc-port=18069
# repeat 10 times
After of review the logs rgrep "ERROR" *.out
I saw the error reproduce it