From 95f5f1f0c8b337738d3504ea57d5284feea036e9 Mon Sep 17 00:00:00 2001
From: "pap(openerp)" <>
Date: Tue, 20 Jul 2010 17:59:23 +0530
Subject: [PATCH] [FIX] Account: supplier invoice if ref is not given and
correct use model view
bzr revid: mra@mra-laptop-20100720122923-3mo213rwntd35ute
---
addons/account/invoice.py | 2 +-
addons/account/wizard/account_use_model_view.xml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 46e64570a14..bca5770accc 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -922,7 +922,7 @@ class account_invoice(osv.osv):
invtype = obj_inv.type
number = obj_inv.number
move_id = obj_inv.move_id and obj_inv.move_id.id or False
- reference = obj_inv.reference
+ reference = obj_inv.reference or ''
if not number:
tmp_context = {
'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index 03ca451e509..71f026237ac 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -50,7 +50,7 @@
form