fix: se limpia código para migración 6.8
This commit is contained in:
parent
6654f55c59
commit
a29fd818a0
14
statement.py
14
statement.py
|
@ -13,7 +13,7 @@ __all__ = ['Line']
|
|||
class Line(metaclass=PoolMeta):
|
||||
__name__ = 'account.statement.line'
|
||||
sale = fields.Many2One('sale.sale', 'Sale', ondelete='RESTRICT')
|
||||
unblocked = fields.Boolean('unblocked', 'Unblocked', select=False)
|
||||
unblocked = fields.Boolean('unblocked', 'Unblocked')
|
||||
|
||||
@classmethod
|
||||
def delete(cls, lines):
|
||||
|
@ -47,17 +47,17 @@ class Line(metaclass=PoolMeta):
|
|||
date=self.date,
|
||||
origin=self,
|
||||
lines=move_lines,
|
||||
)
|
||||
)
|
||||
move.save()
|
||||
|
||||
self.write([self], {
|
||||
'move': move.id,
|
||||
})
|
||||
'move': move.id,
|
||||
})
|
||||
|
||||
if self.invoice:
|
||||
with Transaction().set_context(date=self.invoice.currency_date):
|
||||
amount = Currency.compute(self.statement.journal.currency,
|
||||
self.amount, self.statement.company.currency)
|
||||
self.amount, self.statement.company.currency)
|
||||
|
||||
reconcile_lines = self.invoice.get_reconcile_lines_for_amount(
|
||||
abs(amount))
|
||||
|
@ -65,8 +65,8 @@ class Line(metaclass=PoolMeta):
|
|||
for move_line in move.lines:
|
||||
if move_line.account == self.invoice.account:
|
||||
Invoice.write([self.invoice], {
|
||||
'payment_lines': [('add', [move_line.id])],
|
||||
})
|
||||
'payment_lines': [('add', [move_line.id])],
|
||||
})
|
||||
break
|
||||
if reconcile_lines[1] == Decimal('0.0'):
|
||||
lines = reconcile_lines[0] + [move_line]
|
||||
|
|
Loading…
Reference in a new issue