Skip to content

Commit

Permalink
feat: RFQ print preview
Browse files Browse the repository at this point in the history
(cherry picked from commit 27f0514)
  • Loading branch information
barredterra authored and mergify[bot] committed Dec 13, 2023
1 parent 1dcb065 commit f30bede
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 f30bede

Please sign in to comment.