1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/sale_loyalty_taxcloud_delivery/models/account_move_line.py
2024-12-10 09:04:09 +07:00

17 lines
627 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
def _is_delivery(self):
"""Part of the common interface between order lines and invoice lines.
If we don't come from a sale.order, it will always be False.
But we only really need that for coupon applications, and coupon can
be present only if coming from a sale.order, so we're fine.
"""
self.ensure_one()
return any(self.mapped('sale_line_ids.is_delivery'))