Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Priya 2013-09-19 11:10:06 +05:30
commit 3a18b0fc95
5 changed files with 76 additions and 62 deletions

View File

@ -39,4 +39,4 @@ The difference between the value of the items remaining to be sold and the previ
This complete process is called Periodic Inventory. This complete process is called Periodic Inventory.
If you are an existing user using Periodic Inventory and want to use Perpetual Inventory, you have to follow some steps to migrate. For details, check [**Migration From Periodic Inventory**](docs.user.stock.perpetual_inventory.html) If you are an existing user using Periodic Inventory and want to use Perpetual Inventory, you have to follow some steps to migrate. For details, check [**Migration From Periodic Inventory**](docs.user.stock.periodic_to_perpetual.html)

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-04-10 11:45:37", "creation": "2013-04-10 11:45:37",
"docstatus": 0, "docstatus": 0,
"modified": "2013-09-10 10:52:20", "modified": "2013-09-19 10:38:58",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -158,10 +158,77 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "communication_history", "fieldname": "communication_history",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Communication History", "label": "Communication",
"options": "icon-comments", "options": "icon-comments",
"print_hide": 1 "print_hide": 1
}, },
{
"default": "__user",
"doctype": "DocField",
"fieldname": "lead_owner",
"fieldtype": "Link",
"in_filter": 1,
"label": "Lead Owner",
"oldfieldname": "lead_owner",
"oldfieldtype": "Link",
"options": "Profile",
"search_index": 1
},
{
"depends_on": "eval:!doc.__islocal",
"description": "Date on which the lead was last contacted",
"doctype": "DocField",
"fieldname": "last_contact_date",
"fieldtype": "Date",
"label": "Last Contact Date",
"no_copy": 1,
"oldfieldname": "last_contact_date",
"oldfieldtype": "Date",
"print_hide": 1,
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "col_break123",
"fieldtype": "Column Break",
"width": "50%"
},
{
"allow_on_submit": 0,
"description": "Your sales person who will contact the lead in future",
"doctype": "DocField",
"fieldname": "contact_by",
"fieldtype": "Link",
"hidden": 0,
"in_filter": 1,
"label": "Next Contact By",
"oldfieldname": "contact_by",
"oldfieldtype": "Link",
"options": "Profile",
"print_hide": 0,
"reqd": 0,
"width": "100px"
},
{
"allow_on_submit": 0,
"description": "Your sales person will get a reminder on this date to contact the lead",
"doctype": "DocField",
"fieldname": "contact_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Next Contact Date",
"no_copy": 1,
"oldfieldname": "contact_date",
"oldfieldtype": "Date",
"reqd": 0,
"width": "100px"
},
{
"doctype": "DocField",
"fieldname": "sec_break123",
"fieldtype": "Section Break",
"options": "Simple"
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"doctype": "DocField", "doctype": "DocField",
@ -274,18 +341,6 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nClient\nChannel Partner\nConsultant" "options": "\nClient\nChannel Partner\nConsultant"
}, },
{
"default": "__user",
"doctype": "DocField",
"fieldname": "lead_owner",
"fieldtype": "Link",
"in_filter": 1,
"label": "Lead Owner",
"oldfieldname": "lead_owner",
"oldfieldtype": "Link",
"options": "Profile",
"search_index": 1
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "market_segment", "fieldname": "market_segment",
@ -347,49 +402,6 @@
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Quotation Lost Reason" "options": "Quotation Lost Reason"
}, },
{
"allow_on_submit": 0,
"description": "Your sales person who will contact the lead in future",
"doctype": "DocField",
"fieldname": "contact_by",
"fieldtype": "Link",
"hidden": 0,
"in_filter": 1,
"label": "Next Contact By",
"oldfieldname": "contact_by",
"oldfieldtype": "Link",
"options": "Profile",
"print_hide": 0,
"reqd": 0,
"width": "100px"
},
{
"allow_on_submit": 0,
"description": "Your sales person will get a reminder on this date to contact the lead",
"doctype": "DocField",
"fieldname": "contact_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Next Contact Date",
"no_copy": 1,
"oldfieldname": "contact_date",
"oldfieldtype": "Date",
"reqd": 0,
"width": "100px"
},
{
"depends_on": "eval:!doc.__islocal",
"description": "Date on which the lead was last contacted",
"doctype": "DocField",
"fieldname": "last_contact_date",
"fieldtype": "Date",
"label": "Last Contact Date",
"no_copy": 1,
"oldfieldname": "last_contact_date",
"oldfieldtype": "Date",
"print_hide": 1,
"read_only": 1
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "company", "fieldname": "company",

View File

@ -77,8 +77,8 @@ class DocType(DocListController):
bin_list = webnotes.conn.sql("select * from tabBin where item_code=%s", bin_list = webnotes.conn.sql("select * from tabBin where item_code=%s",
self.doc.item_code, as_dict=1) self.doc.item_code, as_dict=1)
for bin in bin_list: for bin in bin_list:
if bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \ if (bin.reserved_qty > 0 or bin.ordered_qty > 0 or bin.indented_qty > 0 \
or bin.planned_qty > 0 and cstr(bin.stock_uom) != cstr(self.doc.stock_uom): or bin.planned_qty > 0) and cstr(bin.stock_uom) != cstr(self.doc.stock_uom):
matched = False matched = False
break break

View File

@ -886,7 +886,8 @@ def make_return_jv(stock_entry):
"account": r.get("account"), "account": r.get("account"),
"against_invoice": r.get("against_invoice"), "against_invoice": r.get("against_invoice"),
"against_voucher": r.get("against_voucher"), "against_voucher": r.get("against_voucher"),
"balance": get_balance_on(r.get("account"), se.doc.posting_date) "balance": get_balance_on(r.get("account"), se.doc.posting_date) \
if r.get("account") else 0
}) })
return jv_list return jv_list

View File

@ -243,7 +243,8 @@ class TransactionBase(StatusUpdater):
def delete_events(self): def delete_events(self):
webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent` webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent`
where ref_type=%s and ref_name=%s""", (self.doc.doctype, self.doc.name))) where ref_type=%s and ref_name=%s""", (self.doc.doctype, self.doc.name)),
ignore_permissions=True)
def _add_calendar_event(self, opts): def _add_calendar_event(self, opts):
opts = webnotes._dict(opts) opts = webnotes._dict(opts)