This commit adds a new module providing the automatically services
purchasing feature ("Service Subcontracting").
The product of 'service' type can be flag (in the purchase tab of
its form view) as "purchase automatically".
When adding an sale order line with that kind of product, it will
generate a Purchase Order for the supplier of the product, on Sales
Order confirmation. The PO will contains one line with the quantity
on the sale line, with the UoM conversion (purchase uom might be
different from the sale uom on product configuration). The generated
PO is in draft state.
Then several cases can happen:
1/ Increasing the quantity on the sale line
- If PO is draft state ('draft', 'sent', 'to approve') : increase
the quantity on the PO
- If PO is confirmed state ('purchase', 'done', 'cancel') : create
a new PO
2/ Decreasing of quantity on the sale line
- in any cases: shedule a next activity on the PO
3/ Cancelling SO: shedule a next activity on the impacted PO
4/ Cancelling PO: shedule a next activity on the origin SO
The introduction of this module required to move the link between
sale.order.line and purchase.order.line from stock_dropshipping to
thie module, and put sale_purchase as a dependency of
stock_dropshipping.
This commit also brings some test cases.
Task #39340
Closes #25221
7 lines
187 B
Python
7 lines
187 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import common
|
|
from . import test_access_rights
|
|
from . import test_sale_purchase
|