Skip to content

Commit

Permalink
[IMP] account: bank statement reconciliation widget: display partner …
Browse files Browse the repository at this point in the history
…name found in statement import in change partner field ; do not set the partner to false before changing the partner
  • Loading branch information
Whisno committed Sep 16, 2014
1 parent b2385d6 commit 75b37a7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions addons/account/account_bank_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ def get_statement_line_for_reconciliation(self, cr, uid, st_line, context=None):
'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,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ $aestetic_animation_speed: 300ms;
}

.partner_name {
.remove_partner {
.change_partner {
display: none;
cursor: pointer;

.glyphicon {
margin: 0 5px;
}
}
&:hover .remove_partner {
&:hover .change_partner {
display: inline;
}
}
Expand Down
15 changes: 7 additions & 8 deletions addons/account/static/src/js/account_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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();
},
Expand Down Expand Up @@ -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");
},


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>

Expand Down

0 comments on commit 75b37a7

Please sign in to comment.