Fix get attribute of None product on on_change_produt

This commit is contained in:
Guillem Barba 2015-04-26 22:58:46 +02:00
parent b1168fe527
commit cbdaffe6ac
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ class Plan(ModelSQL, ModelView):
res = {
'bom': None,
}
if not self.name:
if self.product:
res['name'] = self.product.rec_name
bom = self.on_change_with_bom()
self.bom = bom