1015
1015
distrib = pl.commit_id and pl.commit_id.analytic_distribution_id or False
1020
if self.pool.get('analytic.distribution')._get_distribution_state(cr, uid, distrib.id, False, wiz.account_id.id) != 'valid':
1018
1022
# First delete all current lines
1019
1023
self.pool.get('analytic.distribution.wizard.lines').unlink(cr, uid, [x.id for x in wiz.line_ids], context=context)
1020
1024
self.pool.get('analytic.distribution.wizard.fp.lines').unlink(cr, uid, [x.id for x in wiz.fp_line_ids], context=context)