[fix] [minor] fixed conflict while merging with master

This commit is contained in:
Nabin Hait
2013-08-19 11:06:06 +05:30
206 changed files with 5830 additions and 1272 deletions

View File

@@ -77,9 +77,9 @@ class DocType(TransactionBase):
msgprint("Please Select Company under which you want to create account head")
def update_credit_days_limit(self):
sql("""update tabAccount set credit_days = %s, credit_limit = %s
where name = %s""", (self.doc.credit_days or 0, self.doc.credit_limit or 0,
self.doc.name + " - " + self.get_company_abbr()))
webnotes.conn.sql("""update tabAccount set credit_days = %s, credit_limit = %s
where master_type='Customer' and master_name = %s""",
(self.doc.credit_days or 0, self.doc.credit_limit or 0, self.doc.name))
def create_lead_address_contact(self):
if self.doc.lead_name:

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-11 14:26:44",
"docstatus": 0,
"modified": "2013-07-22 12:47:19",
"modified": "2013-08-08 14:22:13",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -80,7 +80,7 @@
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Series",
"label": "Document Numbering Series",
"no_copy": 1,
"options": "\nCUST\nCUSTMUM",
"permlevel": 0,

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-04-30 13:13:06",
"docstatus": 0,
"modified": "2013-07-22 15:23:59",
"modified": "2013-08-08 14:22:13",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -54,7 +54,7 @@
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Series",
"label": "Document Numbering Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-04-10 11:45:37",
"docstatus": 0,
"modified": "2013-07-30 14:44:35",
"modified": "2013-08-08 14:22:14",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -53,7 +53,7 @@
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Naming Series",
"label": "Document Numbering Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 18:50:30",
"docstatus": 0,
"modified": "2013-07-05 14:47:52",
"modified": "2013-08-08 14:22:15",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -56,7 +56,7 @@
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Naming Series",
"label": "Document Numbering Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
"modified": "2013-07-26 11:16:53",
"modified": "2013-08-09 14:46:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -62,7 +62,7 @@
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Naming Series",
"label": "Document Numbering Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
@@ -280,7 +280,7 @@
{
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
"doctype": "DocField",
"fieldname": "price_list_name",
"fieldname": "selling_price_list",
"fieldtype": "Link",
"in_filter": 1,
"label": "Price List",
@@ -728,6 +728,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",

View File

@@ -44,7 +44,7 @@ test_records = [
"order_type": "Sales",
"plc_conversion_rate": 1.0,
"price_list_currency": "INR",
"price_list_name": "_Test Price List",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory",
"transaction_date": "2013-02-21",
"grand_total": 1000.0,

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:42:57",
"docstatus": 0,
"modified": "2013-07-25 16:35:50",
"modified": "2013-08-07 14:44:28",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -91,7 +91,6 @@
"label": "Quantity and Rate"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "qty",
"fieldtype": "Float",
@@ -123,7 +122,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "ref_rate",
"fieldtype": "Currency",
@@ -139,7 +137,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "adj_rate",
"fieldtype": "Float",
@@ -153,7 +150,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "export_rate",
"fieldtype": "Currency",
@@ -171,7 +167,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "export_amount",
"fieldtype": "Currency",
@@ -203,7 +198,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "basic_rate",
"fieldtype": "Currency",
@@ -221,7 +215,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",

View File

@@ -32,7 +32,7 @@ class DocType:
det = webnotes.conn.sql("""select description, stock_uom from `tabItem`
where name = %s""", name)
rate = webnotes.conn.sql("""select ref_rate from `tabItem Price`
where price_list_name = %s and parent = %s
where price_list = %s and parent = %s
and ref_currency = %s""", (self.doc.price_list, name, self.doc.currency))
return {
'description' : det and det[0][0] or '',

View File

@@ -45,8 +45,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
});
}
if(this.frm.fields_dict.price_list_name) {
this.frm.set_query("price_list_name", function() {
if(this.frm.fields_dict.selling_price_list) {
this.frm.set_query("selling_price_list", function() {
return { filters: { buying_or_selling: "Selling" } };
});
@@ -54,7 +54,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
return {
query: "controllers.queries.get_price_list_currency",
filters: {
price_list_name: me.frm.doc.price_list_name,
price_list: me.frm.doc.selling_price_list,
buying_or_selling: "Selling"
}
};
@@ -126,15 +126,15 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this.frm.set_value("customer", null);
msgprint(wn._("Please specify Company"));
} else {
var price_list_name = this.frm.doc.price_list_name;
var selling_price_list = this.frm.doc.selling_price_list;
return this.frm.call({
doc: this.frm.doc,
method: "set_customer_defaults",
freeze: true,
callback: function(r) {
if(!r.exc) {
(me.frm.doc.price_list_name !== price_list_name) ?
me.price_list_name() :
(me.frm.doc.selling_price_list !== selling_price_list) ?
me.selling_price_list() :
me.price_list_currency();
}
}
@@ -188,7 +188,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
customer: me.frm.doc.customer,
currency: me.frm.doc.currency,
conversion_rate: me.frm.doc.conversion_rate,
price_list_name: me.frm.doc.price_list_name,
selling_price_list: me.frm.doc.selling_price_list,
price_list_currency: me.frm.doc.price_list_currency,
plc_conversion_rate: me.frm.doc.plc_conversion_rate,
company: me.frm.doc.company,
@@ -206,8 +206,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
}
},
price_list_name: function() {
this._super("Selling");
selling_price_list: function() {
this.get_price_list_currency("Selling");
},
ref_rate: function(doc, cdt, cdn) {

View File

@@ -8,7 +8,7 @@ from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import addchild
from webnotes.model.bean import getlist
from webnotes.model.code import get_obj
from webnotes import msgprint
from webnotes import msgprint, _
from setup.utils import get_company_currency
get_value = webnotes.conn.get_value

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-18 12:39:59",
"docstatus": 0,
"modified": "2013-07-26 11:16:55",
"modified": "2013-08-09 14:46:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -61,7 +61,7 @@
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Series",
"label": "Document Numbering Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
@@ -293,7 +293,7 @@
{
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
"doctype": "DocField",
"fieldname": "price_list_name",
"fieldname": "selling_price_list",
"fieldtype": "Link",
"label": "Price List",
"oldfieldname": "price_list_name",

View File

@@ -289,7 +289,7 @@ test_records = [
"delivery_date": "2013-02-23",
"plc_conversion_rate": 1.0,
"price_list_currency": "INR",
"price_list_name": "_Test Price List",
"selling_price_list": "_Test Price List",
"territory": "_Test Territory",
"transaction_date": "2013-02-21",
"grand_total": 1000.0,

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:42:58",
"docstatus": 0,
"modified": "2013-07-25 16:36:10",
"modified": "2013-08-07 14:44:50",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -88,7 +88,6 @@
"label": "Quantity and Rate"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "qty",
"fieldtype": "Float",
@@ -117,7 +116,6 @@
"width": "70px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "ref_rate",
"fieldtype": "Currency",
@@ -133,7 +131,6 @@
"width": "70px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "adj_rate",
"fieldtype": "Float",
@@ -147,7 +144,6 @@
"width": "70px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "export_rate",
"fieldtype": "Currency",
@@ -162,7 +158,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "export_amount",
"fieldtype": "Currency",
@@ -192,7 +187,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "basic_rate",
"fieldtype": "Currency",
@@ -208,7 +202,6 @@
"width": "100px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
@@ -248,7 +241,6 @@
"width": "150px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "projected_qty",
"fieldtype": "Float",
@@ -264,7 +256,6 @@
"width": "70px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "actual_qty",
"fieldtype": "Float",
@@ -277,7 +268,6 @@
"width": "70px"
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "delivered_qty",
"fieldtype": "Float",

View File

@@ -12,5 +12,5 @@ class DocType:
def validate(self):
for key in ["cust_master_name", "customer_group", "territory", "maintain_same_sales_rate",
"editable_price_list_rate"]:
"editable_price_list_rate", "selling_price_list"]:
webnotes.conn.set_default(key, self.doc.fields.get(key, ""))

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-25 10:25:16",
"docstatus": 0,
"modified": "2013-08-02 12:09:20",
"modified": "2013-08-09 14:46:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -64,7 +64,7 @@
},
{
"doctype": "DocField",
"fieldname": "price_list_name",
"fieldname": "selling_price_list",
"fieldtype": "Link",
"label": "Default Price List",
"options": "Price List"