Skip to content

Commit

Permalink
Merge pull request #38725 from barredterra/preview-rfq
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra authored Dec 13, 2023
2 parents 13cba50 + 27f0514 commit da96578
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ def on_submit(self):
supplier.quote_status = "Pending"
self.send_to_supplier()

def before_print(self, settings=None):
"""Use the first suppliers data to render the print preview."""
if self.vendor or not self.suppliers:
# If a specific supplier is already set, via Tools > Download PDF,
# we don't want to override it.
return

self.update_supplier_part_no(self.suppliers[0].supplier)

def on_cancel(self):
self.db_set("status", "Cancelled")

Expand Down

0 comments on commit da96578

Please sign in to comment.