mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 05:29:18 +00:00
fix: invalid keyword argument 'pluck'
This commit is contained in:
@@ -2,18 +2,19 @@ import frappe
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
'''
|
"""
|
||||||
Fetch and Set is_return & return_against from POS Invoice in POS Invoice References table.
|
Fetch and Set is_return & return_against from POS Invoice in POS Invoice References table.
|
||||||
'''
|
"""
|
||||||
|
|
||||||
POSClosingEntry = frappe.qb.DocType("POS Closing Entry")
|
POSClosingEntry = frappe.qb.DocType("POS Closing Entry")
|
||||||
open_pos_closing_entries = (
|
open_pos_closing_entries = (
|
||||||
frappe.qb
|
frappe.qb.from_(POSClosingEntry)
|
||||||
.from_(POSClosingEntry)
|
.select(POSClosingEntry.name)
|
||||||
.select(POSClosingEntry.name)
|
.where(POSClosingEntry.docstatus == 0)
|
||||||
.where(POSClosingEntry.docstatus == 0)
|
.run()
|
||||||
.run(pluck=True)
|
)
|
||||||
)
|
if open_pos_closing_entries:
|
||||||
|
open_pos_closing_entries = [d[0] for d in open_pos_closing_entries]
|
||||||
|
|
||||||
if not open_pos_closing_entries:
|
if not open_pos_closing_entries:
|
||||||
return
|
return
|
||||||
@@ -21,13 +22,12 @@ def execute():
|
|||||||
POSInvoiceReference = frappe.qb.DocType("POS Invoice Reference")
|
POSInvoiceReference = frappe.qb.DocType("POS Invoice Reference")
|
||||||
POSInvoice = frappe.qb.DocType("POS Invoice")
|
POSInvoice = frappe.qb.DocType("POS Invoice")
|
||||||
pos_invoice_references = (
|
pos_invoice_references = (
|
||||||
frappe.qb
|
frappe.qb.from_(POSInvoiceReference)
|
||||||
.from_(POSInvoiceReference)
|
.join(POSInvoice)
|
||||||
.join(POSInvoice)
|
.on(POSInvoiceReference.pos_invoice == POSInvoice.name)
|
||||||
.on(POSInvoiceReference.pos_invoice == POSInvoice.name)
|
.select(POSInvoiceReference.name, POSInvoice.is_return, POSInvoice.return_against)
|
||||||
.select(POSInvoiceReference.name, POSInvoice.is_return, POSInvoice.return_against)
|
.where(POSInvoiceReference.parent.isin(open_pos_closing_entries))
|
||||||
.where(POSInvoiceReference.parent.isin(open_pos_closing_entries))
|
.run(as_dict=True)
|
||||||
.run(as_dict=True)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for row in pos_invoice_references:
|
for row in pos_invoice_references:
|
||||||
|
|||||||
Reference in New Issue
Block a user