From 4eb7daf0220b28005a485d7e287cde0babf9fb76 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 27 Nov 2017 16:51:06 +0100 Subject: [PATCH] Do not raise missing accounts errors on readonly transactions issue6913 review42811002 --- product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product.py b/product.py index 0ea26ebad2..7ed09d5aa3 100644 --- a/product.py +++ b/product.py @@ -28,7 +28,8 @@ def account_used(field_name): account = func(self) if not account: account = self.get_account(field_name + '_used') - if not account: + # Allow empty values on on_change + if not account and not Transaction().readonly: self.raise_user_error('missing_account', { 'name': self.name, 'id': self.id,