[MERGE] forward port branch 11.0 up to 22637aadec

This commit is contained in:
Christophe Simonis
2019-01-03 15:31:05 +01:00
2 changed files with 3 additions and 3 deletions
@@ -401,8 +401,8 @@ var LineRenderer = Widget.extend(FieldManagerMixin, {
if (line.already_paid === false &&
(((state.balance.amount_currency < 0 || line.partial_reconcile)
&& line.amount > 0 && state.st_line.amount > 0 && targetLineAmount < line.amount && partialDebitProps <= 1) ||
((state.balance.amount_currency > 0 || line.partial_reconcile))
&& line.amount < 0 && state.st_line.amount < 0 && targetLineAmount > line.amount && partialCreditProps <= 1)) {
((state.balance.amount_currency > 0 || line.partial_reconcile)
&& line.amount < 0 && state.st_line.amount < 0 && targetLineAmount > line.amount && partialCreditProps <= 1))) {
var $cell = $line.find(line.amount > 0 ? '.cell_right' : '.cell_left');
var text;
if (line.partial_reconcile) {
@@ -51,7 +51,7 @@ class AccountPayment(models.Model):
@api.onchange('amount','currency_id')
def _onchange_amount(self):
res = super(AccountPayment, self)._onchange_amount()
self.check_amount_in_words = self.currency_id.amount_to_text(self.amount)
self.check_amount_in_words = self.currency_id.amount_to_text(self.amount) if self.currency_id else ''
return res
def _check_communication(self, payment_method_id, communication):