Remove constraint of positive sign on analytic move lines
Analytic account move lines have a constraint so that negative values are not allowed. This constraint does not exist in account move lines so it might cause some inconsistencies between both. Apparently the constraint should have been removed in rev 0 but wasn't.
I was suggested to propose here the change ( https://discuss.tryton.org/t/rationale-behind-positive-sign-constraint-in-analytic-move-lines/917/4 ). I'm not an active developer of the project so excuse me for not posting a proper patch. Anyway here's what should be changed:
The __setup__ method of the Line class (line.py on module analytic_account) should replace this:
cls._sql_constraints += [
('credit_debit',
'CHECK((credit * debit = 0.0) AND (credit + debit >= 0.0))',
'Wrong credit/debit values.'),
with this:
cls._sql_constraints += [
('credit_debit',
'CHECK((credit * debit = 0.0))',
'Wrong credit/debit values.'),