Code review comment for lp://staging/~camptocamp/account-financial-tools/account-contraints-state-vre

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi,

My opinion here that this fix is dangerous. The name of the method that use it is "_authorized_reconcile", which means, we check reconcile stuff not state stuff... The problem comes from another place.

May be you should use the "flag" : if not context.get('from_parent_object', False):

Add from_parent_object in context in the wizard that generate the end of year entries and you should not face this trouble anymore.

But please, do not allow state change, this is why we introduce the constraints ;)

Thanks,

Joël

review: Disapprove (code review, no tests)

« Back to merge proposal