When should a module be included in tryton.cfg depends

What are the rules about what modules should be listed in the depends of a module?

The reason I’m asking is because in the sales module the CountryMixin in sale_reporting.py includes a Many2One field to country.country. However the country module is not included in the depends section of trytond.cfg.

I’m guessing this hasn’t been a problem because the sales module also depends on the party module, which in turn depends on the country module. So indirectly the sale module does depend on the country module.

But, as the country module is directly required by the sale module, shouldn’t the country module be included in the depends of sale? Or doesn’t it matter?

A module should be included in depends when the code is using any Model, method or record defined/created by it.

So your example, sale module should depend on country module.

I’ve created Issue 9889: Include country module in sale's module depends - Tryton issue tracker

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.