fix: Drop Shipping address based on customer shopping address

This commit is contained in:
Nihantra Patel
2024-11-13 14:55:45 +05:30
parent 494fd7ceea
commit c7499f3528
2 changed files with 19 additions and 6 deletions

View File

@@ -1419,9 +1419,17 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None):
target.payment_schedule = []
if is_drop_ship_order(target):
target.customer = source.customer
target.customer_name = source.customer_name
target.shipping_address = source.shipping_address_name
if source.shipping_address_name:
target.shipping_address = source.shipping_address_name
target.shipping_address_display = source.shipping_address
else:
target.shipping_address = source.customer_address
target.shipping_address_display = source.address_display
target.customer_contact_person = source.contact_person
target.customer_contact_display = source.contact_display
target.customer_contact_mobile = source.contact_mobile
target.customer_contact_email = source.contact_email
else:
target.customer = target.customer_name = target.shipping_address = None