[IMP] account: bank statement reconciliation widget: display partner name found in statement import in change partner field ; do not set the partner to false before changing the partner
This commit is contained in:
parent
b2385d6b9e
commit
75b37a7f42
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
},
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<button class="button_ok"></button>
|
||||
<span t-if="! line.has_no_partner" class="partner_name">
|
||||
<t t-esc="line.partner_name"/>
|
||||
<span class="remove_partner"><span class="glyphicon glyphicon-remove"></span></span>
|
||||
<span class="change_partner glyphicon glyphicon-pencil"></span>
|
||||
</span>
|
||||
<div class="change_partner_container oe_form"></div>
|
||||
</caption>
|
||||
|
@ -148,7 +148,7 @@
|
|||
</tr>
|
||||
</t>
|
||||
|
||||
<t t-name="icon_do_partial_reconciliation"><i class="do_partial_reconcile_button fa fa-exclamation-triangle" data-content="This move's amount is higher than the transaction's amount. Click to do a partial reconciliation"></i></t>
|
||||
<t t-name="icon_do_partial_reconciliation"><i class="do_partial_reconcile_button fa fa-exclamation-triangle" data-content="Click to register a partial payment and keep the invoice open. Otherwise it does a full reconciliation."></i></t>
|
||||
|
||||
<t t-name="icon_undo_partial_reconciliation"><i class="undo_partial_reconcile_button fa fa-exclamation-triangle" data-content="Undo the partial reconciliation."></i></t>
|
||||
|
||||
|
|
Loading…
Reference in New Issue