mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Do no run mts mto procurement if it already has been splited into at least another procurement
This commit is contained in:
committed by
Pierrick Brun
parent
94558043de
commit
fb1cd6a3a5
@@ -49,6 +49,15 @@ Configuration
|
||||
|
||||
You have to select 'Use MTO+MTS rules' on the company's warehouse form.
|
||||
|
||||
Known issues
|
||||
============
|
||||
|
||||
If you cancel a delivery order and then recreate it from Recreate
|
||||
Delivery Order button in sale order form, then the stock level at the time of
|
||||
the Re-Creation won't be taken into account. So if a purchase order was created
|
||||
when the sale order was first validated, a similar purchase order will be created
|
||||
during the Re-creation of the delivery order, even if not needed regarding the actual stock.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@ class ProcurementOrder(models.Model):
|
||||
def _run(self, procurement):
|
||||
if procurement.rule_id and \
|
||||
procurement.rule_id.action == 'split_procurement':
|
||||
if procurement.mts_mto_procurement_ids:
|
||||
return super(ProcurementOrder, self)._run(procurement)
|
||||
uom_obj = self.env['product.uom']
|
||||
needed_qty = procurement.get_mto_qty_to_order()
|
||||
rule = procurement.rule_id
|
||||
|
||||
Reference in New Issue
Block a user