mirror of
https://github.com/NaN-tic/trytond-farm_feed_production.git
synced 2023-12-14 05:52:53 +01:00
Task 031031: Include drug quantity on explode BOM
This commit is contained in:
parent
2cec4635cc
commit
b9f9a2b7bc
1 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,7 @@ class SupplyRequestLine:
|
|||
if prescription.template:
|
||||
Prescription.set_template([prescription])
|
||||
move.prescription = prescription
|
||||
move.quantity += prescription.drug_quantity
|
||||
return move
|
||||
|
||||
def get_prescription(self):
|
||||
|
@ -198,6 +199,10 @@ class Production:
|
|||
for _, output_vals in changes['outputs']['add']:
|
||||
if output_vals.get('product') == self.product.id:
|
||||
output_vals['prescription'] = self.prescription.id
|
||||
output_vals['quantity'] += Uom.compute_qty(
|
||||
self.prescription.unit,
|
||||
self.prescription.drug_quantity,
|
||||
Uom(output_vals['uom']))
|
||||
|
||||
if not self.prescription.lines:
|
||||
return changes
|
||||
|
|
Loading…
Reference in a new issue