refactor: update ref details for selected references
set_missing_ref_details can update only for selected references
This commit is contained in:
parent
11cb2db3fe
commit
b7d6e30f63
@ -220,9 +220,16 @@ class PaymentEntry(AccountsController):
|
|||||||
else self.paid_to_account_currency
|
else self.paid_to_account_currency
|
||||||
)
|
)
|
||||||
|
|
||||||
def set_missing_ref_details(self, force=False):
|
def set_missing_ref_details(
|
||||||
|
self, force: bool = False, update_ref_details_only_for: list | None = None
|
||||||
|
) -> None:
|
||||||
for d in self.get("references"):
|
for d in self.get("references"):
|
||||||
if d.allocated_amount:
|
if d.allocated_amount:
|
||||||
|
if update_ref_details_only_for and (
|
||||||
|
not (d.reference_doctype, d.reference_name) in update_ref_details_only_for
|
||||||
|
):
|
||||||
|
continue
|
||||||
|
|
||||||
ref_details = get_reference_details(
|
ref_details = get_reference_details(
|
||||||
d.reference_doctype, d.reference_name, self.party_account_currency
|
d.reference_doctype, d.reference_name, self.party_account_currency
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user