mirror of
https://bitbucket.org/presik/trytonpsk-sale_pos_frontend_rest.git
synced 2023-12-14 06:12:59 +01:00
24 lines
723 B
Python
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
|