[conflict] fixed

This commit is contained in:
Nabin Hait
2013-07-05 15:25:58 +05:30
145 changed files with 772 additions and 497 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-25 11:04:03",
"docstatus": 0,
"modified": "2013-06-25 11:43:08",
"modified": "2013-07-05 14:29:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -10,6 +10,7 @@
"description": "Settings for Buying Module",
"doctype": "DocType",
"document_type": "Other",
"icon": "icon-cog",
"issingle": 1,
"module": "Buying",
"name": "__common__"

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:39",
"docstatus": 0,
"modified": "2013-07-05 13:02:52",
"modified": "2013-07-05 14:51:59",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -11,6 +11,7 @@
"autoname": "naming_series:",
"doctype": "DocType",
"document_type": "Transaction",
"icon": "icon-file-text",
"is_submittable": 1,
"module": "Buying",
"name": "__common__",
@@ -31,6 +32,7 @@
"parent": "Purchase Order",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1
},
@@ -787,37 +789,15 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 1,
"role": "Material User",
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Material User",
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 1,
"role": "Purchase Manager",
"submit": 0,
"write": 0
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Purchase Manager",
"submit": 1,
"write": 1
@@ -827,24 +807,13 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Purchase User",
"submit": 1,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 1,
"role": "All",
"submit": 0
},
{
"doctype": "DocPerm",
"match": "supplier",
"permlevel": 0,
"role": "Supplier"
}
]

View File

@@ -2,13 +2,14 @@
{
"creation": "2013-04-30 13:13:03",
"docstatus": 0,
"modified": "2013-06-11 16:05:29",
"modified": "2013-07-05 14:52:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"autoname": "naming_series:",
"doctype": "DocType",
"icon": "icon-search",
"is_submittable": 1,
"module": "Buying",
"name": "__common__",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:11",
"docstatus": 0,
"modified": "2013-07-04 10:13:19",
"modified": "2013-07-05 14:57:04",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -12,6 +12,7 @@
"description": "Supplier of Goods or Services.",
"doctype": "DocType",
"document_type": "Master",
"icon": "icon-user",
"module": "Buying",
"name": "__common__",
"search_fields": "supplier_name,supplier_type"

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:45",
"docstatus": 0,
"modified": "2013-07-04 18:47:51",
"modified": "2013-07-05 14:57:12",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -11,6 +11,7 @@
"autoname": "naming_series:",
"doctype": "DocType",
"document_type": "Transaction",
"icon": "icon-shopping-cart",
"is_submittable": 1,
"module": "Buying",
"name": "__common__",
@@ -31,6 +32,7 @@
"parent": "Supplier Quotation",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1
},
@@ -642,7 +644,6 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Manufacturing Manager",
"submit": 1,
"write": 1
@@ -652,7 +653,6 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Purchase Manager",
"submit": 1,
"write": 1
@@ -662,7 +662,6 @@
"cancel": 0,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Purchase User",
"submit": 0,
"write": 1
@@ -672,7 +671,6 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Material User",
"submit": 0,
"write": 0
@@ -682,19 +680,8 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 0,
"role": "Supplier",
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"permlevel": 1,
"role": "All",
"submit": 0,
"write": 0
}
]

View File

@@ -0,0 +1,69 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import unittest
import webnotes
import webnotes.defaults
class TestPurchaseOrder(unittest.TestCase):
def test_make_purchase_order(self):
from buying.doctype.supplier_quotation.supplier_quotation import make_purchase_order
sq = webnotes.bean(copy=test_records[0]).insert()
self.assertRaises(webnotes.ValidationError, make_purchase_order,
sq.doc.name)
sq = webnotes.bean("Supplier Quotation", sq.doc.name)
sq.submit()
po = make_purchase_order(sq.doc.name)
self.assertEquals(po[0]["doctype"], "Purchase Order")
self.assertEquals(len(po), len(sq.doclist))
test_records = [
[
{
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"doctype": "Supplier Quotation",
"fiscal_year": "_Test Fiscal Year 2013",
"transaction_date": "2013-02-12",
"is_subcontracted": "Yes",
"supplier": "_Test Supplier",
"supplier_name": "_Test Supplier",
"net_total": 5000.0,
"grand_total": 5000.0,
"grand_total_import": 5000.0,
},
{
"description": "_Test FG Item",
"doctype": "Supplier Quotation Item",
"item_code": "_Test FG Item",
"item_name": "_Test FG Item",
"parentfield": "quotation_items",
"qty": 10.0,
"import_rate": 500.0,
"amount": 5000.0,
"warehouse": "_Test Warehouse",
"uom": "_Test UOM",
}
],
]