Il giorno lunedì 12 febbraio 2018 10:29:56 UTC+1, Cato Nano ha scritto:
> I am creating some new calculated fields, running tests along the way
> 
> The last one of such fields is giving me troubles
> 
> This is the result of running the tests
> 
> 
> .............F
> ======================================================================
> FAIL: 
> /home/catonano/tributi/build/lib/trytond/modules/tributi/tests/scenario_affissioni.rst
> Doctest: scenario_affissioni.rst
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib64/python3.6/doctest.py", line 2199, in runTest
>     raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for scenario_affissioni.rst
>   File 
> "/home/catonano/tributi/build/lib/trytond/modules/tributi/tests/scenario_affissioni.rst",
>  line 0
> 
> ----------------------------------------------------------------------
> File 
> "/home/catonano/tributi/build/lib/trytond/modules/tributi/tests/scenario_affissioni.rst",
>  line 77, in scenario_affissioni.rst
> Failed example:
>     bolletta.lines.append(unaAffissione)
> Exception raised:
>     Traceback (most recent call last):
>       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run
>         compileflags, 1), test.globs)
>       File "<doctest scenario_affissioni.rst[52]>", line 1, in <module>
>         bolletta.lines.append(unaAffissione)
>       File 
> "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/__init__.py", 
> line 553, in append
>         self.__check([record])
>       File 
> "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/__init__.py", 
> line 548, in __check
>         setattr(record, self.parent_name, self.parent)
>       File 
> "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/__init__.py", 
> line 260, in __set__
>         super(Many2OneDescriptor, self).__set__(instance, value)
>       File 
> "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/__init__.py", 
> line 129, in __set__
>         instance._on_change([self.name])
>       File 
> "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/__init__.py", 
> line 1076, in _on_change
>         context)
>       File 
> "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", 
> line 164, in __call__
>         raise TypeError('%s is not callable' % self._name)
>     TypeError: on_change_with_risultatoRigo is not callable
> 
> 
> ----------------------------------------------------------------------
> Ran 14 tests in 16.610s
> 
> FAILED (failures=1)
> 
> 
> 
> why is it not callable ? 
> 
> It's no different than many other methods and they are all callable
> 
> It' s here
> https://gitlab.com/humanitiesNerd/tributi/blob/master/affissione.py#L165
> 
> Thanks in advance

even from within Proteus I can' t find the attribute.

I don't understand, it's no different than at least other 3 fields; 

Those work. This one doesn't

For now I gave up in making it depend on another calculated field and I' m 
doing the same calculations again

But the fact that I don' t understand the issue makes me uncomfortable

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/90f4897c-1358-4bef-9823-1bd70e467a88%40googlegroups.com.

Reply via email to