rpa-erpnext 1.0.4__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/PKG-INFO +1 -1
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/RPA/ERPNext.py +23 -8
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/pyproject.toml +1 -1
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/rpa_erpnext.egg-info/PKG-INFO +1 -1
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/LICENSE +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/RPA/__init__.py +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/readme.md +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/rpa_erpnext.egg-info/SOURCES.txt +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/rpa_erpnext.egg-info/dependency_links.txt +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/rpa_erpnext.egg-info/requires.txt +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/rpa_erpnext.egg-info/top_level.txt +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/setup.cfg +0 -0
- {rpa_erpnext-1.0.4 → rpa_erpnext-1.0.6}/test/test_functions.py +0 -0
|
@@ -314,7 +314,7 @@ class ERPNextLibrary:
|
|
|
314
314
|
# ===========================================================
|
|
315
315
|
|
|
316
316
|
@keyword("Create Sales Order")
|
|
317
|
-
def create_sales_order(self, customer: str, items
|
|
317
|
+
def create_sales_order(self, customer: str, items, delivery_date: str, company: str):
|
|
318
318
|
"""
|
|
319
319
|
Tạo Sales Order (Đơn hàng bán).
|
|
320
320
|
|
|
@@ -355,7 +355,7 @@ class ERPNextLibrary:
|
|
|
355
355
|
return self.create_resource("Sales Order", data)
|
|
356
356
|
|
|
357
357
|
@keyword("Create Sales Invoice")
|
|
358
|
-
def create_sales_invoice(self, customer: str, items
|
|
358
|
+
def create_sales_invoice(self, customer: str, items, company: str, posting_date=None):
|
|
359
359
|
"""
|
|
360
360
|
Tạo Sales Invoice (Hóa đơn bán hàng).
|
|
361
361
|
|
|
@@ -397,7 +397,7 @@ class ERPNextLibrary:
|
|
|
397
397
|
# ===========================================================
|
|
398
398
|
|
|
399
399
|
@keyword("Create Stock Entry")
|
|
400
|
-
def create_stock_entry(self, purpose: str, items
|
|
400
|
+
def create_stock_entry(self, purpose: str, items, company: str, posting_date=None):
|
|
401
401
|
"""
|
|
402
402
|
Tạo Stock Entry (Phiếu nhập/xuất kho).
|
|
403
403
|
|
|
@@ -420,6 +420,10 @@ class ERPNextLibrary:
|
|
|
420
420
|
| ${items}= | Create List | {"item_code": "ITEM-001", "qty": 100, "t_warehouse": "Stores - EDU"} |
|
|
421
421
|
| Create Stock Entry | Material Receipt | ${items} | My Company |
|
|
422
422
|
"""
|
|
423
|
+
|
|
424
|
+
if isinstance(items, str):
|
|
425
|
+
items = json.loads(items)
|
|
426
|
+
|
|
423
427
|
stock_items = []
|
|
424
428
|
for item in items:
|
|
425
429
|
stock_items.append({
|
|
@@ -444,7 +448,7 @@ class ERPNextLibrary:
|
|
|
444
448
|
return self.create_resource("Stock Entry", data)
|
|
445
449
|
|
|
446
450
|
@keyword("Create Purchase Receipt")
|
|
447
|
-
def create_purchase_receipt(self, supplier: str, items
|
|
451
|
+
def create_purchase_receipt(self, supplier: str, items, company: str, posting_date=None):
|
|
448
452
|
"""
|
|
449
453
|
Tạo Purchase Receipt (Phiếu nhận hàng mua).
|
|
450
454
|
|
|
@@ -485,7 +489,7 @@ class ERPNextLibrary:
|
|
|
485
489
|
|
|
486
490
|
|
|
487
491
|
@keyword("Create Purchase Order")
|
|
488
|
-
def create_purchase_order(self, supplier: str, items
|
|
492
|
+
def create_purchase_order(self, supplier: str, items, company: str, schedule_date=None):
|
|
489
493
|
"""
|
|
490
494
|
Tạo Purchase Order (Đơn hàng mua).
|
|
491
495
|
|
|
@@ -528,7 +532,7 @@ class ERPNextLibrary:
|
|
|
528
532
|
# ===========================================================
|
|
529
533
|
|
|
530
534
|
@keyword("Create Purchase Invoice")
|
|
531
|
-
def create_purchase_invoice(self, supplier: str, items
|
|
535
|
+
def create_purchase_invoice(self, supplier: str, items, company: str, posting_date=None):
|
|
532
536
|
"""
|
|
533
537
|
Tạo Purchase Invoice (Hóa đơn mua hàng).
|
|
534
538
|
|
|
@@ -542,6 +546,9 @@ class ERPNextLibrary:
|
|
|
542
546
|
"""
|
|
543
547
|
self.ensure_supplier_exist(supplier)
|
|
544
548
|
|
|
549
|
+
if isinstance(items, str):
|
|
550
|
+
items = json.loads(items)
|
|
551
|
+
|
|
545
552
|
invoice_items = []
|
|
546
553
|
for item in items:
|
|
547
554
|
invoice_items.append({
|
|
@@ -648,10 +655,18 @@ class ERPNextLibrary:
|
|
|
648
655
|
# ===========================================================
|
|
649
656
|
|
|
650
657
|
@keyword("Send RFQ From Material Request")
|
|
651
|
-
def send_rfq_from_mr(self, mr_name
|
|
658
|
+
def send_rfq_from_mr(self, mr_name, suppliers):
|
|
652
659
|
"""Tạo RFQ dựa trên Material Request."""
|
|
660
|
+
# Auto-detect if mr_name is a dict (from previous keyword return)
|
|
661
|
+
if isinstance(mr_name, dict):
|
|
662
|
+
mr_name = mr_name.get("name")
|
|
663
|
+
|
|
653
664
|
if isinstance(suppliers, str):
|
|
654
|
-
|
|
665
|
+
try:
|
|
666
|
+
suppliers = json.loads(suppliers)
|
|
667
|
+
except ValueError:
|
|
668
|
+
# Nếu không phải JSON list, coi như là 1 supplier duy nhất
|
|
669
|
+
suppliers = [suppliers]
|
|
655
670
|
|
|
656
671
|
mr_doc = self.get_doc("Material Request", mr_name)
|
|
657
672
|
company = mr_doc["company"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|