diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index aa94be88041..5d0ed8297c2 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -911,9 +911,10 @@ class account_voucher(osv.osv):
if context.get('payment_expected_currency') and currency_id != context.get('payment_expected_currency'):
vals['value']['amount'] = 0
amount = 0
- res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context)
- for key in res.keys():
- vals[key].update(res[key])
+ if partner_id:
+ res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context)
+ for key in res.keys():
+ vals[key].update(res[key])
return vals
def button_proforma_voucher(self, cr, uid, ids, context=None):
@@ -965,7 +966,7 @@ class account_voucher(osv.osv):
res = {}
if not partner_id:
return res
- res = {'account_id':False}
+ res = {}
partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal')
if pay_now == 'pay_later':
@@ -977,7 +978,8 @@ class account_voucher(osv.osv):
account_id = partner.property_account_payable.id
else:
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
- res['account_id'] = account_id
+ if account_id:
+ res['account_id'] = account_id
return {'value':res}
def _sel_context(self, cr, uid, voucher_id, context=None):
diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml
index e35061e1836..97f96f75901 100644
--- a/addons/account_voucher/voucher_sales_purchase_view.xml
+++ b/addons/account_voucher/voucher_sales_purchase_view.xml
@@ -73,8 +73,14 @@
-
+
+
+
+
+
@@ -112,15 +118,6 @@
-
-
-
-
-
-
@@ -224,11 +221,11 @@
-
+
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index b685eb1e8fb..2d7f2c2737f 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -14,6 +14,7 @@ openerp.pad = function(instance) {
this.$('.oe_pad_switch').click(function() {
self.$el.toggleClass('oe_pad_fullscreen');
self.$el.find('.oe_pad_switch').toggleClass('fa-expand fa-compress');
+ self.view.$el.find('.oe_chatter').toggle();
});
this.render_value();
},