Files
odoo_source/addons/sale_coupon/tests/__init__.py
T
Andrea Grazioso (agr-odoo) 21902d1ff6 [FIX] sale,sale_coupon: do not invoice only promotion lines
Create a promotion auto applied with 0 minimum amount on any product in
catalog.
Have a DEMO product invoiced on delivery
Create a sale order with DEMO, apply the promotion. Confirm.
Click on 'Create Invoice'.

The invoice will only contain the promotion because the line for
DEMO is to be invoiced only after delivery, while by default the
promotion product has the invoice policy 'on order'

This commit will:
* avoid highlight the button 'create invoice' if the only
invoiceable lines are promotion lines as well as raising an error if the
invoice is created in the same scenario
* refuse to invoice only promotion lines from a SO.
* adds a test to cover the case

opw-2414630

closes odoo/odoo#64826

X-original-commit: 6532c6ba7acb2de53fc839d5a7c5d8b200716565
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-01-20 17:55:38 +00:00

10 lines
342 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_program_without_code_operations
from . import test_program_with_code_operations
from . import test_program_rules
from . import test_program_numbers
from . import test_program_multi_company
from . import test_sale_invoicing