Assign purchase to new receiving batch via uuid instead of object ref
the latter was apparently causing session flush and would create the "dummy" batch in addition to the "real" one...
This commit is contained in:
parent
634a93061b
commit
d145ce5f6d
1 changed files with 2 additions and 2 deletions
|
@ -642,11 +642,11 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
"""
|
||||
purchase = self.get_purchase(po_form.validated[self.purchase_order_fieldname])
|
||||
if isinstance(purchase, model.Purchase):
|
||||
batch.purchase = purchase
|
||||
batch.purchase_uuid = purchase.uuid
|
||||
|
||||
department = self.department_for_purchase(purchase)
|
||||
if department:
|
||||
batch.department = department
|
||||
batch.department_uuid = department.uuid
|
||||
|
||||
def configure_mobile_form(self, f):
|
||||
super(ReceivingBatchView, self).configure_mobile_form(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue