trytonpsk-sale_pos_frontend.../invoice.py
Camilo Sarmiento 7aa236808b minor fix
2020-06-10 15:26:41 -05:00

24 lines
723 B
Python

# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from decimal import Decimal
import operator
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
__all__ = ['InvoiceLine']
class InvoiceLine(metaclass=PoolMeta):
__name__ = 'account.invoice.line'
@classmethod
def __setup__(cls):
super(InvoiceLine, cls).__setup__()
def get_move_lines(self):
Sale = Pool().get('sale.sale')
if self.origin and self.invoice.type == 'out':
Sale._create_productions([self.origin])
result = super(InvoiceLine, self).get_move_lines()
return result