El 22/10/2013 15:01, "Gmail - Iasmini" <[email protected]> va
escriure:
>>
>> It is weird that your module appears before account_invoice. Did you add
>> account_invoice in your module tryton.cfg depends ?
>
>
> I had not added. I added and worked. I did not know that missing
dependencies could give this type of error. I'll add next time.

To detect this kind of errors (related to dependencies) is very useful to
install the module in a new database where you only install your module and
it forces to install its dependencies.

It can also be tested with unit test (but some errors are only detecged
when you install the module stamdalone).
Despite it can sounds hard, it is very easy to add a unit test to check the
views. As you can find in all core and most of cobtributors modules, you
only need a "tests" directory with a test_<module name>.py file and it is a
copy-paste of others that only have the methods test_depends() and
test_views().
In nantic user of bitbucket you will find a tryton_module_skel repo with
the base files for any module. It could help you.

The unit test with, at least, test_depends() and test_views() is STRONGLY
recommended and will save you some hours of debug.

Cheers,
Guillem
PD: I don't put any link because I'm writting from mobile

Reply via email to