diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index f3d6ce94323..f48efcc6dd4 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -496,6 +496,7 @@ class account_bank_statement_line(osv.osv):
'account_code': st_line.journal_id.default_debit_account_id.code,
'account_name': st_line.journal_id.default_debit_account_id.name,
'partner_name': st_line.partner_id.name,
+ 'communication_partner_name': st_line.partner_name,
'amount_currency_str': amount_currency_str, # Amount in the statement currency
'has_no_partner': not st_line.partner_id.id,
}
diff --git a/addons/account/static/src/css/account_bank_statement_reconciliation.css b/addons/account/static/src/css/account_bank_statement_reconciliation.css
index 2306496ec2c..2db4acd4e3d 100644
--- a/addons/account/static/src/css/account_bank_statement_reconciliation.css
+++ b/addons/account/static/src/css/account_bank_statement_reconciliation.css
@@ -135,12 +135,12 @@
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg); }
- .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name .remove_partner {
+ .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name .change_partner {
display: none;
cursor: pointer; }
- .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name .remove_partner .glyphicon {
+ .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name .change_partner .glyphicon {
margin: 0 5px; }
- .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name:hover .remove_partner {
+ .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name:hover .change_partner {
display: inline; }
.openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .change_partner_container {
width: 200px;
diff --git a/addons/account/static/src/css/account_bank_statement_reconciliation.scss b/addons/account/static/src/css/account_bank_statement_reconciliation.scss
index ea9bf86384a..6ff1cc7449d 100644
--- a/addons/account/static/src/css/account_bank_statement_reconciliation.scss
+++ b/addons/account/static/src/css/account_bank_statement_reconciliation.scss
@@ -197,7 +197,7 @@ $aestetic_animation_speed: 300ms;
}
.partner_name {
- .remove_partner {
+ .change_partner {
display: none;
cursor: pointer;
@@ -205,7 +205,7 @@ $aestetic_animation_speed: 300ms;
margin: 0 5px;
}
}
- &:hover .remove_partner {
+ &:hover .change_partner {
display: inline;
}
}
diff --git a/addons/account/static/src/js/account_widgets.js b/addons/account/static/src/js/account_widgets.js
index da6d489bcfe..57fb7e64202 100644
--- a/addons/account/static/src/js/account_widgets.js
+++ b/addons/account/static/src/js/account_widgets.js
@@ -526,7 +526,7 @@ openerp.account = function (instance) {
className: 'oe_bank_statement_reconciliation_line',
events: {
- "click .remove_partner": "removePartnerClickHandler",
+ "click .change_partner": "changePartnerClickHandler",
"click .button_ok": "persistAndDestroy",
"click .mv_line": "moveLineClickHandler",
"click .initial_line": "initialLineClickHandler",
@@ -857,7 +857,7 @@ openerp.account = function (instance) {
self.change_partner_field.on("change:value", self.change_partner_field, function() {
self.changePartner(this.get_value());
});
- self.change_partner_field.$el.find("input").attr("placeholder", _t("Select Partner"));
+ self.change_partner_field.$el.find("input").attr("placeholder", self.st_line.communication_partner_name || _t("Select Partner"));
field_manager.do_show();
},
@@ -1097,13 +1097,12 @@ openerp.account = function (instance) {
}
},
- removePartnerClickHandler: function() {
+ changePartnerClickHandler: function() {
var self = this;
- // Delete statement line's partner
- return self.changePartner('', function() {
- self.$(".partner_name").hide();
- self.$(".change_partner_container").show();
- });
+ self.$(".change_partner_container").find("input").attr("placeholder", self.st_line.partner_name);
+ self.$(".change_partner_container").show();
+ self.$(".partner_name").hide();
+ self.change_partner_field.$drop_down.trigger("click");
},
diff --git a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml
index 9d6d10add24..cdd4358827c 100644
--- a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml
+++ b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml
@@ -66,7 +66,7 @@