Tryton - Issues



Title Remove constraint of positive sign on analytic move lines
Priority bug Status resolved
Superseder Nosy List ced, ptarra, reviewbot, roundup-bot
Type behavior Components analytic_account
Assigned To ced Keywords easy, review
Reviews 60471002
View: 60471002

Created on 2018-11-30.16:18:06 by ptarra, last changed by roundup-bot.

New changeset 13216efc8fe9 by Cédric Krier in branch 'default':
Remove positive constraint on debit/credit
New changeset 6c704c8bfdb6 by Cédric Krier in branch 'default':
Remove positive constraint on debit/credit
review60471002 updated at
msg45096 (view) Author: [hidden] (ptarra) Date: 2018-11-30.16:18:06
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 ( ). 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 ( on module analytic_account) should replace this:

        cls._sql_constraints += [
                'CHECK((credit * debit = 0.0) AND (credit + debit >= 0.0))',
                'Wrong credit/debit values.'),

with this:

        cls._sql_constraints += [
                'CHECK((credit * debit = 0.0))',
                'Wrong credit/debit values.'),
Date User Action Args
2019-01-14 23:53:16roundup-botsetmessages: + msg45957
2019-01-14 23:53:11roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg45956
2019-01-04 23:43:54reviewbotsetnosy: + reviewbot
messages: + msg45847
2019-01-04 23:26:46cedsetstatus: unread -> testing
reviews: 60471002
nosy: + ced
keyword: + review
assignedto: ced
2018-11-30 16:45:13cedsetpriority: wish -> bug
type: behavior
2018-11-30 16:23:19pokolisetcomponent: + analytic_account
keyword: + easy
2018-11-30 16:18:06ptarracreate

Showing 10 items. Show all history (warning: this could be VERY long)