mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
set schedule_Date when creating po
This commit is contained in:
@@ -3458,7 +3458,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-09-22 16:11:49.856808",
|
||||
"modified": "2017-09-26 14:19:04.102534",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order",
|
||||
|
||||
@@ -118,6 +118,7 @@ class TestPurchaseOrder(unittest.TestCase):
|
||||
"company": "_Test Company",
|
||||
"supplier" : "_Test Supplier",
|
||||
"is_subcontracted" : "No",
|
||||
"schedule_Date": add_days(nowdate(), 1),
|
||||
"currency" : frappe.db.get_value("Company", "_Test Company", "default_currency"),
|
||||
"conversion_factor" : 1,
|
||||
"items" : get_same_items(),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt
|
||||
from frappe.utils import flt, nowdate, add_days
|
||||
from frappe.model.mapper import get_mapped_doc
|
||||
|
||||
from erpnext.controllers.buying_controller import BuyingController
|
||||
@@ -104,6 +104,7 @@ def get_list_context(context=None):
|
||||
def make_purchase_order(source_name, target_doc=None):
|
||||
def set_missing_values(source, target):
|
||||
target.ignore_pricing_rule = 1
|
||||
target.schedule_Date = add_days(nowdate(), 1)
|
||||
target.run_method("set_missing_values")
|
||||
target.run_method("get_schedule_dates")
|
||||
target.run_method("calculate_taxes_and_totals")
|
||||
|
||||
Reference in New Issue
Block a user