Allow to duplicate an account move that belongs to a closed period => copy=False on period_id and date of account.move

This commit is contained in:
Alexis de Lattre
2017-09-20 12:17:45 +02:00
parent a3844004fb
commit 1160cce1d8

View File

@@ -199,6 +199,10 @@ class AccountMove(models.Model):
# update account_move set ref=left(ref,32) where ref is not null;
# update account_move_line set ref=left(ref,32) where ref is not null;
# Allow to duplicate an account.move that belongs to a closed period
period_id = fields.Many2one(copy=False)
date = fields.Date(copy=False)
@api.onchange('date')
def date_onchange(self):
if self.date: