Skip to content

Commit

Permalink
[FIX] Onchange use invoice_line_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaGD authored and danimaribeiro committed Jul 18, 2019
1 parent 8ea2f2e commit 1ae43bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions br_payment_invoice/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def _onchange_linha_digitavel(self):
if len(linha) in (47, 48):
self.l10n_br_linha_digitavel = pretty_format_line(linha)
vals = self._get_digitable_line_vals(linha)
if self.line_ids:
self.line_ids[0].price_unit = vals.get('valor', 0.0)
if self.invoice_line_ids:
self.invoice_line_ids[0].price_unit = vals.get('valor', 0.0)
else:
self.line_ids = [(0, 0, {
self.invoice_line_ids = [(0, 0, {
'quantity': 1.0,
'price_unit': vals.get('valor', 0.0)
})]
Expand Down

0 comments on commit 1ae43bb

Please sign in to comment.