Skip to content

Commit

Permalink
feat(RFQ): special properties in print preview (backport #38725) (#38726
Browse files Browse the repository at this point in the history
)

feat: RFQ print preview

(cherry picked from commit 27f0514)

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
  • Loading branch information
mergify[bot] and barredterra authored Dec 13, 2023
1 parent 0d49dd3 commit 2290750
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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 2290750

Please sign in to comment.