New year's changes
This first of January I will start working with Cédric Krier and Bertrand Chenal from b2ck. I will work with Cédric on a Tryton project in Holland. This project is really interesting and will bring a lot of improvements to the tryton client and server. I am really happy with this turn in my life since it will allow me to work on more interesting problems in a better and more thought-challenging environment.
The first development I am working on is a functionality that will propagate constraints from domain to the opened tabs in the tryton client. To make things clearer an example is probably necessary. With tryton (or openerp) you can set a constraint on fields or views by setting what is called a domain. So to ensure some business rules are enforced we sometimes need to inverse the domain so that people creating object won't be able to violate the rules we defined with the domain.
So what I needed was a module that could do this (taken from my tests):
>>> domain = ['OR', ('x', '=', 3), ('y', '>', 5), ('z', '=', 'abc')]
>>> inversion(domain, 'x')
[('x', '=', 3)]
>>> inversion(domain, 'x', {'y': 4})
[('x', '=', 3)]
>>> inversion(domain, 'x', {'y': 7})
True
The last result stating that there is no constraint on the x fields since the domain constraint is already met by the y value in the context.
Another focus point will be the creation of a connection manager inspired by the one used by gajim. This will prove a nice UI addition for less technical users.