mirror of
https://bitbucket.org/presik/trytonpsk-purchase_co.git
synced 2023-12-14 06:43:05 +01:00
reference from shipment
This commit is contained in:
parent
9ee28308a7
commit
ed10f46769
1 changed files with 4 additions and 0 deletions
|
@ -162,6 +162,10 @@ class Purchase(metaclass=PoolMeta):
|
|||
return
|
||||
invoice.reference = self.reference
|
||||
invoice.description = self.description
|
||||
if self.invoice_method == 'shipment' and self.moves:
|
||||
for move in self.moves:
|
||||
invoice.reference = move.shipment.reference
|
||||
break
|
||||
invoice.save()
|
||||
return invoice
|
||||
|
||||
|
|
Loading…
Reference in a new issue