mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 07:28:04 +00:00
merge conflict fixed
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-22 13:15:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-20 19:23:08",
|
||||
"modified": "2013-12-31 18:23:03",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -50,16 +50,6 @@
|
||||
"search_index": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_item_code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer's Item Code",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_name",
|
||||
@@ -74,6 +64,21 @@
|
||||
"reqd": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break1",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_item_code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer's Item Code",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "description",
|
||||
@@ -107,21 +112,6 @@
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "stock_uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "stock_uom",
|
||||
"oldfieldtype": "Data",
|
||||
"options": "UOM",
|
||||
"print_hide": 0,
|
||||
"print_width": "50px",
|
||||
"read_only": 1,
|
||||
"reqd": 1,
|
||||
"width": "50px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "ref_rate",
|
||||
@@ -151,6 +141,45 @@
|
||||
"read_only": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break2",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "stock_uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "stock_uom",
|
||||
"oldfieldtype": "Data",
|
||||
"options": "UOM",
|
||||
"print_hide": 0,
|
||||
"print_width": "50px",
|
||||
"read_only": 1,
|
||||
"reqd": 1,
|
||||
"width": "50px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "base_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Price List Rate (Company Currency)",
|
||||
"oldfieldname": "base_ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "100px",
|
||||
"read_only": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break_1",
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "export_rate",
|
||||
@@ -183,17 +212,8 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "base_ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 0,
|
||||
"label": "Price List Rate (Company Currency)",
|
||||
"oldfieldname": "base_ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"print_hide": 1,
|
||||
"print_width": "100px",
|
||||
"read_only": 1,
|
||||
"width": "100px"
|
||||
"fieldname": "col_break3",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -271,31 +291,6 @@
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "expense_account",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"label": "Expense Account",
|
||||
"no_copy": 1,
|
||||
"options": "Account",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "120px"
|
||||
},
|
||||
{
|
||||
"default": ":Company",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cost_center",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"label": "Cost Center",
|
||||
"no_copy": 1,
|
||||
"options": "Cost Center",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "120px"
|
||||
},
|
||||
{
|
||||
"description": "<a href=\"#Sales Browser/Item Group\">Add / Edit</a>",
|
||||
"doctype": "DocField",
|
||||
@@ -323,6 +318,22 @@
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_tax_rate",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"label": "Item Tax Rate",
|
||||
"oldfieldname": "item_tax_rate",
|
||||
"oldfieldtype": "Small Text",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break4",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "actual_qty",
|
||||
@@ -338,30 +349,44 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "installed_qty",
|
||||
"fieldtype": "Float",
|
||||
"label": "Installed Qty",
|
||||
"fieldname": "expense_account",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"label": "Expense Account",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "installed_qty",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Account",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
"read_only": 0,
|
||||
"width": "120px"
|
||||
},
|
||||
{
|
||||
"default": ":Company",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cost_center",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"label": "Cost Center",
|
||||
"no_copy": 1,
|
||||
"options": "Cost Center",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "120px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "against_sales_order",
|
||||
"fieldtype": "Link",
|
||||
"label": "Against Sales Order",
|
||||
"options": "Sales Order"
|
||||
"options": "Sales Order",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "against_sales_invoice",
|
||||
"fieldtype": "Link",
|
||||
"label": "Against Sales Invoice",
|
||||
"options": "Sales Invoice"
|
||||
"options": "Sales Invoice",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -381,14 +406,16 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "item_tax_rate",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"label": "Item Tax Rate",
|
||||
"oldfieldname": "item_tax_rate",
|
||||
"oldfieldtype": "Small Text",
|
||||
"fieldname": "installed_qty",
|
||||
"fieldtype": "Float",
|
||||
"label": "Installed Qty",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "installed_qty",
|
||||
"oldfieldtype": "Currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
|
||||
@@ -198,7 +198,7 @@ class DocType(DocListController, WebsiteGenerator):
|
||||
self.doc.name, raise_exception=1)
|
||||
|
||||
def update_website(self):
|
||||
from erpnext.selling.utils.product import invalidate_cache_for
|
||||
from erpnext.setup.doctype.item_group.item_group import invalidate_cache_for
|
||||
invalidate_cache_for(self.doc.item_group)
|
||||
[invalidate_cache_for(d.item_group) for d in \
|
||||
self.doclist.get({"doctype":"Website Item Group"})]
|
||||
@@ -221,15 +221,6 @@ class DocType(DocListController, WebsiteGenerator):
|
||||
def get_tax_rate(self, tax_type):
|
||||
return { "tax_rate": webnotes.conn.get_value("Account", tax_type, "tax_rate") }
|
||||
|
||||
def get_context(self):
|
||||
from erpnext.selling.utils.product import get_parent_item_groups
|
||||
self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{"name":self.doc.name}]
|
||||
self.doc.title = self.doc.item_name
|
||||
|
||||
if self.doc.slideshow:
|
||||
from webnotes.website.doctype.website_slideshow.website_slideshow import get_slideshow
|
||||
get_slideshow(self)
|
||||
|
||||
def get_file_details(self, arg = ''):
|
||||
file = webnotes.conn.sql("select file_group, description from tabFile where name = %s", eval(arg)['file_name'], as_dict = 1)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['item_details'].grid.get_field('item_code').get_query =
|
||||
function(doc, cdt, cdn) {
|
||||
return {
|
||||
query: "stock.doctype.packing_slip.packing_slip.item_details",
|
||||
query: "erpnext.stock.doctype.packing_slip.packing_slip.item_details",
|
||||
filters:{ 'delivery_note': doc.delivery_note}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,6 @@ class DocType(DocListController):
|
||||
def on_update(self):
|
||||
self.set_default_if_missing()
|
||||
self.update_item_price()
|
||||
cart_settings = webnotes.get_obj("Shopping Cart Settings")
|
||||
if cint(cart_settings.doc.enabled):
|
||||
cart_settings.validate_price_lists()
|
||||
|
||||
def set_default_if_missing(self):
|
||||
if self.doc.buying_or_selling=="Selling":
|
||||
|
||||
@@ -12,7 +12,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
var me = this;
|
||||
|
||||
this.frm.fields_dict.delivery_note_no.get_query = function() {
|
||||
return { query: "stock.doctype.stock_entry.stock_entry.query_sales_return_doc" };
|
||||
return { query: "erpnext.stock.doctype.stock_entry.stock_entry.query_sales_return_doc" };
|
||||
};
|
||||
|
||||
this.frm.fields_dict.sales_invoice_no.get_query =
|
||||
@@ -28,7 +28,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
if(in_list(["Sales Return", "Purchase Return"], me.frm.doc.purpose) &&
|
||||
me.get_doctype_docname()) {
|
||||
return {
|
||||
query: "stock.doctype.stock_entry.stock_entry.query_return_item",
|
||||
query: "erpnext.stock.doctype.stock_entry.stock_entry.query_return_item",
|
||||
filters: {
|
||||
purpose: me.frm.doc.purpose,
|
||||
delivery_note_no: me.frm.doc.delivery_note_no,
|
||||
@@ -309,7 +309,7 @@ cur_frm.fields_dict['mtn_details'].grid.get_field('batch_no').get_query = functi
|
||||
var d = locals[cdt][cdn];
|
||||
if(d.item_code) {
|
||||
return{
|
||||
query: "stock.doctype.stock_entry.stock_entry.get_batch_no",
|
||||
query: "erpnext.stock.doctype.stock_entry.stock_entry.get_batch_no",
|
||||
filters:{
|
||||
'item_code': d.item_code,
|
||||
's_warehouse': d.s_warehouse,
|
||||
|
||||
@@ -288,11 +288,12 @@ class DocType(StockController):
|
||||
if not returnable_qty:
|
||||
webnotes.throw("{item}: {item_code} {returned}".format(
|
||||
item=_("Item"), item_code=item.item_code,
|
||||
returned=_("already returned though some other documents")), StockOverReturnError)
|
||||
returned=_("already returned though some other documents")),
|
||||
StockOverReturnError)
|
||||
elif item.transfer_qty > returnable_qty:
|
||||
webnotes.throw("{item}: {item_code}, {returned}: {qty}".format(
|
||||
item=_("Item"), item_code=item.item_code,
|
||||
returned=_("Max Returnable Qty"), qty=returnable_qty))
|
||||
returned=_("Max Returnable Qty"), qty=returnable_qty), StockOverReturnError)
|
||||
|
||||
def get_already_returned_item_qty(self, ref_fieldname):
|
||||
return dict(webnotes.conn.sql("""select item_code, sum(transfer_qty) as qty
|
||||
|
||||
Reference in New Issue
Block a user