Tryton - Issues

 

Issue8793

Title Test fails with proteus > 5.0.3
Priority bug Status chatting
Superseder Nosy List ced, yangoon
Type crash Components account_fr, purchase_request
Assigned To Keywords backport
Reviews

Created on 2019-11-05.10:34:43 by yangoon, last changed by ced.

Messages
msg53045 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-05.19:24:50
This is because of rev c11ebd904c42, we must backport rev bf074f620ce8 and rev 7213d9cbe5fd to overrule the skip of readonly field.
msg53031 (view) Author: [hidden] (yangoon) (Tryton translator) Date: 2019-11-05.10:34:42
Autopkgtests of two Tryton packages on Debian CI are failing since the upload of proteus version 5.0.4 (also failing with 5.0.5).

The two packages in question are
account_fr [1]
purchase_request [2]

The error in account_fr is

"""
https://ci.debian.net/data/autopkgtest/testing/amd64/t/tryton-modules-account-fr/3324532/log.gz

/usr/lib/python3/dist-packages/trytond/modules/account_fr/tests/scenario_fec.rst
Doctest: scenario_fec.rst ... FAIL

======================================================================
FAIL:
/usr/lib/python3/dist-packages/trytond/modules/account_fr/tests/scenario_fec.rst
Doctest: scenario_fec.rst
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/doctest.py", line 2196, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scenario_fec.rst
  File
"/usr/lib/python3/dist-packages/trytond/modules/account_fr/tests/scenario_fec.rst",
line 0

----------------------------------------------------------------------
File
"/usr/lib/python3/dist-packages/trytond/modules/account_fr/tests/scenario_fec.rst",
line 148, in scenario_fec.rst
Failed example:
    with io.open(file, mode='rb') as fp:
        FEC.form.file.decode('utf-8') == fp.read().decode('utf-8')
Expected:
    True
Got:
    False
"""

I have reproduced the error on my local machine: the test succeeds with proteus 5.0.3, but fails with later versions.

The failure for purchase_request exists for the same proteus versions, so should probably caused by the same changeset(s)? Since the error for purchase_request looks different, joining here the error message for completeness:

"""
/usr/lib/python3/dist-packages/trytond/modules/purchase_request/tests/scenario_purchase_request.rst
Doctest: scenario_purchase_request.rst ... FAIL

======================================================================
FAIL:
/usr/lib/python3/dist-packages/trytond/modules/purchase_request/tests/scenario_purchase_request.rst
Doctest: scenario_purchase_request.rst
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/doctest.py", line 2196, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scenario_purchase_request.rst
  File
"/usr/lib/python3/dist-packages/trytond/modules/purchase_request/tests/scenario_purchase_request.rst",
line 0

----------------------------------------------------------------------
File
"/usr/lib/python3/dist-packages/trytond/modules/purchase_request/tests/scenario_purchase_request.rst",
line 228, in scenario_purchase_request.rst
Failed example:
    pr.save()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.7/doctest.py", line 1329, in __run
        compileflags, 1), test.globs)
      File "<doctest scenario_purchase_request.rst[136]>", line 1, in
<module>
        pr.save()
      File "/usr/lib/python3/dist-packages/proteus/__init__.py", line
93, in newfunc
        return self.func(owner, [instance], *args, **kwargs)
      File "/usr/lib/python3/dist-packages/proteus/__init__.py", line
816, in save
        ids = proxy.create(values, context)
      File "/usr/lib/python3/dist-packages/proteus/config.py", line 195,
in __call__
        result = rpc.result(meth(*args, **kwargs))
      File
"/usr/lib/python3/dist-packages/trytond/modules/purchase_request/purchase_request.py",
line 264, in create
        cls.raise_user_error('create_request')
      File "/usr/lib/python3/dist-packages/trytond/error.py", line 74,
in raise_user_error
        raise UserError(error)
    trytond.exceptions.UserError: ('UserError', ('Purchase requests are
only created by the system.', ''))
"""

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944074
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944073
History
Date User Action Args
2019-11-05 19:25:10cedsetkeyword: + backport
2019-11-05 19:24:51cedsetstatus: unread -> chatting
component: + account_fr, purchase_request
messages: + msg53045
nosy: + ced
title: Debian CI failing for proteus > 5.0.3 -> Test fails with proteus > 5.0.3
2019-11-05 10:34:43yangooncreate

Showing 10 items. Show all history (warning: this could be VERY long)